# How to increase the thread pool size

**URL:** <https://discuss.elastic.co/t/how-to-increase-the-thread-pool-size/365433>\
**Category:** Elasticsearch\
**Created:** [August 23, 2024, 7:26am UTC](https://discuss.elastic.co/t/how-to-increase-the-thread-pool-size/365433 "2024-08-23T07:26:21Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![Rakhshunda\_Noorein\_J](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/rakhshunda_noorein_j/32/99407_2.png) [@Rakhshunda\_Noorein\_J](https://discuss.elastic.co/u/Rakhshunda_Noorein_J)\
**Post date:** [August 23, 2024, 7:26am UTC](https://discuss.elastic.co/t/how-to-increase-the-thread-pool-size/365433/1 "2024-08-23T07:26:21Z")

</div>

Hey,  
My elasticsearch cluster has 1 node with 3 processors, 32gb ram memory, 24 index with 1 shard each.  
Thread pool queue size = 1000

how many concurrent search requests my cluster can handle?

How can I increase the concurrent requests and thread pool size?

---

<div class="post-metadata">

**Author:** ![yago82](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/yago82/32/97755_2.png) [@yago82](https://discuss.elastic.co/u/yago82)\
**Post date:** [August 23, 2024, 7:45am UTC](https://discuss.elastic.co/t/how-to-increase-the-thread-pool-size/365433/2 "2024-08-23T07:45:29Z")

</div>

> [@Rakhshunda\_Noorein\_J](#):
>
> Hey,  
> My elasticsearch cluster has 1 node with 3 processors, 32gb ram memory, 24 index with 1 shard each.  
> Thread pool queue size = 1000
> 
> how many concurrent search requests my cluster can handle?
> 
> How can I increase the concurrent requests and thread pool size?

Hi,

you can try this:

> **[Thread pools | Elasticsearch Guide \[8.15\] | Elastic](https://www.elastic.co/guide/en/elasticsearch/reference/current/modules-threadpool.html)**

Regards

---

<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:** [August 23, 2024, 7:56am UTC](https://discuss.elastic.co/t/how-to-increase-the-thread-pool-size/365433/3 "2024-08-23T07:56:49Z")

</div>

The default threadpool sizes are generally good, so increasing them may not alleviate performance issues. If you do not have enough system resources in terms of CPU cores or storage IOPS, splitting CPU resources across more threads may actually decrease performance.

What is the total size of the 24 indices? Are queries searching only a small subset of these indices? Do the indices hold different types of data?

---

<div class="post-metadata">

**Author:** ![Rakhshunda\_Noorein\_J](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/rakhshunda_noorein_j/32/99407_2.png) [@Rakhshunda\_Noorein\_J](https://discuss.elastic.co/u/Rakhshunda_Noorein_J)\
**Post date:** [August 23, 2024, 8:25am UTC](https://discuss.elastic.co/t/how-to-increase-the-thread-pool-size/365433/4 "2024-08-23T08:25:30Z")

</div>

yes indices contains different types of data.  
Total index size will be approx - 2-3 GB data.

---

<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:** [August 23, 2024, 8:28am UTC](https://discuss.elastic.co/t/how-to-increase-the-thread-pool-size/365433/5 "2024-08-23T08:28:48Z")

</div>

Is the size of the 24 indices 2-3 GB in total size or around 2-3 GB each?

Are there mapping conflicts across the indices or would it be possble to merge some of them?

How many indices does each query on average search?

If you want to serve a alarge number of concurrent queries it is important to try and minimise disk I/O. Ideally your full data set should fit in the operating system page cache, and to get to this point you may want to reduce the heap size from the default 50%, but make sure you have enough spare room for your queries so you do not suffer from long or frequent GC.

If your queries are searching many indices you may also want to look into comnining indices to reduce this as this will reduce the number of slots in the queue each query takes up.

---

<div class="post-metadata">

**Author:** ![Rakhshunda\_Noorein\_J](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/rakhshunda_noorein_j/32/99407_2.png) [@Rakhshunda\_Noorein\_J](https://discuss.elastic.co/u/Rakhshunda_Noorein_J)\
**Post date:** [August 23, 2024, 10:28am UTC](https://discuss.elastic.co/t/how-to-increase-the-thread-pool-size/365433/6 "2024-08-23T10:28:11Z")

</div>

2-3 GB in total.

yes all my indices contains the same mapping. so i can merge it to 1 index with 1 shard allotment.

---

<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:** [August 23, 2024, 10:35am UTC](https://discuss.elastic.co/t/how-to-increase-the-thread-pool-size/365433/7 "2024-08-23T10:35:29Z")

</div>

If your queries target more than one index I would merge them into a single shard. The sizeyou specified is small enough so it fits in the page cache without changing the heap size.

If you do this I would expect you to be limited by CPU. Increasing the number of threads will in that case likely not improve performance, so if you are not able to handle the number of concurrent queries you need to support you may need to allocate more CPU.

---

<div class="post-metadata">

**Author:** ![Rakhshunda\_Noorein\_J](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/rakhshunda_noorein_j/32/99407_2.png) [@Rakhshunda\_Noorein\_J](https://discuss.elastic.co/u/Rakhshunda_Noorein_J)\
**Post date:** [August 23, 2024, 10:37am UTC](https://discuss.elastic.co/t/how-to-increase-the-thread-pool-size/365433/8 "2024-08-23T10:37:46Z")

</div>

ok got it.

Thank alotss for helping out.
