@@ -121,22 +121,37 @@ threadpool:
121
121
[[processors]]
122
122
=== Processors setting
123
123
The number of processors is automatically detected, and the thread pool
124
- settings are automatically set based on it. Sometimes, the number of processors
125
- are wrongly detected, in such cases, the number of processors can be
126
- explicitly set using the `processors` setting. The example below sets
127
- the number of processors to 4, which means that the default search thread pool size
128
- is 4 x 3 = 12.
124
+ settings are automatically set based on it. In some cases it can be
125
+ useful to override the number of detected processors. This can be done
126
+ by explicitly setting the `processors` setting.
129
127
130
128
[source,js]
131
129
--------------------------------------------------
132
130
processors: 4
133
131
--------------------------------------------------
134
132
135
- This setting is important when running multiple node instances on a single
136
- bare-metal machine. Each node will detect that it has the full number of
137
- processors. But in reality, they are sharing processors on the single machine.
138
- In other words, it is advised to lower the `processors` setting accordingly. For example,
139
- on a 24 core machine and running 3 nodes, set processors to 8.
133
+ There are a few use-cases for explicitly overriding the `processors`
134
+ setting:
135
+
136
+ . If you are running multiple instances of Elasticsearch on the same
137
+ host but want Elasticsearch to size its thread pools as if it only has a
138
+ fraction of the CPU, you should override the `processors` setting to the
139
+ desired fraction (e.g., if you're running two instances of Elasticsearch
140
+ on a 16-core machine, set `processors` to 8). Note that this is an
141
+ expert-level use-case and there's a lot more involved than just setting
142
+ the `processors` setting as there are other considerations like changing
143
+ the number of garbage collector threads, pinning processes to cores,
144
+ etc.
145
+ . The number of processors is by default bounded to 32. This means that
146
+ on systems that have more than 32 processors, Elasticsearch will size
147
+ its thread pools as if there are only 32 processors present. This
148
+ limitation was added to avoid creating too many threads on systems that
149
+ have not properly adjusted the `ulimit` for max number of processes. In
150
+ cases where you've adjusted the `ulimit` appropriately, you can override
151
+ this bound by explicitly setting the `processors` setting.
152
+ . Sometimes the number of processors is wrongly detected and in such
153
+ cases explicitly setting the `processors` setting will workaround such
154
+ issues.
140
155
141
156
In order to check the number of processors detected, use the nodes info
142
157
API with the `os` flag.
0 commit comments