# ES consumes 100% CPU, why?

**URL:** <https://discuss.elastic.co/t/es-consumes-100-cpu-why/28325>\
**Category:** Elasticsearch\
**Created:** [August 31, 2015, 6:05am UTC](https://discuss.elastic.co/t/es-consumes-100-cpu-why/28325 "2015-08-31T06:05:53Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![sunilmchaudhari](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/sunilmchaudhari/32/9475_2.png) [@sunilmchaudhari](https://discuss.elastic.co/u/sunilmchaudhari)\
**Post date:** [August 31, 2015, 6:05am UTC](https://discuss.elastic.co/t/es-consumes-100-cpu-why/28325/1 "2015-08-31T06:05:54Z")

</div>

Hi,  
I am running elasticsearch on 8 GB RHEL Rmachine.  
I have 70GB partition /elasticsearch where data files are stored. recently I have changed file /etc/sysconfig/elasticsearch to allocate 3gb memory to ES\_HEAP\_SIZE. Also I changed values for number of shards and replicas.

When I start ES, it takes lot of time and consumes 100% CPU. Can anybody guess what is the reason? Where can I dig into?

thanks  
Sunil.

---

<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:** [August 31, 2015, 6:08am UTC](https://discuss.elastic.co/t/es-consumes-100-cpu-why/28325/2 "2015-08-31T06:08:33Z")

</div>

Look at the logs, it could be GC, also look at slow log to see what it has.

---

<div class="post-metadata">

**Author:** ![otisg](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/otisg/32/492_2.png) [@otisg](https://discuss.elastic.co/u/otisg)\
**Post date:** [September 1, 2015, 10:06pm UTC](https://discuss.elastic.co/t/es-consumes-100-cpu-why/28325/3 "2015-09-01T22:06:24Z")

</div>

Hi Sunil,

Maybe SPM for Elasticsearch or Marvel will point out what is going on? If not, you could try jstacking a few times or running with the profiler.

## Otis

Monitoring \* Alerting \* Anomaly Detection \* Centralized Log Management  
Solr & Elasticsearch Consulting & Support \* [http://sematext.com/](http://sematext.com/)

---

<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 5, 2017, 11:52pm UTC](https://discuss.elastic.co/t/es-consumes-100-cpu-why/28325/4 "2017-07-05T23:52:49Z")

</div>


