Skip to content

Commit 7e62862

Browse files
authored
Clarify queues in thread pool settings (#127027)
The docs about the queue in a `fixed` pool are a little awkwardly worded, and there is no mention of the queue in a `scaling` pool at all. This commit cleans this area up.
1 parent 6335391 commit 7e62862

File tree

1 file changed

+3
-5
lines changed

1 file changed

+3
-5
lines changed

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

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -94,11 +94,7 @@ The following are the types of thread pools and their respective parameters:
9494
9595
### `fixed` [fixed-thread-pool]
9696

97-
The `fixed` thread pool holds a fixed size of threads to handle the requests with a queue (optionally bounded) for pending requests that have no threads to service them.
98-
99-
The `size` parameter controls the number of threads.
100-
101-
The `queue_size` allows to control the size of the queue of pending requests that have no threads to execute them. By default, it is set to `-1` which means its unbounded. When a request comes in and the queue is full, it will abort the request.
97+
A `fixed` thread pool holds a fixed number of threads as determined by the `size` parameter. If a task is submitted to a `fixed` thread pool and there are fewer than `size` busy threads in the pool then the task will execute immediately. If all the threads are busy when a task is submitted then it will be held in a queue for later execution. The `queue_size` parameter controls the maximum size of this queue. A `queue_size` of `-1` means that the queue is unbounded, but most `fixed` thread pools specify a bound on their queue size by default. If a bounded queue is full then it will reject further work, which typically causes the corresponding requests to fail.
10298

10399
```yaml
104100
thread_pool:
@@ -114,6 +110,8 @@ The `scaling` thread pool holds a dynamic number of threads. This number is prop
114110

115111
The `keep_alive` parameter determines how long a thread should be kept around in the thread pool without it doing any work.
116112

113+
If a task is submitted to a `scaling` thread pool when its maximum number of threads are already busy with other tasks, the new task will be held in a queue for later execution. The queue in a `scaling` thread pool is always unbounded.
114+
117115
```yaml
118116
thread_pool:
119117
warmer:

0 commit comments

Comments
 (0)