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

[SERVE][AUTOSCALERS] Replica scaling sampling period and stability. #4444

Open
JGSweets opened this issue Dec 5, 2024 · 1 comment
Open

Comments

@JGSweets
Copy link
Contributor

JGSweets commented Dec 5, 2024

In autoscalers.py within serve:

elif target_num_replicas > self.target_num_replicas:
self.upscale_counter += 1
self.downscale_counter = 0
if self.upscale_counter >= self.scale_up_consecutive_periods:
self.upscale_counter = 0
self.target_num_replicas = target_num_replicas
elif target_num_replicas < self.target_num_replicas:
self.downscale_counter += 1
self.upscale_counter = 0
if self.downscale_counter >= self.scale_down_consecutive_periods:
self.downscale_counter = 0
self.target_num_replicas = target_num_replicas

When a single qps check is below or above the threshold, the downscale_counter or upscale_counter is set to 0.
This means a single jitter in qps could disrupt scaling.

I propose we allow a sampling over a period to allow scaling to occur based on a percentage of occurrences vs resetting to 0.
This could be set in the scaling policy.


Also, since scaling utilizes math.ceil, it errors on scaling and keeping qps below the value as a max bar vs a target.

target_num_replicas = math.ceil(


Version & Commit info:

@Michaelvll
Copy link
Collaborator

cc'ing @cblmemo

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants