2016-04-03 16:09:24 +02:00
|
|
|
[[max-number-of-threads]]
|
|
|
|
=== Number of threads
|
|
|
|
|
|
|
|
Elasticsearch uses a number of thread pools for different types of operations.
|
2017-12-15 17:29:13 +01:00
|
|
|
It is important that it is able to create new threads whenever needed. Make
|
2016-04-03 16:09:24 +02:00
|
|
|
sure that the number of threads that the Elasticsearch user can create is at
|
2017-11-29 12:17:22 +09:00
|
|
|
least 4096.
|
2016-04-03 16:09:24 +02:00
|
|
|
|
2017-11-29 12:17:22 +09:00
|
|
|
This can be done by setting <<ulimit,`ulimit -u 4096`>> as root before
|
|
|
|
starting Elasticsearch, or by setting `nproc` to `4096` in
|
2016-04-03 16:09:24 +02:00
|
|
|
<<limits.conf,`/etc/security/limits.conf`>>.
|
|
|
|
|
2017-12-15 17:29:13 +01:00
|
|
|
The package distributions when run as services under `systemd` will configure
|
|
|
|
the number of threads for the Elasticsearch process automatically. No
|
|
|
|
additional configuration is required.
|