# Difference between cpu usage in node stats

**URL:** <https://discuss.elastic.co/t/difference-between-cpu-usage-in-node-stats/104816>\
**Category:** Elasticsearch\
**Created:** [October 22, 2017, 6:54pm UTC](https://discuss.elastic.co/t/difference-between-cpu-usage-in-node-stats/104816 "2017-10-22T18:54:36Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![fhalde](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/fhalde/32/21419_2.png) [@fhalde](https://discuss.elastic.co/u/fhalde)\
**Post date:** [October 22, 2017, 6:54pm UTC](https://discuss.elastic.co/t/difference-between-cpu-usage-in-node-stats/104816/1 "2017-10-22T18:54:36Z")

</div>

Node stats provides us with multiple cpu usage metrics. I'd like to know the difference between the below 2  
v2.4.4

1. os.cpu\_percentage / os.load\_average
2. process.cpu.percent

Which is the real indicator of the cpu usage of a node. I have witnessed a lot of times the process.cpu.percent being low even though os.cpu\_percentage / os.load\_average was high.

What does each mean? And which one we should generally be looking at?

---

<div class="post-metadata">

**Author:** ![danielmitterdorfer](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/danielmitterdorfer/32/110510_2.png) [@danielmitterdorfer](https://discuss.elastic.co/u/danielmitterdorfer)\
**Post date:** [October 27, 2017, 11:58am UTC](https://discuss.elastic.co/t/difference-between-cpu-usage-in-node-stats/104816/2 "2017-10-27T11:58:55Z")

</div>

Hi @fhalde,

you can compare it with the output of Unix' `top`: In the header, `top` shows the overall CPU usage of all processes in the system and the load average. This would correspond to `os.cpu_percentage`, `os.load_average`. Below the header, `top` shows statistics about each process individually. Thus, `process.cpu.percent` shows you much CPU the Elasticsearch process is using.

So `os.cpu_percentage` tells you how busy the system is and `process.cpu.percent` tells you how much CPU Elasticsearch is using. If you have a large difference, then you may want to dig deeper with system utilities like `top`, `iostat`, `vmstat` and the like what is causing it.

Daniel

---

<div class="post-metadata">

**Author:** ![fhalde](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/fhalde/32/21419_2.png) [@fhalde](https://discuss.elastic.co/u/fhalde)\
**Post date:** [October 27, 2017, 12:44pm UTC](https://discuss.elastic.co/t/difference-between-cpu-usage-in-node-stats/104816/3 "2017-10-27T12:44:12Z")

</div>

Thanks @danielmitterdorfer

One last question, when we do `http://localhost:9200/_cat/nodes?v` there is a field called load. Is that the os load ?

---

<div class="post-metadata">

**Author:** ![danielmitterdorfer](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/danielmitterdorfer/32/110510_2.png) [@danielmitterdorfer](https://discuss.elastic.co/u/danielmitterdorfer)\
**Post date:** [October 27, 2017, 12:58pm UTC](https://discuss.elastic.co/t/difference-between-cpu-usage-in-node-stats/104816/4 "2017-10-27T12:58:18Z")

</div>

Hi @fhalde,

yes, (see also the [docs](https://www.elastic.co/guide/en/elasticsearch/reference/2.4/cat-nodes.html)). On more recent versions, [Elasticsearch differentiates a bit further](https://www.elastic.co/guide/en/elasticsearch/reference/5.6/cat-nodes.html).

Daniel

---

<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:** [November 24, 2017, 12:58pm UTC](https://discuss.elastic.co/t/difference-between-cpu-usage-in-node-stats/104816/5 "2017-11-24T12:58:35Z")

</div>

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