# Search performance - Scaling options Horizontally vs Vertically

**URL:** <https://discuss.elastic.co/t/search-performance-scaling-options-horizontally-vs-vertically/19828>\
**Category:** Elasticsearch\
**Created:** [September 16, 2014, 11:03pm UTC](https://discuss.elastic.co/t/search-performance-scaling-options-horizontally-vs-vertically/19828 "2014-09-16T23:03:05Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![pavan\_bkv](https://avatars.discourse-cdn.com/v4/letter/p/6a8cbe/32.png) [@pavan\_bkv](https://discuss.elastic.co/u/pavan_bkv)\
**Post date:** [September 16, 2014, 11:03pm UTC](https://discuss.elastic.co/t/search-performance-scaling-options-horizontally-vs-vertically/19828/1 "2014-09-16T23:03:05Z")

</div>

I have observed that elastic search defaults the search thread pool to 3 X  
#of CPUs and even if you increase this to a fix # it does not really help  
as the threads start sharing the CPU cycles.

Does this mean that to get same performance results for more concurrent searches  
I either have to scale vertically by adding more CPU cores or horizontally  
by increasing the nodes and replica's to eliviate the search times by shard  
to replica shards?

Here is my situation:  
I have a 6 node ES cluster with 6 shards storing a total of 60 million  
documents (around 2kb each) and index size of around 32 GB. Each node is a  
VM with 4 vCPUs and 8 GB allocated to ES cluster. When I have 15 concurrent users  
the response is around 270 ms and I see that all 12 threads in the search  
pool are busy. If I increase the number of concurrent users for the search  
the response time keeps going higher and higher and there is more requests  
pending in the search queue. I even increased the thread pool configuration  
but it really did not help.

--  
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/93823925-fcfb-4b6d-b4b6-42332242924c%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/93823925-fcfb-4b6d-b4b6-42332242924c%40googlegroups.com).  
For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

---

<div class="post-metadata">

**Author:** ![pavan\_bkv](https://avatars.discourse-cdn.com/v4/letter/p/6a8cbe/32.png) [@pavan\_bkv](https://discuss.elastic.co/u/pavan_bkv)\
**Post date:** [September 23, 2014, 10:24pm UTC](https://discuss.elastic.co/t/search-performance-scaling-options-horizontally-vs-vertically/19828/2 "2014-09-23T22:24:36Z")

</div>

Can anyone answer this?

---

<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:** [September 24, 2014, 9:52pm UTC](https://discuss.elastic.co/t/search-performance-scaling-options-horizontally-vs-vertically/19828/3 "2014-09-24T21:52:45Z")

</div>

ES does scale better horizontally.

Regards,  
Mark Walkom

Infrastructure Engineer  
Campaign Monitor  
email: [markw@campaignmonitor.com](mailto:markw@campaignmonitor.com)  
web: [www.campaignmonitor.com](http://www.campaignmonitor.com)

On 24 September 2014 08:24, pavan.bkv [pavan.bkv@gmail.com](mailto:pavan.bkv@gmail.com) wrote:

> Can anyone answer this?
> 
> --  
> View this message in context:  
> [http://elasticsearch-users.115913.n3.nabble.com/Search-performance-Scaling-options-Horizontally-vs-Vertically-tp4063612p4063922.html](http://elasticsearch-users.115913.n3.nabble.com/Search-performance-Scaling-options-Horizontally-vs-Vertically-tp4063612p4063922.html)  
> Sent from the Elasticsearch Users mailing list archive at [Nabble.com](http://Nabble.com).
> 
> --  
> 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/1411511076978-4063922.post%40n3.nabble.com](https://groups.google.com/d/msgid/elasticsearch/1411511076978-4063922.post%40n3.nabble.com)  
> .  
> 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/CAEM624ZUfM50CMk2XBiGpWLRY9bBH7xoN16nrQiH8gC5TbQHtw%40mail.gmail.com](https://groups.google.com/d/msgid/elasticsearch/CAEM624ZUfM50CMk2XBiGpWLRY9bBH7xoN16nrQiH8gC5TbQHtw%40mail.gmail.com).  
For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

---

<div class="post-metadata">

**Author:** ![pavan\_bkv](https://avatars.discourse-cdn.com/v4/letter/p/6a8cbe/32.png) [@pavan\_bkv](https://discuss.elastic.co/u/pavan_bkv)\
**Post date:** [September 24, 2014, 9:58pm UTC](https://discuss.elastic.co/t/search-performance-scaling-options-horizontally-vs-vertically/19828/4 "2014-09-24T21:58:32Z")

</div>

Thanks Mark. Appreciate the response.

Is there a template which certifies the TPS and # of users in relation to performance and scaling that I could refer to. May be some bench marks or common practices? I understand that it varies by index types and nature of searches. But wanted to see if there are general guidelines for scaling and certification on TPS/number of concurrent users.

Warm Regards,  
Pavan

---

<div class="post-metadata">

**Author:** ![Anne\_Veling](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/anne_veling/32/1260_2.png) [@Anne\_Veling](https://discuss.elastic.co/u/Anne_Veling)\
**Post date:** [September 25, 2014, 1:50pm UTC](https://discuss.elastic.co/t/search-performance-scaling-options-horizontally-vs-vertically/19828/5 "2014-09-25T13:50:25Z")

</div>

Scaling horizontally (after you have tuned the existing nodes correctly) is  
one of the design principles of Elasticsearch, yes.

You can actually increase the search throughput, even if you do not want to  
increase disk requirements or increase the number of replicas, by adding  
new Elasticsearch nodes or processes (maybe even on the same node?) with  
"node.data = false", so they only serve as search nodes?

If that is not what you want, either asking someone to tune your current  
nodes, or adding new nodes is the way forward

Anne

On Wed, Sep 24, 2014 at 12:24 AM, pavan.bkv [pavan.bkv@gmail.com](mailto:pavan.bkv@gmail.com) wrote:

> Can anyone answer this?
> 
> --  
> View this message in context:  
> [http://elasticsearch-users.115913.n3.nabble.com/Search-performance-Scaling-options-Horizontally-vs-Vertically-tp4063612p4063922.html](http://elasticsearch-users.115913.n3.nabble.com/Search-performance-Scaling-options-Horizontally-vs-Vertically-tp4063612p4063922.html)  
> Sent from the Elasticsearch Users mailing list archive at [Nabble.com](http://Nabble.com).
> 
> --  
> 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/1411511076978-4063922.post%40n3.nabble.com](https://groups.google.com/d/msgid/elasticsearch/1411511076978-4063922.post%40n3.nabble.com)  
> .  
> For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

--  
Anne Veling  
[BeyondTrees.com](http://BeyondTrees.com)  
+31 6 50 969 170  
@anneveling

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

---

<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:** [September 25, 2014, 10:08pm UTC](https://discuss.elastic.co/t/search-performance-scaling-options-horizontally-vs-vertically/19828/6 "2014-09-25T22:08:42Z")

</div>

There are a few blog posts, but nothing consolidated.

Regards,  
Mark Walkom

Infrastructure Engineer  
Campaign Monitor  
email: [markw@campaignmonitor.com](mailto:markw@campaignmonitor.com)  
web: [www.campaignmonitor.com](http://www.campaignmonitor.com)

On 25 September 2014 07:58, pavan.bkv [pavan.bkv@gmail.com](mailto:pavan.bkv@gmail.com) wrote:

> Thanks Mark. Appreciate the response.
> 
> Is there a template which certifies the TPS and # of users in relation to  
> performance and scaling that I could refer to. May be some bench marks or  
> common practices? I understand that it varies by index types and nature of  
> searches. But wanted to see if there are general guidelines for scaling and  
> certification on TPS/number of concurrent users.
> 
> Warm Regards,  
> Pavan
> 
> --  
> View this message in context:  
> [http://elasticsearch-users.115913.n3.nabble.com/Search-performance-Scaling-options-Horizontally-vs-Vertically-tp4063612p4063985.html](http://elasticsearch-users.115913.n3.nabble.com/Search-performance-Scaling-options-Horizontally-vs-Vertically-tp4063612p4063985.html)  
> Sent from the Elasticsearch Users mailing list archive at [Nabble.com](http://Nabble.com).
> 
> --  
> 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/1411595912790-4063985.post%40n3.nabble.com](https://groups.google.com/d/msgid/elasticsearch/1411595912790-4063985.post%40n3.nabble.com)  
> .  
> 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/CAEM624ZYpuy6DNcvtPd7aSe%3D29QGRx1vo\_281CSUYH0CG%2BXrzQ%40mail.gmail.com](https://groups.google.com/d/msgid/elasticsearch/CAEM624ZYpuy6DNcvtPd7aSe%3D29QGRx1vo_281CSUYH0CG%2BXrzQ%40mail.gmail.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:59am UTC](https://discuss.elastic.co/t/search-performance-scaling-options-horizontally-vs-vertically/19828/7 "2017-07-06T00:59:51Z")

</div>


