# Threadpool sizes

**URL:** <https://discuss.elastic.co/t/threadpool-sizes/23221>\
**Category:** Elasticsearch\
**Created:** [April 14, 2015, 1:57am UTC](https://discuss.elastic.co/t/threadpool-sizes/23221 "2015-04-14T01:57:57Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Debayan\_Banerjee](https://avatars.discourse-cdn.com/v4/letter/d/58f4c7/32.png) [@Debayan\_Banerjee](https://discuss.elastic.co/u/Debayan_Banerjee)\
**Post date:** [April 14, 2015, 1:57am UTC](https://discuss.elastic.co/t/threadpool-sizes/23221/1 "2015-04-14T01:57:57Z")

</div>

I have a setup where there is occasional heavy indexing but it is critical  
to continue serving read requests. Would it then be a good idea to assign  
only n-1 cores to index and bulk threadpools (n-1 threadpool size) while  
leave one core free for just search?

--

Debayan Banerjee

--  
You received this message because you are subscribed to the Google Groups "elasticsearch" group.  
To unsubscribe from this group and stop receiving emails from it, send an email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
To view this discussion on the web visit [https://groups.google.com/d/msgid/elasticsearch/CAOvawCs%3D89nX06iBUYE4AFw%3D2dTX%2Byjg7qjeoxSHFZNJdGzspQ%40mail.gmail.com](https://groups.google.com/d/msgid/elasticsearch/CAOvawCs%3D89nX06iBUYE4AFw%3D2dTX%2Byjg7qjeoxSHFZNJdGzspQ%40mail.gmail.com).  
For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

---

<div class="post-metadata">

**Author:** ![jpountz](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/jpountz/32/45836_2.png) [@jpountz](https://discuss.elastic.co/u/jpountz)\
**Post date:** [April 14, 2015, 2:07pm UTC](https://discuss.elastic.co/t/threadpool-sizes/23221/2 "2015-04-14T14:07:39Z")

</div>

Unfortunately it would not be enough since there are also merging threads  
that take CPI and I/O. I would recommend to stick with the defaults and  
only try to change settings if you observe latency spikes at search time  
which are due to indexing.

On Tue, Apr 14, 2015 at 3:57 AM, Debayan Banerjee \<  
[debayan.banerjee@paytm.com](mailto:debayan.banerjee@paytm.com)\> wrote:

> I have a setup where there is occasional heavy indexing but it is critical  
> to continue serving read requests. Would it then be a good idea to assign  
> only n-1 cores to index and bulk threadpools (n-1 threadpool size) while  
> leave one core free for just search?
> 
> --
> 
> Debayan Banerjee
> 
> --  
> You received this message because you are subscribed to the Google Groups  
> "elasticsearch" group.  
> To unsubscribe from this group and stop receiving emails from it, send an  
> email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
> To view this discussion on the web visit  
> [https://groups.google.com/d/msgid/elasticsearch/CAOvawCs%3D89nX06iBUYE4AFw%3D2dTX%2Byjg7qjeoxSHFZNJdGzspQ%40mail.gmail.com](https://groups.google.com/d/msgid/elasticsearch/CAOvawCs%3D89nX06iBUYE4AFw%3D2dTX%2Byjg7qjeoxSHFZNJdGzspQ%40mail.gmail.com)  
> [https://groups.google.com/d/msgid/elasticsearch/CAOvawCs%3D89nX06iBUYE4AFw%3D2dTX%2Byjg7qjeoxSHFZNJdGzspQ%40mail.gmail.com?utm\_medium=email&utm\_source=footer](https://groups.google.com/d/msgid/elasticsearch/CAOvawCs%3D89nX06iBUYE4AFw%3D2dTX%2Byjg7qjeoxSHFZNJdGzspQ%40mail.gmail.com?utm_medium=email&utm_source=footer)  
> .  
> For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

--  
Adrien

--  
You received this message because you are subscribed to the Google Groups "elasticsearch" group.  
To unsubscribe from this group and stop receiving emails from it, send an email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
To view this discussion on the web visit [https://groups.google.com/d/msgid/elasticsearch/CAO5%3DkAhJ\_TA%3D2aWAeXPJH-XEX9UH945R2%3DyoqLwwTCmQ8-HAug%40mail.gmail.com](https://groups.google.com/d/msgid/elasticsearch/CAO5%3DkAhJ_TA%3D2aWAeXPJH-XEX9UH945R2%3DyoqLwwTCmQ8-HAug%40mail.gmail.com).  
For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

---

<div class="post-metadata">

**Author:** ![Debayan\_Banerjee](https://avatars.discourse-cdn.com/v4/letter/d/58f4c7/32.png) [@Debayan\_Banerjee](https://discuss.elastic.co/u/Debayan_Banerjee)\
**Post date:** [April 15, 2015, 5:09am UTC](https://discuss.elastic.co/t/threadpool-sizes/23221/3 "2015-04-15T05:09:57Z")

</div>

I do observe latency spikes, and massive cluster outages during bulk  
indexing. I have moved to giving only 1 thread each to bulk and index  
pools. It is now a 4 core machine so I guess I have 2 cores free for search.

What are the other thread pools that can misbehave? Refresh, merge?

On Tue, Apr 14, 2015 at 7:37 PM, Adrien Grand [adrien@elastic.co](mailto:adrien@elastic.co) wrote:

> Unfortunately it would not be enough since there are also merging threads  
> that take CPI and I/O. I would recommend to stick with the defaults and  
> only try to change settings if you observe latency spikes at search time  
> which are due to indexing.
> 
> On Tue, Apr 14, 2015 at 3:57 AM, Debayan Banerjee \<  
> [debayan.banerjee@paytm.com](mailto:debayan.banerjee@paytm.com)\> wrote:
> 
> > I have a setup where there is occasional heavy indexing but it is  
> > critical to continue serving read requests. Would it then be a good idea to  
> > assign only n-1 cores to index and bulk threadpools (n-1 threadpool size)  
> > while leave one core free for just search?
> > 
> > --
> > 
> > Debayan Banerjee
> > 
> > --  
> > You received this message because you are subscribed to the Google Groups  
> > "elasticsearch" group.  
> > To unsubscribe from this group and stop receiving emails from it, send an  
> > email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
> > To view this discussion on the web visit  
> > [https://groups.google.com/d/msgid/elasticsearch/CAOvawCs%3D89nX06iBUYE4AFw%3D2dTX%2Byjg7qjeoxSHFZNJdGzspQ%40mail.gmail.com](https://groups.google.com/d/msgid/elasticsearch/CAOvawCs%3D89nX06iBUYE4AFw%3D2dTX%2Byjg7qjeoxSHFZNJdGzspQ%40mail.gmail.com)  
> > [https://groups.google.com/d/msgid/elasticsearch/CAOvawCs%3D89nX06iBUYE4AFw%3D2dTX%2Byjg7qjeoxSHFZNJdGzspQ%40mail.gmail.com?utm\_medium=email&utm\_source=footer](https://groups.google.com/d/msgid/elasticsearch/CAOvawCs%3D89nX06iBUYE4AFw%3D2dTX%2Byjg7qjeoxSHFZNJdGzspQ%40mail.gmail.com?utm_medium=email&utm_source=footer)  
> > .  
> > For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).
> 
> --  
> Adrien
> 
> --  
> You received this message because you are subscribed to the Google Groups  
> "elasticsearch" group.  
> To unsubscribe from this group and stop receiving emails from it, send an  
> email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
> To view this discussion on the web visit  
> [https://groups.google.com/d/msgid/elasticsearch/CAO5%3DkAhJ\_TA%3D2aWAeXPJH-XEX9UH945R2%3DyoqLwwTCmQ8-HAug%40mail.gmail.com](https://groups.google.com/d/msgid/elasticsearch/CAO5%3DkAhJ_TA%3D2aWAeXPJH-XEX9UH945R2%3DyoqLwwTCmQ8-HAug%40mail.gmail.com)  
> [https://groups.google.com/d/msgid/elasticsearch/CAO5%3DkAhJ\_TA%3D2aWAeXPJH-XEX9UH945R2%3DyoqLwwTCmQ8-HAug%40mail.gmail.com?utm\_medium=email&utm\_source=footer](https://groups.google.com/d/msgid/elasticsearch/CAO5%3DkAhJ_TA%3D2aWAeXPJH-XEX9UH945R2%3DyoqLwwTCmQ8-HAug%40mail.gmail.com?utm_medium=email&utm_source=footer)  
> .  
> For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

--

Debayan Banerjee  
devOps engineer  
+91 8800846550

--  
You received this message because you are subscribed to the Google Groups "elasticsearch" group.  
To unsubscribe from this group and stop receiving emails from it, send an email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
To view this discussion on the web visit [https://groups.google.com/d/msgid/elasticsearch/CAOvawCuojF5DjUO7QEFOD1iUwzxWbOOywGUahm4P5BU-YKNzLQ%40mail.gmail.com](https://groups.google.com/d/msgid/elasticsearch/CAOvawCuojF5DjUO7QEFOD1iUwzxWbOOywGUahm4P5BU-YKNzLQ%40mail.gmail.com).  
For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

---

<div class="post-metadata">

**Author:** ![otisg](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/otisg/32/492_2.png) [@otisg](https://discuss.elastic.co/u/otisg)\
**Post date:** [April 18, 2015, 3:49am UTC](https://discuss.elastic.co/t/threadpool-sizes/23221/4 "2015-04-18T03:49:39Z")

</div>

Yes, merges can hurt, but you can throttle  
them: [http://search-lucene.com/?q=throttle+merge&fc\_project=ElasticSearch](http://search-lucene.com/?q=throttle+merge&fc_project=ElasticSearch)  
You can easily correlate search latency with merges, flushes, and refreshes  
with something like SPM for Elasticsearch. This could help you figure out  
how much you need to throttle merges.

## Otis

Monitoring \* Alerting \* Anomaly Detection \* Centralized Log Management  
Solr & Elasticsearch Support \* [http://sematext.com/](http://sematext.com/)

On Wednesday, April 15, 2015 at 1:10:04 AM UTC-4, Debayan Banerjee wrote:

> I do observe latency spikes, and massive cluster outages during bulk  
> indexing. I have moved to giving only 1 thread each to bulk and index  
> pools. It is now a 4 core machine so I guess I have 2 cores free for search.
> 
> What are the other thread pools that can misbehave? Refresh, merge?
> 
> On Tue, Apr 14, 2015 at 7:37 PM, Adrien Grand \<[adr...@elastic.co](mailto:adr...@elastic.co)  
> \<javascript:\>\> wrote:
> 
> > Unfortunately it would not be enough since there are also merging threads  
> > that take CPI and I/O. I would recommend to stick with the defaults and  
> > only try to change settings if you observe latency spikes at search time  
> > which are due to indexing.
> > 
> > On Tue, Apr 14, 2015 at 3:57 AM, Debayan Banerjee \<[debayan....@paytm.com](mailto:debayan....@paytm.com)  
> > \<javascript:\>\> wrote:
> > 
> > > I have a setup where there is occasional heavy indexing but it is  
> > > critical to continue serving read requests. Would it then be a good idea to  
> > > assign only n-1 cores to index and bulk threadpools (n-1 threadpool size)  
> > > while leave one core free for just search?
> > > 
> > > --
> > > 
> > > Debayan Banerjee
> > > 
> > > --  
> > > You received this message because you are subscribed to the Google  
> > > Groups "elasticsearch" group.  
> > > To unsubscribe from this group and stop receiving emails from it, send  
> > > an email to [elasticsearc...@googlegroups.com](mailto:elasticsearc...@googlegroups.com) \<javascript:\>.  
> > > To view this discussion on the web visit  
> > > [https://groups.google.com/d/msgid/elasticsearch/CAOvawCs%3D89nX06iBUYE4AFw%3D2dTX%2Byjg7qjeoxSHFZNJdGzspQ%40mail.gmail.com](https://groups.google.com/d/msgid/elasticsearch/CAOvawCs%3D89nX06iBUYE4AFw%3D2dTX%2Byjg7qjeoxSHFZNJdGzspQ%40mail.gmail.com)  
> > > [https://groups.google.com/d/msgid/elasticsearch/CAOvawCs%3D89nX06iBUYE4AFw%3D2dTX%2Byjg7qjeoxSHFZNJdGzspQ%40mail.gmail.com?utm\_medium=email&utm\_source=footer](https://groups.google.com/d/msgid/elasticsearch/CAOvawCs%3D89nX06iBUYE4AFw%3D2dTX%2Byjg7qjeoxSHFZNJdGzspQ%40mail.gmail.com?utm_medium=email&utm_source=footer)  
> > > .  
> > > For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).
> > 
> > --  
> > Adrien
> > 
> > --  
> > You received this message because you are subscribed to the Google Groups  
> > "elasticsearch" group.  
> > To unsubscribe from this group and stop receiving emails from it, send an  
> > email to [elasticsearc...@googlegroups.com](mailto:elasticsearc...@googlegroups.com) \<javascript:\>.  
> > To view this discussion on the web visit  
> > [https://groups.google.com/d/msgid/elasticsearch/CAO5%3DkAhJ\_TA%3D2aWAeXPJH-XEX9UH945R2%3DyoqLwwTCmQ8-HAug%40mail.gmail.com](https://groups.google.com/d/msgid/elasticsearch/CAO5%3DkAhJ_TA%3D2aWAeXPJH-XEX9UH945R2%3DyoqLwwTCmQ8-HAug%40mail.gmail.com)  
> > [https://groups.google.com/d/msgid/elasticsearch/CAO5%3DkAhJ\_TA%3D2aWAeXPJH-XEX9UH945R2%3DyoqLwwTCmQ8-HAug%40mail.gmail.com?utm\_medium=email&utm\_source=footer](https://groups.google.com/d/msgid/elasticsearch/CAO5%3DkAhJ_TA%3D2aWAeXPJH-XEX9UH945R2%3DyoqLwwTCmQ8-HAug%40mail.gmail.com?utm_medium=email&utm_source=footer)  
> > .  
> > For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).
> 
> --
> 
> Debayan Banerjee  
> devOps engineer  
> +91 8800846550

--  
You received this message because you are subscribed to the Google Groups "elasticsearch" group.  
To unsubscribe from this group and stop receiving emails from it, send an email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
To view this discussion on the web visit [https://groups.google.com/d/msgid/elasticsearch/4570c610-b3c7-4641-8b8b-81fc1b098b4c%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/4570c610-b3c7-4641-8b8b-81fc1b098b4c%40googlegroups.com).  
For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

---

<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 6, 2017, 12:18am UTC](https://discuss.elastic.co/t/threadpool-sizes/23221/5 "2017-07-06T00:18:57Z")

</div>


