-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add resource limits #106
Open
cmelone
wants to merge
17
commits into
develop
Choose a base branch
from
add/resource-limits
base: develop
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Add resource limits #106
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
cmelone
force-pushed
the
add/resource-limits
branch
from
October 8, 2024 17:39
8777cd3
to
6a6efb6
Compare
will rebase this as well as #93 |
cmelone
force-pushed
the
add/resource-limits
branch
from
October 23, 2024 21:48
4d9e505
to
3a7f629
Compare
past thread on deciding # of build jobs: spack/spack#26242 @HadrienG2 I figured you might be interested to know we're working on this for our CI, the approach is quite similar to your comment |
… system `SPACK_BUILD_JOBS=max(1, cpu_request)`
cmelone
force-pushed
the
add/resource-limits
branch
from
November 12, 2024 14:27
5aade28
to
90d55da
Compare
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This is the first version of our prediction formulas for max cpu and memory.
This PR also sets
SPACK_BUILD_JOBS
equal to the CPU request (nearest core).Using the included simulation script, I ran a scenario where we allocated resources for 8000 specs.
The max memory predictions includes a 20% "bump" to avoid the OOM killing of ~1100 jobs.
The ratio of actual usage/predicted usage (mem) was
0.6963
, meaning that we are overallocating by 30%.However, 437 jobs were killed, representing an OOM rate of
0.055
, far higher than we would like.@alecbcs and I discussed alternative prediction strategies that include factoring the ratio of mem/cores.
For example, if we take a look at a job that was predicted to use 3x less memory at peak than it actually used, and the data used to make this prediction:
This package usually takes 4-5 minutes to build, but instead took 21 minutes and peaked at nearly 4x memory.
In my opinion, there is no data available to us that would allow us to make an accurate prediction in this scenario. This is the case for most of the outliers that I've seen. In this scenario, the job in question may have been manipulated by a noisy neighbor not respecting their allocation.
My vote is to keep the formula as-is, and tweak it once we deploy gantry to the staging cluster and with limits in place.
The ratio for max cpu was
0.9546
.