# Elasticsearch 7.12 High CPU usage

**URL:** https://discuss.elastic.co/t/elasticsearch-7-12-high-cpu-usage/270757
**Category:** Elasticsearch
**Created:** [April 20, 2021, 7:45pm UTC](https://discuss.elastic.co/t/elasticsearch-7-12-high-cpu-usage/270757 "2021-04-20T19:45:05Z")
**Posts on this page:** 9
**Page:** 1

<div class="post-metadata">

### Author: ![Anabella\_Cristaldi](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/anabella_cristaldi/32/23612_2.png) [@Anabella\_Cristaldi](https://discuss.elastic.co/u/Anabella_Cristaldi)
#### Post date: [April 20, 2021, 7:45pm UTC](https://discuss.elastic.co/t/elasticsearch-7-12-high-cpu-usage/270757/1 "2021-04-20T19:45:05Z")

</div>

Hi all,  
Last week in need to install a new cluster and I decided to use the 7.12 version.  
Initially I've configure a three node cluster (two data+master nodes, one master node).  
In this version elasticsearch automatically sizes JVM heap based on a node’s and total memory. So I decided to leave the setting like that.  
Surprisingly without executing any query nor indexing data (or indexing very few documents) the nodes ran out of heap memory.  
I open an slack thread and I decided to setup the value in the jvm.options as I have in my other ES instances (since apparently in some circumstances may be a problem with that)

> **[Welcome to your new HQ](https://elasticstack.slack.com/?redir=%2Farchives%2FCNTP6NLTZ%2Fp1618388879441600)**
>
> Slack is a new way to communicate with your team. It’s faster, better organized, and more secure than email.

This problem was solved but an odd one appeared... the CPU usage was very very high, no matter if I was doing nothing with that node.  
I have to downgrade to 7.11.2, using the same configuration an the performance improvement was _huge_

I decide then to install again (in another server) version 7.12 and perform a side by side comparison.  
Below the results

Have any performance problems been reported with this version?

Thank you very much  
Regards  
Ana

**Server 1 (Good Performance)**  
CPU: 16  
RAM: 16GB  
Elasticsearch version: 7.11.2  
Heap Size: 8GB  
Average CPU Utilization: 2%  
Average Heap Utilization: 4.7GB  
System Load: 1m 1.11

**Server 2 (Very Poor Performace)**  
CPU: 20  
RAM: 24GB  
Elasticsearch version: 7.12.0  
Heap Size: 8GB  
Average CPU Utilization: 47%  
Average Heap Utilization: 4.1GB  
System Load: 1m 8.61

Both server are running ES+Kibana+LS and ingesting the same data.  
(Servers are for comparison and testing purpose, that is why I put ES and LS in the same servers)  
The Kibana space in use holds the same dashboards and visualizations  
Attached the output of the thread\_pool, hot\_threads, tasks (I put the response time in order to show you the difference in the response time)

[Task, Thread Pool, and Hot Threads](https://drive.google.com/file/d/1LZrhE-Gr2hEDhFziUVl2_pe-z9--BS95/view?usp=sharing)

---

<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 27, 2021, 12:55am UTC](https://discuss.elastic.co/t/elasticsearch-7-12-high-cpu-usage/270757/2 "2021-04-27T00:55:26Z")

</div>

> [@Anabella\_Cristaldi](#):
>
> Surprisingly without executing any query nor indexing data (or indexing very few documents) the nodes ran out of heap memory.

You haven't provided logs, which would be useful here.

(Please also use gist/pastebin/etc instead of gdrive 🙂)

---

<div class="post-metadata">

### Author: ![Anabella\_Cristaldi](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/anabella_cristaldi/32/23612_2.png) [@Anabella\_Cristaldi](https://discuss.elastic.co/u/Anabella_Cristaldi)
#### Post date: [April 27, 2021, 9:47am UTC](https://discuss.elastic.co/t/elasticsearch-7-12-high-cpu-usage/270757/3 "2021-04-27T09:47:54Z")

</div>

Hi @warkolm ,  
Logs from today. The curious fact is thet when I stopped logstash the CPU rocketed up 🤨

 ![image](https://us1.discourse-cdn.com/elastic/original/3X/c/1/c15b434dd5d05b77d1e7ac9f42c7b69096580230.png)

Now I think there is more information information in the [Tasks, Hot Threads, Thread Pool](https://pastebin.pl/view/e4185987) output

Also the here the [elasticsearch.log](https://pastebin.pl/view/098db540)

Any feedback will be welcome  
Thank you!  
Regards  
Ana

---

<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 28, 2021, 12:13am UTC](https://discuss.elastic.co/t/elasticsearch-7-12-high-cpu-usage/270757/4 "2021-04-28T00:13:29Z")

</div>

I can see a spike in GC in your logs, but it's a once off.

What is the output from the `_cluster/stats?pretty&human` API?

---

<div class="post-metadata">

### Author: ![Anabella\_Cristaldi](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/anabella_cristaldi/32/23612_2.png) [@Anabella\_Cristaldi](https://discuss.elastic.co/u/Anabella_Cristaldi)
#### Post date: [April 28, 2021, 7:18am UTC](https://discuss.elastic.co/t/elasticsearch-7-12-high-cpu-usage/270757/5 "2021-04-28T07:18:40Z")

</div>

Hi,  
Here the output [\_cluster/stats?pretty&human](https://pastebin.pl/view/642fa63b)  
The response time for returning this information was ![image](https://us1.discourse-cdn.com/elastic/original/3X/d/4/d4dd11bef6d26bf6a4998ba344d1a86d57fda1ea.png)

Whereas with the node in 7.11.2 the response time is ![image](https://us1.discourse-cdn.com/elastic/original/3X/1/1/11d6bf5781981cadf415fcbfea2ecf333f1ac3ca.png)

Regards  
Ana

---

<div class="post-metadata">

### Author: ![Anabella\_Cristaldi](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/anabella_cristaldi/32/23612_2.png) [@Anabella\_Cristaldi](https://discuss.elastic.co/u/Anabella_Cristaldi)
#### Post date: [April 29, 2021, 6:44pm UTC](https://discuss.elastic.co/t/elasticsearch-7-12-high-cpu-usage/270757/6 "2021-04-29T18:44:05Z")

</div>

Hi @warkolm  
Today I've updated to 7.12.1 and now it seems that the performance problem is solved  
The cluster stats now responds in ![image](https://us1.discourse-cdn.com/elastic/original/3X/1/c/1cf6f289a4a08fdfe7daff1b8c494d9824dff426.png)  
And the CPU and memory usage seems normal now (and consistent with the data and resources I have).  
CPU before and after update  
 ![image](https://us1.discourse-cdn.com/elastic/original/3X/b/b/bb51f74494167b5b838c61a4393a55f18bf94c15.png)

I read the release notes of version 7.12.1 but I was unable to find anything related to performance or cpu utilization improvements

Regards  
Ana

---

<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 30, 2021, 2:36am UTC](https://discuss.elastic.co/t/elasticsearch-7-12-high-cpu-usage/270757/7 "2021-04-30T02:36:09Z")

</div>

Ok that's weird but good, thanks for sharing your solution.

---

<div class="post-metadata">

### Author: ![Anabella\_Cristaldi](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/anabella_cristaldi/32/23612_2.png) [@Anabella\_Cristaldi](https://discuss.elastic.co/u/Anabella_Cristaldi)
#### Post date: [April 30, 2021, 6:51am UTC](https://discuss.elastic.co/t/elasticsearch-7-12-high-cpu-usage/270757/8 "2021-04-30T06:51:04Z")

</div>

Yes, the weirdest thing is that It was not my only instance with that problem.  
I had a 3 node cluster that was initially installed with 7.12.0 and after see how badly was performing, I decided then to downgrade...  
Thanks @warkolm for your support

---

<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: [May 28, 2021, 6:51am UTC](https://discuss.elastic.co/t/elasticsearch-7-12-high-cpu-usage/270757/9 "2021-05-28T06:51:54Z")

</div>

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