# High CPU usage state

**URL:** <https://discuss.elastic.co/t/high-cpu-usage-state/26715>\
**Category:** Elasticsearch\
**Created:** [August 3, 2015, 12:14pm UTC](https://discuss.elastic.co/t/high-cpu-usage-state/26715 "2015-08-03T12:14:44Z")\
**Posts on this page:** 13\
**Page:** 1

<div class="post-metadata">

**Author:** ![DigiAngel](https://avatars.discourse-cdn.com/v4/letter/d/977dab/32.png) [@DigiAngel](https://discuss.elastic.co/u/DigiAngel)\
**Post date:** [August 3, 2015, 12:14pm UTC](https://discuss.elastic.co/t/high-cpu-usage-state/26715/1 "2015-08-03T12:14:44Z")

</div>

Topic says it...my linuxbox has entered this weird cpu state...where es is taking up a lot of CPU at idle. Logs are clean with no errors. Is there something I can look at to determine the cause? This is on a home machine with very little traffic. Thank you.

---

<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 4, 2015, 12:58am UTC](https://discuss.elastic.co/t/high-cpu-usage-state/26715/2 "2015-08-04T00:58:23Z")

</div>

There's a few threads on the same topic that'd be worth checking.

But; hot threads, GC. How are you monitoring it?

---

<div class="post-metadata">

**Author:** ![DigiAngel](https://avatars.discourse-cdn.com/v4/letter/d/977dab/32.png) [@DigiAngel](https://discuss.elastic.co/u/DigiAngel)\
**Post date:** [August 4, 2015, 1:14am UTC](https://discuss.elastic.co/t/high-cpu-usage-state/26715/3 "2015-08-04T01:14:22Z")

</div>

HI Mark....you're a good man for always jumping into my lame threads. I'm using htop and gkrellm. A stop/start of the service has cured this for now...I only have data from June 11th, so I don't think it's a capacity issue. Again, nothing shows in the logs...just...suddenly cpu pegs out...this is on ES 1.4.5...going to upgrade soon. Thanks again mark.

---

<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 4, 2015, 9:55pm UTC](https://discuss.elastic.co/t/high-cpu-usage-state/26715/4 "2015-08-04T21:55:20Z")

</div>

Like I mentioned, hot threads is a good place to start as well.

---

<div class="post-metadata">

**Author:** ![DigiAngel](https://avatars.discourse-cdn.com/v4/letter/d/977dab/32.png) [@DigiAngel](https://discuss.elastic.co/u/DigiAngel)\
**Post date:** [August 4, 2015, 10:50pm UTC](https://discuss.elastic.co/t/high-cpu-usage-state/26715/5 "2015-08-04T22:50:14Z")

</div>

Thanks Mark....after researching, now I know what hot threads are 😄 When this happens again I will:

links [http://127.0.0.1:9200/\_nodes/hot\_threads?pretty](http://127.0.0.1:9200/_nodes/hot_threads?pretty)

and report the findings here. Thanks again Mark...you always help me out.

---

<div class="post-metadata">

**Author:** ![DigiAngel](https://avatars.discourse-cdn.com/v4/letter/d/977dab/32.png) [@DigiAngel](https://discuss.elastic.co/u/DigiAngel)\
**Post date:** [August 5, 2015, 10:52am UTC](https://discuss.elastic.co/t/high-cpu-usage-state/26715/6 "2015-08-05T10:52:15Z")

</div>

Here's what I got:

```
0.7% (3.5ms out of 500ms) cpu usage by thread 'elasticsearch[Ringleader][scheduler][T#1]'
 10/10 snapshots sharing following 9 elements

0.0% (198.9micros out of 500ms) cpu usage by thread 'elasticsearch[Ringleader][transport_client_worker][T#2]{New I/O worker #2}'
 10/10 snapshots sharing following 15 elements

0.0% (172.8micros out of 500ms) cpu usage by thread 'elasticsearch[Ringleader][transport_client_timer][T#1]{Hashed wheel timer #1}'
 10/10 snapshots sharing following 5 elements

```

::: [logstash-gateway-28922-4324][fjA2elXlSc66pN9K2-LpTA][gateway][inet[/192.168.1.253:9301]]{data=false, client=true}  
Hot threads at 2015-08-05T10:50:48.523Z, interval=500ms, busiestThreads=3, ignoreIdleThreads=false:

```
0.1% (593.1micros out of 500ms) cpu usage by thread 'elasticsearch[logstash-gateway-28922-4324][[http_server_worker.default]][T#2]{New I/O worker #7}'
 10/10 snapshots sharing following 15 elements

0.0% (211.6micros out of 500ms) cpu usage by thread 'Ruby-0-Thread-9: /opt/logstash/vendor/bundle/jruby/1.9/gems/stud-0.0.17/lib/stud/buffer.rb:92'
 10/10 snapshots sharing following 31 elements

0.0% (180.4micros out of 500ms) cpu usage by thread 'elasticsearch[logstash-gateway-28922-4324][transport_client_timer][T#1]{Hashed wheel timer #1}'
 10/10 snapshots sharing following 5 elements
```

---

<div class="post-metadata">

**Author:** ![Andrei\_Stefan](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/andrei_stefan/32/47533_2.png) [@Andrei\_Stefan](https://discuss.elastic.co/u/Andrei_Stefan)\
**Post date:** [August 5, 2015, 11:29am UTC](https://discuss.elastic.co/t/high-cpu-usage-state/26715/7 "2015-08-05T11:29:29Z")

</div>

@DigiAngel those hot threads are taken while the CPU usage is high? From those hot threads it doesn't look like the CPU is busy.

---

<div class="post-metadata">

**Author:** ![DigiAngel](https://avatars.discourse-cdn.com/v4/letter/d/977dab/32.png) [@DigiAngel](https://discuss.elastic.co/u/DigiAngel)\
**Post date:** [August 5, 2015, 12:57pm UTC](https://discuss.elastic.co/t/high-cpu-usage-state/26715/8 "2015-08-05T12:57:02Z")

</div>

Yea that's what I thought too....I've bumped the service.....next time it happens I'll dump out ps aux as well. Thank you.

---

<div class="post-metadata">

**Author:** ![DigiAngel](https://avatars.discourse-cdn.com/v4/letter/d/977dab/32.png) [@DigiAngel](https://discuss.elastic.co/u/DigiAngel)\
**Post date:** [August 6, 2015, 12:58pm UTC](https://discuss.elastic.co/t/high-cpu-usage-state/26715/9 "2015-08-06T12:58:01Z")

</div>

Here's what top has to say:

```
  PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND                                                                                                                                                             
               
24197 elastic+ 20 0 917144 555264 5256 S 52.1 18.0 237:49.77 java                                                                                                                                                                                  

```

using 50% cpu

and from elasticsearch-parabedic:

```
 Dazzler
    
  ID: SUS_sfKsRcm7vNZ5ERFJxQ
  IP: inet[/127.0.0.1:9200]
  Host: 
  Load: 3.850
  Size: 
  Docs: 5 031 059
  Heap: 
  /

```

Thank you.

---

<div class="post-metadata">

**Author:** ![DigiAngel](https://avatars.discourse-cdn.com/v4/letter/d/977dab/32.png) [@DigiAngel](https://discuss.elastic.co/u/DigiAngel)\
**Post date:** [August 7, 2015, 12:33am UTC](https://discuss.elastic.co/t/high-cpu-usage-state/26715/10 "2015-08-07T00:33:29Z")

</div>

Here's what top has to say:

```
  PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND                                                                                                                                                             
               
24197 elastic+ 20 0 917144 555264 5256 S 52.1 18.0 237:49.77 java                                                                                                                                                                                  

```

using 50% cpu

and from elasticsearch-parabedic:

```
 Dazzler
    
  ID: SUS_sfKsRcm7vNZ5ERFJxQ
  IP: inet[/127.0.0.1:9200]
  Host: 
  Load: 3.850
  Size: 
  Docs: 5 031 059
  Heap: 
  /

```

Thank you.

---

<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 7, 2015, 12:34am UTC](https://discuss.elastic.co/t/high-cpu-usage-state/26715/11 "2015-08-07T00:34:09Z")

</div>

52% isn't high.

What does hot threads say?

---

<div class="post-metadata">

**Author:** ![DigiAngel](https://avatars.discourse-cdn.com/v4/letter/d/977dab/32.png) [@DigiAngel](https://discuss.elastic.co/u/DigiAngel)\
**Post date:** [August 7, 2015, 12:35am UTC](https://discuss.elastic.co/t/high-cpu-usage-state/26715/12 "2015-08-07T00:35:15Z")

</div>

As soon as I removed all data besides the last 10 days this immediately cleared up and I'm back to normal cpu usage. Hot threads had nothing to say....same as above...almost nothing so...eh...guess I'll upgrade to ES 1.7.1 and see what happens. Thanks Mark and all!

---

<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:57pm UTC](https://discuss.elastic.co/t/high-cpu-usage-state/26715/13 "2017-07-05T23:57:01Z")

</div>


