# ElasticSearch high CPU on merge threads

**URL:** https://discuss.elastic.co/t/elasticsearch-high-cpu-on-merge-threads/46415
**Category:** Elasticsearch
**Created:** [April 5, 2016, 3:03pm UTC](https://discuss.elastic.co/t/elasticsearch-high-cpu-on-merge-threads/46415 "2016-04-05T15:03:38Z")
**Posts on this page:** 9
**Page:** 1

<div class="post-metadata">

### Author: ![razafinr](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/razafinr/32/45334_2.png) [@razafinr](https://discuss.elastic.co/u/razafinr)
#### Post date: [April 5, 2016, 3:03pm UTC](https://discuss.elastic.co/t/elasticsearch-high-cpu-on-merge-threads/46415/1 "2016-04-05T15:03:38Z")

</div>

Hi,

I am doing a bulk indexing every 10 minutes using logstash to send data to ElasticSearch. For almost 20 days everything went OK, but today I am getting the following issue:

- ElasticSearch is using very high CPU , and when I am getting hot threads it seems that almost all of the big cpu thead are the Lucene merging threads.

- My bulk indexing is lasting 4 times longer.

I am running 2 elasticsearch nodes on SSD disk.

Does anyone knows where the problem could come from ?

---

<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: [April 5, 2016, 10:50pm UTC](https://discuss.elastic.co/t/elasticsearch-high-cpu-on-merge-threads/46415/2 "2016-04-05T22:50:42Z")

</div>

What version are you on?  
Are there lots of deleted documents or segments?

---

<div class="post-metadata">

### Author: ![razafinr](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/razafinr/32/45334_2.png) [@razafinr](https://discuss.elastic.co/u/razafinr)
#### Post date: [April 6, 2016, 5:22am UTC](https://discuss.elastic.co/t/elasticsearch-high-cpu-on-merge-threads/46415/3 "2016-04-06T05:22:09Z")

</div>

I run ES version 2.2.1 and I dont delete docs at all

---

<div class="post-metadata">

### Author: ![dadoonet](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/dadoonet/32/137187_2.png) [@dadoonet](https://discuss.elastic.co/u/dadoonet)
#### Post date: [April 6, 2016, 5:39am UTC](https://discuss.elastic.co/t/elasticsearch-high-cpu-on-merge-threads/46415/4 "2016-04-06T05:39:12Z")

</div>

Are you updating a lot of documents?

---

<div class="post-metadata">

### Author: ![razafinr](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/razafinr/32/45334_2.png) [@razafinr](https://discuss.elastic.co/u/razafinr)
#### Post date: [April 6, 2016, 5:54am UTC](https://discuss.elastic.co/t/elasticsearch-high-cpu-on-merge-threads/46415/5 "2016-04-06T05:54:07Z")

</div>

Neither, basically I bulk index around 30000 docs in a new index every 10  
minutes with no update/delete. My master node seems to be totally slower  
than before. My search became slower as well. I really can t tell if it is  
an ES or an hardware problem as I did a full cluster restart

---

<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: [April 6, 2016, 6:05am UTC](https://discuss.elastic.co/t/elasticsearch-high-cpu-on-merge-threads/46415/6 "2016-04-06T06:05:17Z")

</div>

Do you have Marvel installed to monitor your cluster? If not that'd be a good idea as it'll give you something to look at in terms of metrics.

---

<div class="post-metadata">

### Author: ![razafinr](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/razafinr/32/45334_2.png) [@razafinr](https://discuss.elastic.co/u/razafinr)
#### Post date: [April 6, 2016, 6:17am UTC](https://discuss.elastic.co/t/elasticsearch-high-cpu-on-merge-threads/46415/7 "2016-04-06T06:17:46Z")

</div>

I will install marvel and check this out. Thanks

---

<div class="post-metadata">

### Author: ![razafinr](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/razafinr/32/45334_2.png) [@razafinr](https://discuss.elastic.co/u/razafinr)
#### Post date: [April 6, 2016, 1:33pm UTC](https://discuss.elastic.co/t/elasticsearch-high-cpu-on-merge-threads/46415/8 "2016-04-06T13:33:42Z")

</div>

Could not install Marvel but the problem is solved. The problem was with the server itself and not ElasticSearch. Could not detect exactly where it was from but a full server restart solved it.

---

<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:01pm UTC](https://discuss.elastic.co/t/elasticsearch-high-cpu-on-merge-threads/46415/9 "2017-07-05T23:01:51Z")

</div>


