# How to find the thread pool size of an ElasticSearch cluster?

**URL:** <https://discuss.elastic.co/t/how-to-find-the-thread-pool-size-of-an-elasticsearch-cluster/20336>\
**Category:** Elasticsearch\
**Created:** [October 20, 2014, 10:09am UTC](https://discuss.elastic.co/t/how-to-find-the-thread-pool-size-of-an-elasticsearch-cluster/20336 "2014-10-20T10:09:54Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![truong\_ha](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/truong_ha/32/1175_2.png) [@truong\_ha](https://discuss.elastic.co/u/truong_ha)\
**Post date:** [October 20, 2014, 10:09am UTC](https://discuss.elastic.co/t/how-to-find-the-thread-pool-size-of-an-elasticsearch-cluster/20336/1 "2014-10-20T10:09:54Z")

</div>

I'm writing the concurrent code to send bulk index to ElasticSearch, and  
sending this query to get the thread pool size:

GET /\_cat/thread\_pool?v&h=host,bulk.active,bulk.queueSize

The response is

host bulk.active bulk.queueSize  
1D4HPY1 0 50  
1D4HPY2 0 50  
1D4HPY3 0 50  
1D4HPY4 0 50

So how can I calculate the actual pool size of that cluster? Is it the sum  
of all hosts which means 200?

--  
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/e6e48fe3-6269-493c-9258-fdc97baeb27e%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/e6e48fe3-6269-493c-9258-fdc97baeb27e%40googlegroups.com).  
For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

---

<div class="post-metadata">

**Author:** ![jprante](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/jprante/32/44941_2.png) [@jprante](https://discuss.elastic.co/u/jprante)\
**Post date:** [October 20, 2014, 11:09am UTC](https://discuss.elastic.co/t/how-to-find-the-thread-pool-size-of-an-elasticsearch-cluster/20336/2 "2014-10-20T11:09:19Z")

</div>

bulk.queueSize is the maximum size before requests are rejected.

Jörg

On Mon, Oct 20, 2014 at 12:09 PM, truong ha [truonghatsts@gmail.com](mailto:truonghatsts@gmail.com) wrote:

> I'm writing the concurrent code to send bulk index to Elasticsearch, and  
> sending this query to get the thread pool size:
> 
> GET /\_cat/thread\_pool?v&h=host,bulk.active,bulk.queueSize
> 
> The response is
> 
> host bulk.active bulk.queueSize  
> 1D4HPY1 0 50  
> 1D4HPY2 0 50  
> 1D4HPY3 0 50  
> 1D4HPY4 0 50
> 
> So how can I calculate the actual pool size of that cluster? Is it the sum  
> of all hosts which means 200?
> 
> --  
> 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/e6e48fe3-6269-493c-9258-fdc97baeb27e%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/e6e48fe3-6269-493c-9258-fdc97baeb27e%40googlegroups.com)  
> [https://groups.google.com/d/msgid/elasticsearch/e6e48fe3-6269-493c-9258-fdc97baeb27e%40googlegroups.com?utm\_medium=email&utm\_source=footer](https://groups.google.com/d/msgid/elasticsearch/e6e48fe3-6269-493c-9258-fdc97baeb27e%40googlegroups.com?utm_medium=email&utm_source=footer)  
> .  
> For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

--  
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/CAKdsXoHBLvxUvLweqDQUQOs2bP6OxJPs3TgJkFLKWk%2BZi6Bgkg%40mail.gmail.com](https://groups.google.com/d/msgid/elasticsearch/CAKdsXoHBLvxUvLweqDQUQOs2bP6OxJPs3TgJkFLKWk%2BZi6Bgkg%40mail.gmail.com).  
For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

---

<div class="post-metadata">

**Author:** ![truong\_ha](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/truong_ha/32/1175_2.png) [@truong\_ha](https://discuss.elastic.co/u/truong_ha)\
**Post date:** [October 20, 2014, 1:57pm UTC](https://discuss.elastic.co/t/how-to-find-the-thread-pool-size-of-an-elasticsearch-cluster/20336/3 "2014-10-20T13:57:40Z")

</div>

So in my case, which is the maximum requests I can send: _200 or 50_?

On Monday, 20 October 2014 18:09:28 UTC+7, Jörg Prante wrote:

> bulk.queueSize is the maximum size before requests are rejected.
> 
> Jörg
> 
> On Mon, Oct 20, 2014 at 12:09 PM, truong ha \<[truong...@gmail.com](mailto:truong...@gmail.com)  
> \<javascript:\>\> wrote:
> 
> > I'm writing the concurrent code to send bulk index to Elasticsearch, and  
> > sending this query to get the thread pool size:
> > 
> > GET /\_cat/thread\_pool?v&h=host,bulk.active,bulk.queueSize
> > 
> > The response is
> > 
> > host bulk.active bulk.queueSize  
> > 1D4HPY1 0 50  
> > 1D4HPY2 0 50  
> > 1D4HPY3 0 50  
> > 1D4HPY4 0 50
> > 
> > So how can I calculate the actual pool size of that cluster? Is it the  
> > sum of all hosts which means 200?
> > 
> > --  
> > 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/e6e48fe3-6269-493c-9258-fdc97baeb27e%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/e6e48fe3-6269-493c-9258-fdc97baeb27e%40googlegroups.com)  
> > [https://groups.google.com/d/msgid/elasticsearch/e6e48fe3-6269-493c-9258-fdc97baeb27e%40googlegroups.com?utm\_medium=email&utm\_source=footer](https://groups.google.com/d/msgid/elasticsearch/e6e48fe3-6269-493c-9258-fdc97baeb27e%40googlegroups.com?utm_medium=email&utm_source=footer)  
> > .  
> > For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

--  
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/29373a56-dbe7-4afb-9733-78f3fbbf5c2d%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/29373a56-dbe7-4afb-9733-78f3fbbf5c2d%40googlegroups.com).  
For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

---

<div class="post-metadata">

**Author:** ![jprante](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/jprante/32/44941_2.png) [@jprante](https://discuss.elastic.co/u/jprante)\
**Post date:** [October 20, 2014, 3:25pm UTC](https://discuss.elastic.co/t/how-to-find-the-thread-pool-size-of-an-elasticsearch-cluster/20336/4 "2014-10-20T15:25:30Z")

</div>

This is not the maximum number of requests you can send. It means "when  
bulk indexing on a node gets too busy and must be queued, the maximum  
number of actions that are allowed to queue up before a client is notified  
of rejections is 50".

Jörg

On Mon, Oct 20, 2014 at 3:57 PM, truong ha [truonghatsts@gmail.com](mailto:truonghatsts@gmail.com) wrote:

> So in my case, which is the maximum requests I can send: _200 or 50_?
> 
> On Monday, 20 October 2014 18:09:28 UTC+7, Jörg Prante wrote:
> 
> > bulk.queueSize is the maximum size before requests are rejected.
> > 
> > Jörg
> > 
> > On Mon, Oct 20, 2014 at 12:09 PM, truong ha [truong...@gmail.com](mailto:truong...@gmail.com) wrote:
> > 
> > > I'm writing the concurrent code to send bulk index to Elasticsearch, and  
> > > sending this query to get the thread pool size:
> > > 
> > > GET /\_cat/thread\_pool?v&h=host,bulk.active,bulk.queueSize
> > > 
> > > The response is
> > > 
> > > host bulk.active bulk.queueSize  
> > > 1D4HPY1 0 50  
> > > 1D4HPY2 0 50  
> > > 1D4HPY3 0 50  
> > > 1D4HPY4 0 50
> > > 
> > > So how can I calculate the actual pool size of that cluster? Is it the  
> > > sum of all hosts which means 200?
> > > 
> > > --  
> > > 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).  
> > > To view this discussion on the web visit [https://groups.google.com/d/](https://groups.google.com/d/)  
> > > msgid/elasticsearch/e6e48fe3-6269-493c-9258-fdc97baeb27e%  
> > > [40googlegroups.com](http://40googlegroups.com)  
> > > [https://groups.google.com/d/msgid/elasticsearch/e6e48fe3-6269-493c-9258-fdc97baeb27e%40googlegroups.com?utm\_medium=email&utm\_source=footer](https://groups.google.com/d/msgid/elasticsearch/e6e48fe3-6269-493c-9258-fdc97baeb27e%40googlegroups.com?utm_medium=email&utm_source=footer)  
> > > .  
> > > For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).
> > 
> > --  
> > 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/29373a56-dbe7-4afb-9733-78f3fbbf5c2d%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/29373a56-dbe7-4afb-9733-78f3fbbf5c2d%40googlegroups.com)  
> > [https://groups.google.com/d/msgid/elasticsearch/29373a56-dbe7-4afb-9733-78f3fbbf5c2d%40googlegroups.com?utm\_medium=email&utm\_source=footer](https://groups.google.com/d/msgid/elasticsearch/29373a56-dbe7-4afb-9733-78f3fbbf5c2d%40googlegroups.com?utm_medium=email&utm_source=footer)  
> > .
> 
> For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

--  
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/CAKdsXoF%3D0RY90k%2BS7-Y-RNhcjshdSptWZUoPQx7GC5r0AMXJkg%40mail.gmail.com](https://groups.google.com/d/msgid/elasticsearch/CAKdsXoF%3D0RY90k%2BS7-Y-RNhcjshdSptWZUoPQx7GC5r0AMXJkg%40mail.gmail.com).  
For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

---

<div class="post-metadata">

**Author:** ![truong\_ha](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/truong_ha/32/1175_2.png) [@truong\_ha](https://discuss.elastic.co/u/truong_ha)\
**Post date:** [October 21, 2014, 6:33am UTC](https://discuss.elastic.co/t/how-to-find-the-thread-pool-size-of-an-elasticsearch-cluster/20336/5 "2014-10-21T06:33:36Z")

</div>

50 is the maximum for one node, so 200 is the maximum for the entire  
cluster right?

It means to avoid being rejected, I should gently send requests to the  
cluster, not to overwhelm the queue?

On Monday, 20 October 2014 22:27:26 UTC+7, Jörg Prante wrote:

> This is not the maximum number of requests you can send. It means "when  
> bulk indexing on a node gets too busy and must be queued, the maximum  
> number of actions that are allowed to queue up before a client is notified  
> of rejections is 50".
> 
> Jörg
> 
> On Mon, Oct 20, 2014 at 3:57 PM, truong ha \<[truong...@gmail.com](mailto:truong...@gmail.com)  
> \<javascript:\>\> wrote:
> 
> > So in my case, which is the maximum requests I can send: _200 or 50_?
> > 
> > On Monday, 20 October 2014 18:09:28 UTC+7, Jörg Prante wrote:
> > 
> > > bulk.queueSize is the maximum size before requests are rejected.
> > > 
> > > Jörg
> > > 
> > > On Mon, Oct 20, 2014 at 12:09 PM, truong ha [truong...@gmail.com](mailto:truong...@gmail.com) wrote:
> > > 
> > > > I'm writing the concurrent code to send bulk index to Elasticsearch,  
> > > > and sending this query to get the thread pool size:
> > > > 
> > > > GET /\_cat/thread\_pool?v&h=host,bulk.active,bulk.queueSize
> > > > 
> > > > The response is
> > > > 
> > > > host bulk.active bulk.queueSize  
> > > > 1D4HPY1 0 50  
> > > > 1D4HPY2 0 50  
> > > > 1D4HPY3 0 50  
> > > > 1D4HPY4 0 50
> > > > 
> > > > So how can I calculate the actual pool size of that cluster? Is it the  
> > > > sum of all hosts which means 200?
> > > > 
> > > > --  
> > > > 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).  
> > > > To view this discussion on the web visit [https://groups.google.com/d/](https://groups.google.com/d/)  
> > > > msgid/elasticsearch/e6e48fe3-6269-493c-9258-fdc97baeb27e%  
> > > > [40googlegroups.com](http://40googlegroups.com)  
> > > > [https://groups.google.com/d/msgid/elasticsearch/e6e48fe3-6269-493c-9258-fdc97baeb27e%40googlegroups.com?utm\_medium=email&utm\_source=footer](https://groups.google.com/d/msgid/elasticsearch/e6e48fe3-6269-493c-9258-fdc97baeb27e%40googlegroups.com?utm_medium=email&utm_source=footer)  
> > > > .  
> > > > For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).
> > > 
> > > --  
> > > 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/29373a56-dbe7-4afb-9733-78f3fbbf5c2d%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/29373a56-dbe7-4afb-9733-78f3fbbf5c2d%40googlegroups.com)  
> > > [https://groups.google.com/d/msgid/elasticsearch/29373a56-dbe7-4afb-9733-78f3fbbf5c2d%40googlegroups.com?utm\_medium=email&utm\_source=footer](https://groups.google.com/d/msgid/elasticsearch/29373a56-dbe7-4afb-9733-78f3fbbf5c2d%40googlegroups.com?utm_medium=email&utm_source=footer)  
> > > .
> > 
> > For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

--  
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/66161b58-eeca-4277-9e81-12f323a8181a%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/66161b58-eeca-4277-9e81-12f323a8181a%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:54am UTC](https://discuss.elastic.co/t/how-to-find-the-thread-pool-size-of-an-elasticsearch-cluster/20336/6 "2017-07-06T00:54:49Z")

</div>


