# Long query starving other small queries and slowing down the cluster

**URL:** <https://discuss.elastic.co/t/long-query-starving-other-small-queries-and-slowing-down-the-cluster/163665>\
**Category:** Elasticsearch\
**Created:** [January 10, 2019, 7:18am UTC](https://discuss.elastic.co/t/long-query-starving-other-small-queries-and-slowing-down-the-cluster/163665 "2019-01-10T07:18:52Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![dextermorgan](https://avatars.discourse-cdn.com/v4/letter/d/65b543/32.png) [@dextermorgan](https://discuss.elastic.co/u/dextermorgan)\
**Post date:** [January 10, 2019, 7:18am UTC](https://discuss.elastic.co/t/long-query-starving-other-small-queries-and-slowing-down-the-cluster/163665/1 "2019-01-10T07:18:53Z")

</div>

Hi All,

I am on elastic search 5.4.

Problem -  
I run 4 parallel queries and get following response times -  
Q1 - 6234  
Q2 - 12787  
Q3 - 12881  
Q4 - 16933

When I run sequentially -  
Q1 - 4  
Q2 - 6  
Q3 - 761  
Q4 - 16569

Setup  
4 i3.4x nodes with 31G to ES and rest 30 G for FS and with 16 search threads per node.

As we can see, one long query is slowing down/starving rest of queries. Now my question is, is there a way if we can optionally fix search threads per query so that other small queries still get executed in justified time?

---

<div class="post-metadata">

**Author:** ![dextermorgan](https://avatars.discourse-cdn.com/v4/letter/d/65b543/32.png) [@dextermorgan](https://discuss.elastic.co/u/dextermorgan)\
**Post date:** [January 16, 2019, 12:05pm UTC](https://discuss.elastic.co/t/long-query-starving-other-small-queries-and-slowing-down-the-cluster/163665/2 "2019-01-16T12:05:32Z")

</div>

Can anyone answer this?

Thanks

---

<div class="post-metadata">

**Author:** ![Christian\_Dahlqvist](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/christian_dahlqvist/32/4617_2.png) [@Christian\_Dahlqvist](https://discuss.elastic.co/u/Christian_Dahlqvist)\
**Post date:** [January 16, 2019, 12:10pm UTC](https://discuss.elastic.co/t/long-query-starving-other-small-queries-and-slowing-down-the-cluster/163665/3 "2019-01-16T12:10:10Z")

</div>

No, as far as I know that is not possible.

---

<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:** [February 13, 2019, 12:10pm UTC](https://discuss.elastic.co/t/long-query-starving-other-small-queries-and-slowing-down-the-cluster/163665/4 "2019-02-13T12:10:13Z")

</div>

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