# CPU usage High in top usage ubuntu

**URL:** <https://discuss.elastic.co/t/cpu-usage-high-in-top-usage-ubuntu/39661>\
**Category:** Elasticsearch\
**Created:** [January 20, 2016, 2:11pm UTC](https://discuss.elastic.co/t/cpu-usage-high-in-top-usage-ubuntu/39661 "2016-01-20T14:11:19Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![tommoholmes10](https://avatars.discourse-cdn.com/v4/letter/t/ed8c4c/32.png) [@tommoholmes10](https://discuss.elastic.co/u/tommoholmes10)\
**Post date:** [January 20, 2016, 2:11pm UTC](https://discuss.elastic.co/t/cpu-usage-high-in-top-usage-ubuntu/39661/1 "2016-01-20T14:11:19Z")

</div>

Hai I run elasticsearch version 2.1.1 when I run this command use curl `curl -XGET 'http://localhost:9200/_cluster/stats?human&pretty'` I get response like this  
`"os" : { "available_processors" : 2, "allocated_processors" : 2, "mem" : { "total" : "0b", "total_in_bytes" : 0 }, "names" : [{ "name" : "Linux", "count" : 1 }] }, "process" : { "cpu" : { "percent" : 57 }, "open_file_descriptors" : { "min" : 356, "max" : 356, "avg" : 356 } },"jvm" : { "max_uptime" : "11.9h", "max_uptime_in_millis" : 42904238, "versions" : [{ "version" : "1.8.0_66", "vm_name" : "Java HotSpot(TM) 64-Bit Server VM", "vm_version" : "25.66-b17", "vm_vendor" : "Oracle Corporation", "count" : 1 }], "mem" : { "heap_used" : "244.9mb", "heap_used_in_bytes" : 256844296, "heap_max" : "505.3mb", "heap_max_in_bytes" : 529924096 },`  
in this response my cpu usage only 57%, but when I run use `top` in my ubuntu  
I get  
`PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND 813 elastic+ 20 0 3063688 658044 4556 S 116.5 32.1 335:29.70 java`  
my question is, my cpu usage 116.5 % use `top` or 57% use `curl -XGET 'http://localhost:9200/_cluster/stats?human&pretty'`

---

<div class="post-metadata">

**Author:** ![jasontedor](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/jasontedor/32/66992_2.png) [@jasontedor](https://discuss.elastic.co/u/jasontedor)\
**Post date:** [January 20, 2016, 7:12pm UTC](https://discuss.elastic.co/t/cpu-usage-high-in-top-usage-ubuntu/39661/2 "2016-01-20T19:12:11Z")

</div>

By default, `top` operates in Irix mode (CPU usage is as a percent of a single CPU) but you can switch to Solaris mode (CPU usage is as a percent of the total number of CPUs) by hitting `I` in `top`. However, the stats being reported by Elasticsearch are in Solaris mode.

Since you have a machine with two logical CPUs, it explains everything because `0.57 * 2 * 100` is `114`, pretty much the same as `top`.

See `man top` for more details.

---

<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:22pm UTC](https://discuss.elastic.co/t/cpu-usage-high-in-top-usage-ubuntu/39661/3 "2017-07-05T23:22:58Z")

</div>


