[Autoscaler] Make AUTOSCALER_MAX_RESOURCE_DEMAND_VECTOR_SIZE configurable #50176
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.
Why are these changes needed?
This change makes
AUTOSCALER_MAX_RESOURCE_DEMAND_VECTOR_SIZE
configurable.Power users may wish to submit more than 1000 tasks at once and have the autoscaler respond by immediately scaling up the requisite number of nodes.
To make this happen,
AUTOSCALER_MAX_RESOURCE_DEMAND_VECTOR_SIZE
must be increased beyond the 1000 cap; otherwise, the demand from most tasks is ignored and upscaling is slow.Related issue number
Limited
AUTOSCALER_MAX_RESOURCE_DEMAND_VECTOR_SIZE
causes the issue experienced in #45373.This PR provides a workaround.
After merging this PR, if a user wants, say, 10k tasks to trigger quick upscaling, then the user can increase
AUTOSCALER_MAX_RESOURCE_DEMAND_VECTOR_SIZE
past 10k.Checks
I've signed off every commit(by using the -s flag, i.e.,
git commit -s
) in this PR.I've run
scripts/format.sh
to lint the changes in this PR.I've included any doc changes needed for https://docs.ray.io/en/master/.
method in Tune, I've added it in
doc/source/tune/api/
under thecorresponding
.rst
file.I've made sure the tests are passing. Note that there might be a few flaky tests, see the recent failures at https://flakey-tests.ray.io/
Testing Strategy
I tested it experimentally by increasing
AUTOSCALER_MAX_RESOURCE_DEMAND_VECTOR_SIZE
to 100k and submitting 10k tasks; upscaling happened smoothly.