# Dynamic queue sizes

**URL:** <https://discuss.elastic.co/t/dynamic-queue-sizes/242418>\
**Category:** Elasticsearch\
**Created:** [July 23, 2020, 11:12pm UTC](https://discuss.elastic.co/t/dynamic-queue-sizes/242418 "2020-07-23T23:12:45Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![Ankit\_Malpani](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/ankit_malpani/32/14566_2.png) [@Ankit\_Malpani](https://discuss.elastic.co/u/Ankit_Malpani)\
**Post date:** [July 23, 2020, 11:12pm UTC](https://discuss.elastic.co/t/dynamic-queue-sizes/242418/1 "2020-07-23T23:12:45Z")

</div>

I wanted to hear thoughts on adding an API to make queues dynamic. I understand this is an advanced setting and there can be drawbacks to raising queue sizes etc. but a queue does help during bursty behaviors and even throughput in certain scenarios

On earlier versions, there used to be dynamic cluster settings to control this but it got removed with 5.x as clusters become heterogeneous node types with eg. hot/cold hardware and having a single dynamic cluster setting to control queues does not make sense.

Do you see value in keeping these dynamic at a node level? There could be attribute driven APIs to tweak them?

---

<div class="post-metadata">

**Author:** ![Ankit\_Malpani](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/ankit_malpani/32/14566_2.png) [@Ankit\_Malpani](https://discuss.elastic.co/u/Ankit_Malpani)\
**Post date:** [July 27, 2020, 7:28pm UTC](https://discuss.elastic.co/t/dynamic-queue-sizes/242418/2 "2020-07-27T19:28:27Z")

</div>

I will be happy to contribute a PR if such a feature might be interesting to broader users.

---

<div class="post-metadata">

**Author:** ![warkolm](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/warkolm/32/39224_2.png) [@warkolm](https://discuss.elastic.co/u/warkolm)\
**Post date:** [July 27, 2020, 10:34pm UTC](https://discuss.elastic.co/t/dynamic-queue-sizes/242418/3 "2020-07-27T22:34:07Z")

</div>

Are you talking about threadpools?

If so they are dynamic, in that they are based on the number of CPU threads on the system at start up and the [`max`](https://www.elastic.co/guide/en/elasticsearch/reference/current/modules-threadpool.html#scaling-thread-pool) value that you can define.

---

<div class="post-metadata">

**Author:** ![Ankit\_Malpani](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/ankit_malpani/32/14566_2.png) [@Ankit\_Malpani](https://discuss.elastic.co/u/Ankit_Malpani)\
**Post date:** [July 28, 2020, 8:01pm UTC](https://discuss.elastic.co/t/dynamic-queue-sizes/242418/4 "2020-07-28T20:01:52Z")

</div>

Yes, like you said today these thresholds can be defined on the yml and the node be restarted.

By dynamic - what i am proposing is to do these through a settings API without requiring node restarts.

---

<div class="post-metadata">

**Author:** ![warkolm](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/warkolm/32/39224_2.png) [@warkolm](https://discuss.elastic.co/u/warkolm)\
**Post date:** [July 28, 2020, 9:49pm UTC](https://discuss.elastic.co/t/dynamic-queue-sizes/242418/5 "2020-07-28T21:49:35Z")

</div>

I asked around about this and got some extra info;

> We removed the ability to dynamically change thread pool settings; most production clusters don’t have a homogenous set of nodes; there’s dedicated master nodes and hot vs. warm nodes and dedicated ML nodes and coordinating nodes which all might run on different underlying hardware, so it didn’t make sense for this to be cluster wide setting and thus it doesn’t make sense for it to be updatable via the api

Also related - [https://github.com/elastic/elasticsearch/pull/18674](https://github.com/elastic/elasticsearch/pull/18674)

---

<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:** [August 25, 2020, 9:49pm UTC](https://discuss.elastic.co/t/dynamic-queue-sizes/242418/6 "2020-08-25T21:49:36Z")

</div>

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.
