@@ -10,7 +10,7 @@ of discarded.
10
10
There are several thread pools, but the important ones include:
11
11
12
12
`generic`::
13
- For generic operations (e.g. , background node discovery).
13
+ For generic operations (for example , background node discovery).
14
14
Thread pool type is `scaling`.
15
15
16
16
`search`::
@@ -20,16 +20,18 @@ There are several thread pools, but the important ones include:
20
20
`1000`.
21
21
22
22
[[search-throttled]]`search_throttled`::
23
- For count/search/suggest/get operations on `search_throttled indices`. Thread pool type is
24
- `fixed_auto_queue_size` with a size of `1`, and initial queue_size of `100`.
23
+ For count/search/suggest/get operations on `search_throttled indices`.
24
+ Thread pool type is `fixed_auto_queue_size` with a size of `1`, and initial
25
+ queue_size of `100`.
25
26
26
27
`get`::
27
28
For get operations. Thread pool type is `fixed`
28
29
with a size of `# of available processors`,
29
30
queue_size of `1000`.
30
31
31
32
`analyze`::
32
- For analyze requests. Thread pool type is `fixed` with a size of 1, queue size of 16.
33
+ For analyze requests. Thread pool type is `fixed` with a size of `1`, queue
34
+ size of `16`.
33
35
34
36
`write`::
35
37
For single-document index/delete/update and bulk requests. Thread pool type
@@ -49,8 +51,9 @@ There are several thread pools, but the important ones include:
49
51
keep-alive of `5m` and a max of `min(10, (# of available processors)/2)`.
50
52
51
53
`listener`::
52
- Mainly for java client executing of action when listener threaded is set to true.
53
- Thread pool type is `scaling` with a default max of `min(10, (# of available processors)/2)`.
54
+ Mainly for java client executing of action when listener threaded is set to
55
+ `true`. Thread pool type is `scaling` with a default max of
56
+ `min(10, (# of available processors)/2)`.
54
57
55
58
Changing a specific thread pool can be done by setting its type-specific
56
59
parameters; for example, changing the number of threads in the `write` thread
@@ -77,8 +80,7 @@ The `fixed` thread pool holds a fixed size of threads to handle the
77
80
requests with a queue (optionally bounded) for pending requests that
78
81
have no threads to service them.
79
82
80
- The `size` parameter controls the number of threads, and defaults to the
81
- number of cores times 5.
83
+ The `size` parameter controls the number of threads.
82
84
83
85
The `queue_size` allows to control the size of the queue of pending
84
86
requests that have no threads to execute them. By default, it is set to
@@ -107,8 +109,7 @@ https://en.wikipedia.org/wiki/Little%27s_law[Little's Law]. These calculations
107
109
will potentially adjust the `queue_size` up or down by 50 every time
108
110
`auto_queue_frame_size` operations have been completed.
109
111
110
- The `size` parameter controls the number of threads, and defaults to the
111
- number of cores times 5.
112
+ The `size` parameter controls the number of threads.
112
113
113
114
The `queue_size` allows to control the initial size of the queue of pending
114
115
requests that have no threads to execute them.
@@ -163,6 +164,7 @@ thread_pool:
163
164
[float]
164
165
[[processors]]
165
166
=== Processors setting
167
+
166
168
The number of processors is automatically detected, and the thread pool
167
169
settings are automatically set based on it. In some cases it can be
168
170
useful to override the number of detected processors. This can be done
@@ -176,15 +178,14 @@ processors: 2
176
178
There are a few use-cases for explicitly overriding the `processors`
177
179
setting:
178
180
179
- . If you are running multiple instances of Elasticsearch on the same
180
- host but want Elasticsearch to size its thread pools as if it only has a
181
- fraction of the CPU, you should override the `processors` setting to the
182
- desired fraction (e.g., if you're running two instances of Elasticsearch
183
- on a 16-core machine, set `processors` to 8). Note that this is an
184
- expert-level use-case and there's a lot more involved than just setting
185
- the `processors` setting as there are other considerations like changing
186
- the number of garbage collector threads, pinning processes to cores,
187
- etc.
181
+ . If you are running multiple instances of {es} on the same host but want {es}
182
+ to size its thread pools as if it only has a fraction of the CPU, you should
183
+ override the `processors` setting to the desired fraction, for example, if
184
+ you're running two instances of {es} on a 16-core machine, set `processors` to 8.
185
+ Note that this is an expert-level use case and there's a lot more involved
186
+ than just setting the `processors` setting as there are other considerations
187
+ like changing the number of garbage collector threads, pinning processes to
188
+ cores, and so on.
188
189
. Sometimes the number of processors is wrongly detected and in such
189
190
cases explicitly setting the `processors` setting will workaround such
190
191
issues.
0 commit comments