Skip to content

Commit 7ccb418

Browse files
committed
add availability info for merge thread pool
1 parent 8a7f522 commit 7ccb418

File tree

2 files changed

+15
-5
lines changed

2 files changed

+15
-5
lines changed

docs/reference/elasticsearch/configuration-reference/thread-pool-settings.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,12 +64,14 @@ $$$search-throttled$$$`search_throttled`
6464
`flush`
6565
: For [flush](https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-indices-flush) and [translog](/reference/elasticsearch/index-settings/translog.md) `fsync` operations. Thread pool type is `scaling` with a keep-alive of `5m` and a default maximum size of `min(5, (`[`# of allocated processors`](#node.processors)`) / 2)`.
6666

67-
`merge`
67+
`merge` {applies_to}`stack: ga 9.1`
6868
: For [merge](https://www.elastic.co/guide/en/elasticsearch/reference/current/index-modules-merge.html) operations of all the shards on the node. Thread pool type is `scaling` with a keep-alive of `5m` and a default maximum size of [`# of allocated processors`](#node.processors).
6969

7070
`force_merge`
7171
: For waiting on blocking [force merge](https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-indices-forcemerge) operations. Thread pool type is `fixed` with a size of `max(1, (`[`# of allocated processors`](#node.processors)`) / 8)` and an unbounded queue size.
7272

73+
In {{stack}} 9.0 and earlier, this thread pool is used for all force merge operations, not just blocking operations.
74+
7375
`management`
7476
: For cluster management. Thread pool type is `scaling` with a keep-alive of `5m` and a default maximum size of `5`.
7577

docs/reference/elasticsearch/index-settings/merge.md

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,9 @@ The merge process uses auto-throttling to balance the use of hardware resources
1919
## Merge scheduling [merge-scheduling]
2020

2121
The merge scheduler controls the execution of merge operations when they are needed.
22-
Merges run on the dedicated `merge` thread pool.
22+
23+
24+
{applies_to}`stack: ga 9.1` Merges run on the dedicated `merge` thread pool.
2325
Smaller merges are prioritized over larger ones, across all shards on the node.
2426
Merges are disk IO throttled so that bursts, while merging activity is otherwise low, are smoothed out in order to not impact indexing throughput.
2527
There is no limit on the number of merges that can be enqueued for execution on the thread pool.
@@ -28,21 +30,27 @@ However, beyond a certain per-shard limit, after merging is completely disk IO u
2830
The available disk space is periodically monitored, such that no new merge tasks are scheduled for execution when the available disk space is low.
2931
This is in order to prevent that the temporary disk space, which is required while merges are executed, completely fills up the disk space on the node.
3032

33+
:::{note}
34+
In {{stack}} 9.0 and earlier, merges do not use a dedicated thread pool. Merges run in separate threads, and when the maximum number of threads is reached, further merges will wait until a merge thread becomes available.
35+
:::
36+
37+
### Merge scheduler settings
38+
3139
The merge scheduler supports the following *dynamic* settings:
3240

3341
`index.merge.scheduler.max_thread_count`
3442
: The maximum number of threads on a **single** shard that may be merging at once. Defaults to `Math.max(1, Math.min(4, <<node.processors, node.processors>> / 2))` which works well for a good solid-state-disk (SSD). If your index is on spinning platter drives instead, decrease this to 1.
3543

36-
`indices.merge.disk.check_interval`
44+
`indices.merge.disk.check_interval` {applies_to}`stack: ga 9.1`
3745
: The time interval for checking the available disk space. Defaults to `5s`.
3846

39-
`indices.merge.disk.watermark.high`
47+
`indices.merge.disk.watermark.high` {applies_to}`stack: ga 9.1`
4048
: Controls the disk usage watermark, which defaults to `95%`, beyond which no merge tasks can start execution.
4149
The disk usage tally includes the estimated temporary disk space still required by all the currently executing merge tasks.
4250
Any merge task scheduled *before* the limit is reached continues execution, even if the limit is exceeded while executing
4351
(merge tasks are not aborted).
4452

45-
`indices.merge.disk.watermark.high.max_headroom`
53+
`indices.merge.disk.watermark.high.max_headroom` {applies_to}`stack: ga 9.1`
4654
: Controls the max headroom for the merge disk usage watermark, in case it is specified as percentage or ratio values.
4755
Defaults to `100GB` when `indices.merge.disk.watermark.high` is not explicitly set.
4856
This caps the amount of free disk space before merge scheduling is blocked.

0 commit comments

Comments
 (0)