# High cpu usage (90-100%) on elastic search servers

**URL:** <https://discuss.elastic.co/t/high-cpu-usage-90-100-on-elastic-search-servers/12268>\
**Category:** Elasticsearch\
**Created:** [June 5, 2013, 12:47am UTC](https://discuss.elastic.co/t/high-cpu-usage-90-100-on-elastic-search-servers/12268 "2013-06-05T00:47:15Z")\
**Posts on this page:** 3\
**Page:** 2

<div class="post-metadata">

**Author:** ![rookie7799](https://avatars.discourse-cdn.com/v4/letter/r/13edae/32.png) [@rookie7799](https://discuss.elastic.co/u/rookie7799)\
**Post date:** [November 21, 2013, 4:21pm UTC](https://discuss.elastic.co/t/high-cpu-usage-90-100-on-elastic-search-servers/12268/21 "2013-11-21T16:21:04Z")

</div>

Hello Han,  
Just an observation, you said that your nodes have 24 core cpus, and you  
are saying that they use 100% of cpu, in my practice 100% of cpu on a 24  
core server - that's 4.16% really and that's sort of low 🙂  
But you probably meant 2400% anyway.  
Hope you figured out your problem.

--  
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).  
For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).

---

<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, 2:05am UTC](https://discuss.elastic.co/t/high-cpu-usage-90-100-on-elastic-search-servers/12268/22 "2017-07-06T02:05:37Z")

</div>

Closed on July 6, 2017, 2:05am UTC



---

<div class="post-metadata">

**Author:** ![Jennie\_Soria](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/jennie_soria/32/58895_2.png) [@Jennie\_Soria](https://discuss.elastic.co/u/Jennie_Soria)\
**Post date:** [August 17, 2021, 12:36pm UTC](https://discuss.elastic.co/t/high-cpu-usage-90-100-on-elastic-search-servers/12268/23 "2021-08-17T12:36:25Z")

</div>

Not sure if this was addressed as the threads all seem to focus on query tuning. But your sharding strategy is a problem as well. If you have 5 primary shards and 4 replicas then you have a total of 25 shards (5 primaries 0-4 plus 4 replicas of each of those). That is way to many for a 5 node cluster. It is inefficient.

(num\_nodes/num\_primaries)-1

- [Tune for search speed | Elasticsearch Guide [master] | Elastic](https://www.elastic.co/guide/en/elasticsearch/reference/master/tune-for-search-speed.html#_replicas_might_help_with_throughput_but_not_always)

The search will go against all the shards in the index from where request comes in then be returned back and collated to be the response. So not only are you have cluster manage the overhead (mem/cpu) of the extra shards/node you are hitting the nodes 5 times (best case assuming even distribution) for each request whereas should only best case hit it once if there is one shard per node for the index.

- Sharding strategy [Size your shards | Elasticsearch Guide [7.14] | Elastic](https://www.elastic.co/guide/en/elasticsearch/reference/current/size-your-shards.html)
- Check how your search hits shards : [Search shards API | Elasticsearch Guide [7.14] | Elastic](https://www.elastic.co/guide/en/elasticsearch/reference/current/search-shards.html)

[Previous page](https://discuss.elastic.co/t/high-cpu-usage-90-100-on-elastic-search-servers/12268.md?page=1)
