Difference between cpu usage in node stats

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?

1 Like

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

1 Like

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 ?

Hi @fhalde,

yes, (see also the docs). On more recent versions, Elasticsearch differentiates a bit further.

Daniel

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