[ML] Set Adaptive Allocations Scale to Zero to 24h#128914
Merged
prwhelan merged 9 commits intoelastic:mainfrom Jun 6, 2025
Merged
[ML] Set Adaptive Allocations Scale to Zero to 24h#128914prwhelan merged 9 commits intoelastic:mainfrom
prwhelan merged 9 commits intoelastic:mainfrom
Conversation
Adaptive Allocations will now wait 24 hours to scale down to zero allocations (from one allocation). `xpack.ml.trained_models.adaptive_allocations.scale_to_zero_time` can be used to change this time from 24 hours to a minimum of 15 minutes. `xpack.ml.trained_models.adaptive_allocations.scale_cooldown_time` can be used to change the time adaptive allocation scales between 1 and max allocations. Defaults to 5 minutes. `xpack.ml.trained_models.adaptive_allocations.trigger_time` can be used to change the time adaptive allocations tries to scale. Defaults to 15 minutes.
Collaborator
|
Hi @prwhelan, I've created a changelog YAML for you. |
Collaborator
|
Pinging @elastic/ml-core (Team:ML) |
jan-elastic
approved these changes
Jun 5, 2025
docs/changelog/128914.yaml
Outdated
| @@ -0,0 +1,5 @@ | |||
| pr: 128914 | |||
| summary: Set Adaptive Allocations Scale to Zero to 24h | |||
Contributor
There was a problem hiding this comment.
should be: "make configurable ... and set default to 24h"
| public static final Setting<TimeValue> DEFAULT_TIME_INTERVAL = Setting.timeSetting( | ||
| "xpack.ml.trained_models.adaptive_allocations.trigger_time", | ||
| TimeValue.timeValueSeconds(10), | ||
| TimeValue.timeValueSeconds(10), |
Contributor
There was a problem hiding this comment.
Why the minimum times (here and underneath)?
I you want an allocation to go away after 1 minute of idleness, I think you should be able to do so
Member
Author
There was a problem hiding this comment.
I picked the current settings as the min settings, but we can lower them to 1 minute, I don't mind either way. I think values lower than 1m may cause too much thrashing for the autoscaler
| public static final Setting<TimeValue> DEFAULT_TIME_INTERVAL = Setting.timeSetting( | ||
| "xpack.ml.trained_models.adaptive_allocations.trigger_time", | ||
| TimeValue.timeValueSeconds(10), | ||
| TimeValue.timeValueSeconds(10), |
Contributor
There was a problem hiding this comment.
BTW, I'm not convinced this trigger time should be configurable
mridula-s109
pushed a commit
to mridula-s109/elasticsearch
that referenced
this pull request
Jun 9, 2025
Adaptive Allocations will now wait 24 hours to scale down to zero allocations (from one allocation). `xpack.ml.trained_models.adaptive_allocations.scale_to_zero_time` can be used to change this time from 24 hours to a minimum of 1 minute. `xpack.ml.trained_models.adaptive_allocations.scale_cooldown_time` can be used to change the time adaptive allocation scales between 1 and max allocations. Defaults to 5 minutes.
valeriy42
pushed a commit
to valeriy42/elasticsearch
that referenced
this pull request
Jun 12, 2025
Adaptive Allocations will now wait 24 hours to scale down to zero allocations (from one allocation). `xpack.ml.trained_models.adaptive_allocations.scale_to_zero_time` can be used to change this time from 24 hours to a minimum of 1 minute. `xpack.ml.trained_models.adaptive_allocations.scale_cooldown_time` can be used to change the time adaptive allocation scales between 1 and max allocations. Defaults to 5 minutes.
This file contains hidden or 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
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.
Adaptive Allocations will now wait 24 hours to scale down to zero allocations (from one allocation).
xpack.ml.trained_models.adaptive_allocations.scale_to_zero_timecan be used to change this time from 24 hours to a minimum of 15 minutes.xpack.ml.trained_models.adaptive_allocations.scale_cooldown_timecan be used to change the time adaptive allocation scales between 1 and max allocations. Defaults to 5 minutes.