ES 线程池(thread pool)
ES 中每个节点有多种线程池
generic
For generic operations (for example, background node discovery). Thread pool type is scaling
.
search
For count/search/suggest operations. Thread pool type is fixed_auto_queue_size
with a size of int((# of available_processors * 3) / 2) + 1
, and initial queue_size of 1000
.
search_throttled
For count/search/suggest/get operations on search_throttled indices
. Thread pool type is fixed_auto_queue_size
with a size of 1
, and initial queue_size of 100
.
get
For get operations. Thread pool type is fixed
with a size of # of available processors
, queue_size of 1000
.
analyze
For analyze requests. Thread pool type is fixed
with a size of 1
, queue size of 16
.
write
For single-document index/delete/update and bulk requests. Thread pool type is fixed
with a size of # of available processors
, queue_size of 200
. The maximum size for this pool is 1 + # of available processors
.
snapshot
For snapshot/restore operations. Thread pool type is scaling
with a keep-alive of 5m
and a max of min(5, (# of available processors)/2)
.
warmer
For segment warm-up operations. Thread pool type is scaling
with a keep-alive of 5m
and a max of min(5, (# of available processors)/2)
.
refresh
For refresh operations. Thread pool type is scaling
with a keep-alive of 5m
and a max of min(10, (# of available processors)/2)
.
listener
Mainly for java client executing of action when listener threaded is set to true
. Thread pool type is scaling
with a default max of min(10, (# of available processors)/2)
.
fetch_shard_started
For listing shard states. Thread pool type is scaling
with keep-alive of 5m
and a default maximum size of 2 * # of available processors
.
fetch_shard_store
For listing shard stores. Thread pool type is scaling
with keep-alive of 5m
and a default maximum size of 2 * # of available processors
.
flush
For flush, synced flush, and translog fsync
operations. Thread pool type is scaling
with a keep-alive of 5m
and a default maximum size of min(5, (# of available processors)/2)
.
force_merge
For force merge operations. Thread pool type is fixed
with a size of 1 and an unbounded queue size.
management
For cluster management. Thread pool type is scaling
with a keep-alive of 5m
and a default maximum size of 5
.详细可参
考官方文档:https://www.elastic.co/guide/en/elasticsearch/reference/current/modules-threadpool.html
查看线程池
curl localhost:9200/_cat/thread_pool/?v