# Increasing ES search throughput

**URL:** <https://discuss.elastic.co/t/increasing-es-search-throughput/8750>\
**Category:** Elasticsearch\
**Created:** [August 15, 2012, 7:04pm UTC](https://discuss.elastic.co/t/increasing-es-search-throughput/8750 "2012-08-15T19:04:51Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![sumitborar](https://avatars.discourse-cdn.com/v4/letter/s/b782af/32.png) [@sumitborar](https://discuss.elastic.co/u/sumitborar)\
**Post date:** [August 15, 2012, 7:04pm UTC](https://discuss.elastic.co/t/increasing-es-search-throughput/8750/1 "2012-08-15T19:04:51Z")

</div>

I have 15 node cluster with 14 data nodes and 1 master node. We are  
indexing about 300M documents with 7 shards and 1 replica. Each node has  
24G of RAM . Right now I am using mmapfs for index store and ES is using  
only 3Gb RAM ( out of 6GB assigned ) .

I am using simple text queries for search and we get an average response  
time of 200ms . However our throughput is limited to about 100QPS @20  
concurrent threads. Increasing number of threads doesn't seem to help  
afterwards as CPU load becomes 100%.

Any suggestions on how to improve the throughtput ?

--

---

<div class="post-metadata">

**Author:** ![Radu\_Gheorghe1](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/radu_gheorghe1/32/2688_2.png) [@Radu\_Gheorghe1](https://discuss.elastic.co/u/Radu_Gheorghe1)\
**Post date:** [August 16, 2012, 4:21am UTC](https://discuss.elastic.co/t/increasing-es-search-throughput/8750/2 "2012-08-16T04:21:12Z")

</div>

You can increase the number of replicas and see if that helps.

The other option I see is to use routing to direct the query to the shard  
that contains your results. Here's a video about doing that and some more:

> **[Elasticsearch Platform — Find real-time answers at scale](https://www.elastic.co)**
>
> Power insights and outcomes with the Elasticsearch Platform and AI. See into your data and find answers that matter with enterprise solutions designed to help you build, observe, and protect. Try Elasticsearch free today.

On Wednesday, August 15, 2012 10:04:51 PM UTC+3, sumit wrote:

> I have 15 node cluster with 14 data nodes and 1 master node. We are  
> indexing about 300M documents with 7 shards and 1 replica. Each node has  
> 24G of RAM . Right now I am using mmapfs for index store and ES is using  
> only 3Gb RAM ( out of 6GB assigned ) .
> 
> I am using simple text queries for search and we get an average response  
> time of 200ms . However our throughput is limited to about 100QPS @20  
> concurrent threads. Increasing number of threads doesn't seem to help  
> afterwards as CPU load becomes 100%.
> 
> Any suggestions on how to improve the throughtput ?

--

---

<div class="post-metadata">

**Author:** ![sumitborar](https://avatars.discourse-cdn.com/v4/letter/s/b782af/32.png) [@sumitborar](https://discuss.elastic.co/u/sumitborar)\
**Post date:** [August 16, 2012, 5:24pm UTC](https://discuss.elastic.co/t/increasing-es-search-throughput/8750/3 "2012-08-16T17:24:53Z")

</div>

Thanks for the reply . I tried adding more replicas , it does help little  
bit ( from 100 to 125 QPS ) but my CPU usage goes up really high.

I dont know how we can implement routing since we are using analyzer on the  
String field and searching on them. I was under the impression that I cant  
use routing for analyzed fields .

We did manage to reduce GC cycles by increasing the new object heap memory  
size.

On Wednesday, August 15, 2012 9:21:12 PM UTC-7, Radu Gheorghe wrote:

> You can increase the number of replicas and see if that helps.
> 
> The other option I see is to use routing to direct the query to the shard  
> that contains your results. Here's a video about doing that and some more:
> 
> [Elasticsearch Platform — Find real-time answers at scale | Elastic](http://www.elasticsearch.org/videos/2012/06/05/scaling-massive-elasticsearch-clusters.html)
> 
> On Wednesday, August 15, 2012 10:04:51 PM UTC+3, sumit wrote:
> 
> > I have 15 node cluster with 14 data nodes and 1 master node. We are  
> > indexing about 300M documents with 7 shards and 1 replica. Each node has  
> > 24G of RAM . Right now I am using mmapfs for index store and ES is using  
> > only 3Gb RAM ( out of 6GB assigned ) .
> > 
> > I am using simple text queries for search and we get an average response  
> > time of 200ms . However our throughput is limited to about 100QPS @20  
> > concurrent threads. Increasing number of threads doesn't seem to help  
> > afterwards as CPU load becomes 100%.
> > 
> > Any suggestions on how to improve the throughtput ?

--

---

<div class="post-metadata">

**Author:** ![Radu\_Gheorghe1](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/radu_gheorghe1/32/2688_2.png) [@Radu\_Gheorghe1](https://discuss.elastic.co/u/Radu_Gheorghe1)\
**Post date:** [August 22, 2012, 7:40pm UTC](https://discuss.elastic.co/t/increasing-es-search-throughput/8750/4 "2012-08-22T19:40:35Z")

</div>

On Thursday, August 16, 2012 8:24:53 PM UTC+3, sumit wrote:

> Thanks for the reply . I tried adding more replicas , it does help little  
> bit ( from 100 to 125 QPS ) but my CPU usage goes up really high.

I would try with less shards and more replicas, if reindexing is an option  
and inserting isn't very heavy. And I'd run this sort performance testing  
on a separate environment.

Also, I would optimize the index regularly.

> I dont know how we can implement routing since we are using analyzer on  
> the String field and searching on them. I was under the impression that I  
> cant use routing for analyzed fields .

As far as I understand, the routing value itself is not analyzed, which is  
different than how you map your "data" fields. But I might be wrong, so I  
suggest to try with some sample data and see if you can make it work.

> We did manage to reduce GC cycles by increasing the new object heap memory  
> size.
> 
> On Wednesday, August 15, 2012 9:21:12 PM UTC-7, Radu Gheorghe wrote:
> 
> > You can increase the number of replicas and see if that helps.
> > 
> > The other option I see is to use routing to direct the query to the shard  
> > that contains your results. Here's a video about doing that and some more:
> > 
> > [Elasticsearch Platform — Find real-time answers at scale | Elastic](http://www.elasticsearch.org/videos/2012/06/05/scaling-massive-elasticsearch-clusters.html)
> > 
> > On Wednesday, August 15, 2012 10:04:51 PM UTC+3, sumit wrote:
> > 
> > > I have 15 node cluster with 14 data nodes and 1 master node. We are  
> > > indexing about 300M documents with 7 shards and 1 replica. Each node has  
> > > 24G of RAM . Right now I am using mmapfs for index store and ES is using  
> > > only 3Gb RAM ( out of 6GB assigned ) .
> > > 
> > > I am using simple text queries for search and we get an average response  
> > > time of 200ms . However our throughput is limited to about 100QPS @20  
> > > concurrent threads. Increasing number of threads doesn't seem to help  
> > > afterwards as CPU load becomes 100%.
> > > 
> > > Any suggestions on how to improve the throughtput ?

--

---

<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, 3:15am UTC](https://discuss.elastic.co/t/increasing-es-search-throughput/8750/5 "2017-07-06T03:15:26Z")

</div>


