Skip to content

[8.19] New threadpool-based merge scheduler which is disk space aware #129152

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

Conversation

albertzaharovits
Copy link
Contributor

@albertzaharovits albertzaharovits commented Jun 9, 2025

This is the backport of a few PRs related to the implementation of the new threadpool-based merge scheduler.
The new merge scheduler uses a node-level threadpool (sized the number of CPU cores) to execute all the merges across all the shards on the node, limiting the amount of concurrently executing merges, irrespective of the number of shards that the node hosts. Smaller merges continue to have priority over larger ones.
In addition, the new merge scheduler implementation also monitors the available disk space on the node, so that it won't start executing any new merges when the available disk space becomes scarce (the used disk space gets above the indices.merge.disk.watermark.high (95%) limit (same as the the allocation flood stage (the limit that flips shards on the node to read-only))).
The new merge scheduler is now enabled by default (indices.merge.scheduler.use_thread_pool is true).

Here is the complete list of backported PRs:

See also: #129134
Relates: ES-11701 ES-10046

…lastic#129134)

This is the backport of a few PRs related to the implementation of the new threadpool-based merge scheduler.
The new merge scheduler uses a node-level threadpool (sized the number of CPU cores) to execute all the merges across all the shards on the node, limiting the amount of concurrently executing merges, irrespective of the number of shards that the node hosts. Smaller merges continue to have priority over larger ones.
In addition, the new merge scheduler implementation also monitors the available disk space on the node, so that it won't start executing any new merges when the available disk space becomes scarce (the used disk space gets above the indices.merge.disk.watermark.high (95%) limit (same as the the allocation flood stage (the limit that flips shards on the node to read-only))).
The new merge scheduler is now enabled by default (indices.merge.scheduler.use_thread_pool is true).
@albertzaharovits albertzaharovits merged commit 3e05896 into elastic:8.19 Jun 10, 2025
15 checks passed
@albertzaharovits albertzaharovits deleted the backport-819-disk-space-aware-threadpool-merge-scheduler-take2 branch June 10, 2025 07:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport :Distributed Indexing/Engine Anything around managing Lucene and the Translog in an open shard. >feature v8.19.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants