# ThreadPool Setting's for bulk indexing in elasticsearch.yml

**URL:** <https://discuss.elastic.co/t/threadpool-settings-for-bulk-indexing-in-elasticsearch-yml/48959>\
**Category:** Elasticsearch\
**Created:** [May 2, 2016, 2:05pm UTC](https://discuss.elastic.co/t/threadpool-settings-for-bulk-indexing-in-elasticsearch-yml/48959 "2016-05-02T14:05:01Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![moni15moni](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/moni15moni/32/42311_2.png) [@moni15moni](https://discuss.elastic.co/u/moni15moni)\
**Post date:** [May 2, 2016, 2:05pm UTC](https://discuss.elastic.co/t/threadpool-settings-for-bulk-indexing-in-elasticsearch-yml/48959/1 "2016-05-02T14:05:01Z")

</div>

Hi

I have configured the below settings in elasticsearch.yml as follows.

threadpool.bulk.type: fixed  
threadpool.bulk.size: 24  
threadpool.bulk.queue\_size: 1000

threadpool.search.type: fixed  
threadpool.search.size: 24  
threadpool.search.queue\_size: 50

The server spec is 24 CPU's and 64 GB RAM with 10 nodes, It has 150 shards with 15 Indexes.The heap memory allocated for elasticsearch is 31 GB. For the "threadpool.bulk.queue\_size: 1000" , how it is dealt with individual node. We had huge no of rejection threads in bulk indexing.

Is this settings need to be re-factor?

Thanks for you response in Advance ....

Thanks  
Mohan

---

<div class="post-metadata">

**Author:** ![Bruce\_Ritchie](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/bruce_ritchie/32/9370_2.png) [@Bruce\_Ritchie](https://discuss.elastic.co/u/Bruce_Ritchie)\
**Post date:** [May 2, 2016, 3:34pm UTC](https://discuss.elastic.co/t/threadpool-settings-for-bulk-indexing-in-elasticsearch-yml/48959/2 "2016-05-02T15:34:51Z")

</div>

If you're seeing rejections on bulk operations with those settings it's likely that you are submitting bulk requests at a much faster pace then ES on that hardware is able to service them.

Just to be clear, you're running 10 nodes with each of them on their own server, correct? What is your cluster configuration? Are you spreading the bulk requests against multiple master nodes?

---

<div class="post-metadata">

**Author:** ![moni15moni](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/moni15moni/32/42311_2.png) [@moni15moni](https://discuss.elastic.co/u/moni15moni)\
**Post date:** [May 3, 2016, 5:31am UTC](https://discuss.elastic.co/t/threadpool-settings-for-bulk-indexing-in-elasticsearch-yml/48959/3 "2016-05-03T05:31:03Z")

</div>

Cluster configuration is mentioned in below:-  
3 Master Nodes (8 CPU and 8 GB RAM)  
2 Dedicated client Nodes for searching( 4 CPU and 16 GB RAM)  
10 Data Nodes (24 CPU and 64 GB RAM)  
The bulk requests are spread in to this 10 data nodes from 10 Gateway Servers.For Daily volume of 5 Billion logs(2 TB of indexed Data).Which are stored in 15 indices of 150 shards.

We are not using master nodes for any search/index purposes.

---

<div class="post-metadata">

**Author:** ![Bruce\_Ritchie](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/bruce_ritchie/32/9370_2.png) [@Bruce\_Ritchie](https://discuss.elastic.co/u/Bruce_Ritchie)\
**Post date:** [May 3, 2016, 1:23pm UTC](https://discuss.elastic.co/t/threadpool-settings-for-bulk-indexing-in-elasticsearch-yml/48959/4 "2016-05-03T13:23:53Z")

</div>

I don't think changing the thread pool settings will help at all. If you install marvel, bigdesk, or elasticHQ what do those tell you? My suspicion is that your cluster is maxed out or the backing HDD's are just not enough to handle the load but without actually watching your cluster in action it may be hard to quickly tell you what the most likely cause or causes are.

---

<div class="post-metadata">

**Author:** ![ei-grad](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/ei-grad/32/5775_2.png) [@ei-grad](https://discuss.elastic.co/u/ei-grad)\
**Post date:** [June 3, 2016, 7:45pm UTC](https://discuss.elastic.co/t/threadpool-settings-for-bulk-indexing-in-elasticsearch-yml/48959/5 "2016-06-03T19:45:38Z")

</div>

How many bulk operations per second do you have? What is average bulk size? May be queue just fills up naturally for short periods of time during heavy merge/other IO/load bursts/etc periods, and it could be fixed by just increasing it more? Did you setup monitoring for queue\_size, what do you see in it?

Also, I'd rather suspect that your client nodes could be overloaded in such configuration. And, just in case, are you sure that you didn't forget to configure bulk.queue\_size on them?

// edit: ouch, 1month-old-topic...

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [July 5, 2017, 10:46pm UTC](https://discuss.elastic.co/t/threadpool-settings-for-bulk-indexing-in-elasticsearch-yml/48959/6 "2017-07-05T22:46:19Z")

</div>


