# CPU utilization crossing 98%

**URL:** <https://discuss.elastic.co/t/cpu-utilization-crossing-98/174047>\
**Category:** Elasticsearch\
**Created:** [March 27, 2019, 6:05am UTC](https://discuss.elastic.co/t/cpu-utilization-crossing-98/174047 "2019-03-27T06:05:26Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![kamesh\_siva](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/kamesh_siva/32/41884_2.png) [@kamesh\_siva](https://discuss.elastic.co/u/kamesh_siva)\
**Post date:** [March 27, 2019, 6:05am UTC](https://discuss.elastic.co/t/cpu-utilization-crossing-98/174047/1 "2019-03-27T06:05:26Z")

</div>

Please suggest.. Observing high CPU utilization on cluster node on one server and queried for nodes hot thread, Below is the response received please help.

Always i have restart elastic search service in services.msc and search is not responding when ever any node is utilizing high CPU usage

**When i exeucte hot\_threads command** ,

::: [Prod-Node-Two-7][MAjfdhsORja9ACRDSj2MBg][pro-phvapp03][inet[/x.x.x.7:9300]]  
Hot threads at 2019-03-27T05:42:44.594Z, interval=500ms, busiestThreads=3, ignoreIdleThreads=true:

103.1% (515.6ms out of 500ms) cpu usage by thread 'elasticsearch[Prod-Node-Two-7][search][T#8]'  
3/10 snapshots sharing following 17 elements  
org.apache.lucene.search.ConstantScoreAutoRewrite.rewrite(ConstantScoreAutoRewrite.java:95)  
org.apache.lucene.search.MultiTermQuery$ConstantScoreAutoRewrite.rewrite(MultiTermQuery.java:220)  
org.apache.lucene.search.MultiTermQuery.rewrite(MultiTermQuery.java:288)  
org.apache.lucene.search.IndexSearcher.rewrite(IndexSearcher.java:636)  
org.apache.lucene.search.IndexSearcher.createNormalizedWeight(IndexSearcher.java:683)  
org.apache.lucene.search.QueryWrapperFilter.getDocIdSet(QueryWrapperFilter.java:55)  
org.elasticsearch.search.fetch.matchedqueries.MatchedQueriesFetchSubPhase.addMatchedQueries(MatchedQueriesFetchSubPhase.java:99)  
org.elasticsearch.search.fetch.matchedqueries.MatchedQueriesFetchSubPhase.hitExecute(MatchedQueriesFetchSubPhase.java:80)  
org.elasticsearch.search.fetch.FetchPhase.execute(FetchPhase.java:194)  
org.elasticsearch.search.SearchService.executeFetchPhase(SearchService.java:516)  
org.elasticsearch.search.action.SearchServiceTransportAction$FetchByIdTransportHandler.messageReceived(SearchServiceTransportAction.java:868)  
org.elasticsearch.search.action.SearchServiceTransportAction$FetchByIdTransportHandler.messageReceived(SearchServiceTransportAction.java:862)  
org.elasticsearch.transport.netty.MessageChannelHandler$RequestHandler.doRun(MessageChannelHandler.java:279)  
org.elasticsearch.common.util.concurrent.AbstractRunnable.run(AbstractRunnable.java:36)  
java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)  
java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)  
java.lang.Thread.run(Unknown Source)  
5/10 snapshots sharing following 15 elements  
org.apache.lucene.codecs.blocktree.IntersectTermsEnum.next(IntersectTermsEnum.java:447)  
org.apache.lucene.search.MultiTermQueryWrapperFilter.getDocIdSet(MultiTermQueryWrapperFilter.java:114)  
org.apache.lucene.search.ConstantScoreQuery$ConstantWeight.scorer(ConstantScoreQuery.java:157)  
org.apache.lucene.search.QueryWrapperFilter$1.iterator(QueryWrapperFilter.java:59)  
org.elasticsearch.search.fetch.matchedqueries.MatchedQueriesFetchSubPhase.addMatchedQueries(MatchedQueriesFetchSubPhase.java:123)  
org.elasticsearch.search.fetch.matchedqueries.MatchedQueriesFetchSubPhase.hitExecute(MatchedQueriesFetchSubPhase.java:80)  
org.elasticsearch.search.fetch.FetchPhase.execute(FetchPhase.java:194)  
org.elasticsearch.search.SearchService.executeFetchPhase(SearchService.java:516)

**when executed \_cluster/stats**  
{"timestamp":1553666499641,"cluster\_name":"clusterProdHAPool","status":"green","indices":{"count":2,"shards":{"total":20,"primaries":10,"replication":1.0,"index":{"shards":{"min":10,"max":10,"avg":10.0},"primaries":{"min":5,"max":5,"avg":5.0},"replication":{"min":1.0,"max":1.0,"avg":1.0}}},"docs":{"count":83664,"deleted":0},"store":{"size\_in\_bytes":96927364,"throttle\_time\_in\_millis":109288},"fielddata":{"memory\_size\_in\_bytes":108940,"evictions":0},"filter\_cache":{"memory\_size\_in\_bytes":373720,"evictions":0},"id\_cache":{"memory\_size\_in\_bytes":0},"completion":{"size\_in\_bytes":0},"segments":{"count":68,"memory\_in\_bytes":1679744,"index\_writer\_memory\_in\_bytes":0,"index\_writer\_max\_memory\_in\_bytes":449793224,"version\_map\_memory\_in\_bytes":0,"fixed\_bit\_set\_memory\_in\_bytes":0},"percolate":{"total":0,"time\_in\_millis":0,"current":0,"memory\_size\_in\_bytes":-1,"memory\_size":"-1b","queries":0}},"nodes":{"count":{"total":3,"master\_only":0,"data\_only":0,"master\_data":3,"client":0},"versions":["1.7.2"],"os":{"available\_processors":20,"mem":{"total\_in\_bytes":38653095936},"cpu":[{"vendor":"Intel","model":"Xeon","mhz":2300,"total\_cores":8,"total\_sockets":4,"cores\_per\_socket":2,"cache\_size\_in\_bytes":-1,"count":3}]},"process":{"cpu":{"percent":62},"open\_file\_descriptors":{"min":1123,"max":1774,"avg":1520}},"jvm":{"max\_uptime\_in\_millis":9608128557,"versions":[{"version":"1.7.0\_80","vm\_name":"Java HotSpot(TM) 64-Bit Server VM","vm\_version":"24.80-b11","vm\_vendor":"Oracle Corporation","count":3}],"mem":{"heap\_used\_in\_bytes":828044784,"heap\_max\_in\_bytes":3114795008},"threads":273},"fs":{"total\_in\_bytes":429487280128,"free\_in\_bytes":409375649792,"available\_in\_bytes":409375649792,"disk\_reads":22752798,"disk\_writes":3281554,"disk\_io\_op":26034352,"disk\_read\_size\_in\_bytes":10569035776,"disk\_write\_size\_in\_bytes":3256944128,"disk\_io\_size\_in\_bytes":13825979904,"disk\_queue":"0"},"plugins":}}

**when executed \_cat/thread\_pool?V**  
host ip bulk.active bulk.queue bulk.rejected index.active index.queue index.rejected search.active search.queue search.rejected  
pro-phvapp02 x.x.x.6 0 0 0 0 0 0 0 0 0  
pro-phvapp04 x.x.x.25 0 0 0 0 0 0 0 0 0  
pro-phvapp03 x.x.x.7 0 0 0 0 0 0 0 0 0

Please help on this issue.. recently from past 2-3 months we are having this issue very frequently. We have been using this version since 3.5 years

---

<div class="post-metadata">

**Author:** ![gabriel\_tessier](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/gabriel_tessier/32/27911_2.png) [@gabriel\_tessier](https://discuss.elastic.co/u/gabriel_tessier)\
**Post date:** [March 27, 2019, 6:13am UTC](https://discuss.elastic.co/t/cpu-utilization-crossing-98/174047/2 "2019-03-27T06:13:17Z")

</div>

Hi,

There's one post similar to your problem closed 3 year ago so you maybe use the same version.  
Take a look about the suggestions here:

> [@High CPU usage of elasticsearch](https://discuss.elastic.co/t/high-cpu-usage-of-elasticsearch/21450):
>
> Hi, I am new to elasticsearch and logstash. using elasticsearch-1.1.1 and logstash-1.4.2-1 with Kibana. Its a single node with 4 vCPU and 30GB of physical memory. Currently logstash (single node) receive logs from 40 jboss servers. Most of the time elasticsearch use almost all the CPU resource. Is there any way I can limit the CPU consumption by tuning? PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND 12216 elastics 20 0 514g 19g 3.6g S 389.8 63.5 3224:32 /usr/b…

I also get some high CPU with recent version and reindexing monthly index in yearly help to fix.

> **[Reindex API | Elasticsearch Guide \[6.7\] | Elastic](https://www.elastic.co/guide/en/elasticsearch/reference/6.7/docs-reindex.html)**

I reduce the number of index.

---

<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:** [April 24, 2019, 6:13am UTC](https://discuss.elastic.co/t/cpu-utilization-crossing-98/174047/3 "2019-04-24T06:13:25Z")

</div>

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