Advanced Configuration of distributed search elasticsearch (2) -- thread pool settings

Source: Internet
Author: User

An elasticsearch node has multiple thread pools, but the following four are important:
Index: mainly refers to data indexing and data deletion operations (the default type is cached)
Search: mainly for obtaining, statistics, and search operations (the default type is cached)
BULK: mainly refers to batch operations on indexes (the default type is cached)
Refresh: mainly for update operations (the default type is cached)

You can set a parameter to change the thread pool type. For example, you can change the index thread pool to the blocking type:

threadpool:     index:         type: blocking         min: 1         size: 30         wait_time: 30s

The following are three types of thread pools that can be set:
Cache
The cache thread pool is an infinite thread pool. Multiple Threads are created if many requests exist. The following is an example:

threadpool:     index:         type: cached

Fixed
The fixed thread pool maintains a fixed number of threads to process request queues.
The size parameter sets the number of threads. The default setting is 5 times the number of CPU cores.
Queue_size can control the size of the queue to be processed. The default value is-1, which means no limit. When a request arrives but the queue is full, the reject_policy parameter can control its behavior. The default value is abort, which will cause the request to fail. If it is set to caller, the request will be executed in the IO thread.

threadpool:     index:         type: fixed         size: 30         queue: 1000         reject_policy: caller

Blocking
The blocking thread pool allows you to set a minimum value (min, 1 by default) and a thread pool size (size, 5 times the number of CPU cores by default ). It also has a waiting queue. The queue size (queue_size) is 1000 by default. When the queue is full. It will call the IO thread Based on the specified wait time (wait_time, 60 seconds by default). If the thread is not executed, an error will be reported.

threadpool:     index:         type: blocking         min: 1         size: 30         wait_time: 30s

References: http://www.searchtech.pro/articles/2013/02/15/1360942982347.html

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.