-
Notifications
You must be signed in to change notification settings - Fork 24.8k
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
Allow adjustment of index resource constraints in ILM phase transitions #44070
Comments
Pinging @elastic/es-core-features |
Pinging @elastic/es-distributed |
I raised this question with the distrib team today and although we're not super-keen on recommending the widespread use of the |
Are Resource requirements are often quite dynamic. Even in the hot stage, and index may have off peak hours when the reserved resources could've been shared by other indices. Requirement prediction itself is hard with users almost always under/over provisioning in the first pass. It needs iterative fine tuning to get the limits right. I would vote for a prescriptive best case effort to allow for such flexibility. Separately, +1 on revising constraints through ILM transitions. |
We discussed this and agreed on putting an option for setting |
@DaveCTurner would it be ok if I started working on this? |
@avneesh91 sure if you'd like to contribute a PR for this that would be great. |
@avneesh91 I'd like to pick this issue, if you're not actively working on it? |
It is impracticable to use ILM at scale :( |
Another +1 to this issue. We've been having problems when we scale up our larger clusters by 2-3 nodes where ES decides to allocate all of the shards for the next index on the new nodes, which causes abysmal performance and slows down ingestion. We've been guarding against it by setting Is there any update on this? It sounds like the proposed solution would work great for us. |
+1 Shard imbalance necessitating the use of |
Resetting @dakrone - if this option is put in the |
|
That seems reasonable @dakrone (and thanks for the quick reply). Should I open a new issue for your suggestion? |
@JohnLyman I think it can be subsumed into this issue for now, thanks for bringing it up! |
I was thinking for shrink in general, whether it's initiated by ILM or not. |
I think that is one of the main goals of #63519 |
… is too low (#76732) We added configuration to AllocateAction to set the total shards per node property on the index. This makes it possible that a user could set this to a value lower than the total number of shards in the index that is about to be shrunk, meaning that all of the shards could not be moved to a single node in the ShrinkAction. This commit unsets the total shards per node property so that we fall back to the default value (-1, unlimited) in the ShrinkAction to avoid this. Relates to #44070
elastic#76134) This adds a new optional field to the allocate ILM action called "total_shards_per_node". If present, the value of this field is set as the value of "index.routing.allocation.total_shards_per_node" before the allocation takes place. Relates to elastic#44070
… is too low (elastic#76732) We added configuration to AllocateAction to set the total shards per node property on the index. This makes it possible that a user could set this to a value lower than the total number of shards in the index that is about to be shrunk, meaning that all of the shards could not be moved to a single node in the ShrinkAction. This commit unsets the total shards per node property so that we fall back to the default value (-1, unlimited) in the ShrinkAction to avoid this. Relates to elastic#44070
… is too low (#76732) (#76780) This is a backport of #76732. We added configuration to AllocateAction to set the total shards per node property on the index. This makes it possible that a user could set this to a value lower than the total number of shards in the index that is about to be shrunk, meaning that all of the shards could not be moved to a single node in the ShrinkAction. This commit unsets the total shards per node property so that we fall back to the default value (-1, unlimited) in the ShrinkAction to avoid this. Relates to #44070
#76775) Allow for setting the total shards per node in the Allocate ILM action (#76134) This is a backport of #76134. It adds a new optional field to the allocate ILM action called "total_shards_per_node". If present, the value of this field is set as the value of "index.routing.allocation.total_shards_per_node" before the allocation takes place. Relates to #44070
The shards allocator mostly does a good job of spreading the shards of each index out across the available nodes, but there are some corner cases where it might temporarily concentrate too many hot shards on a single node, leading to poor performance and possible resource exhaustion (#17213). It is occasionally useful to add the
index.routing.allocation.total_shards_per_node
constraint when indices are under heavy load, to prevent too many hot shards from being allocated to the same node. We are contemplating generalising this to a more nuanced set of per-index resource constraints too (#17213 (comment)).If an index is managed by ILM then it is likely its resource requirements will change along with its lifecycle. In particular when the index leaves the hot phase it will no longer see such heavy indexing, and so any
total_shards_per_node
constraint is likely no longer necessary. It's important to keep the use of this sort of setting to a minimum to avoid over-constraining the allocator since this can lead to unassigned shards (#12273). I therefore think it'd be a good idea to allow this kind of setting to be changed in the appropriate ILM phase transitions.The text was updated successfully, but these errors were encountered: