Skip to content
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

[Autoscaler] Make AUTOSCALER_MAX_RESOURCE_DEMAND_VECTOR_SIZE configurable #50176

Merged
merged 7 commits into from
Feb 9, 2025

Conversation

DmitriGekhtman
Copy link
Contributor

@DmitriGekhtman DmitriGekhtman commented Feb 1, 2025

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/.

    • I've added any new APIs to the API Reference. For example, if I added a
      method in Tune, I've added it in doc/source/tune/api/ under the
      corresponding .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

    • Unit tests
    • Release tests
    • This PR is not tested :(

    I tested it experimentally by increasing AUTOSCALER_MAX_RESOURCE_DEMAND_VECTOR_SIZE to 100k and submitting 10k tasks; upscaling happened smoothly.

Signed-off-by: Dmitri Gekhtman <[email protected]>
@DmitriGekhtman DmitriGekhtman requested review from hongchaodeng and a team as code owners February 1, 2025 23:09
@jcotant1 jcotant1 added the core Issues that should be addressed in Ray Core label Feb 2, 2025
@DmitriGekhtman
Copy link
Contributor Author

Looks like I need to fix the format and merge master.

@DmitriGekhtman
Copy link
Contributor Author

Test failures unrelated.

This is a fairly straightforward, low-risk change. Could someone give it a quick review?

@pcmoritz pcmoritz added the go add ONLY when ready to merge, run all tests label Feb 9, 2025
@pcmoritz
Copy link
Contributor

pcmoritz commented Feb 9, 2025

Thanks for updating this! Ideally all of these environment variables would be prefixed by RAY_ but that's already violated a lot in this file and maybe AUTOSCALER_ is distinctive enough. Approving it :)

@pcmoritz pcmoritz enabled auto-merge (squash) February 9, 2025 01:41
@pcmoritz pcmoritz merged commit ad5db71 into ray-project:master Feb 9, 2025
7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
core Issues that should be addressed in Ray Core go add ONLY when ready to merge, run all tests
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants