0

question background

In my understanding the load value (shown e.g. by top) allows (together with the knowledge how many CPU cores the system has) a very quick assessment which share of the computational power is used. If a system with four cores has a load of two this means that it could do twice as much work without any of the processes being slowed down (on the CPU level i.e. ignoring I/O).

I just noticed that the information that my system has a load of 2.7 (with four cores) is probably of less use than I assumed because the comparison value is not constant:

start cmd: # grep "^cpu MHz" /proc/cpuinfo
cpu MHz         : 800.000
cpu MHz         : 800.000
cpu MHz         : 2050.000
cpu MHz         : 800.000

My CPU runs at a maximum of about 2GHz. When partly idle, the clock frequency of each core (separately) can be lowered up to a minimum of 800MHz. The computational performance currently demanded from the CPU is unambiguous. But the comparison value ("What it the maximum it could do?") depends a lot on the current frequency.

Compared to what the CPU could do the load would have to be much lower. An example: All cores are running at 2GHz and the load (by several running processes combined) is one. If all cores run at 800MHz instead then the same workload would (I guess) be measured as a load of about 2.5.

Thus I guess that in order to be useful then load value should be measured against the CPU performance at full speed. I.e. the kernel measures a load of 2.5 but it knows that it's running at 800MHz only thus it knows that the load is actually only 1.0.

I am aware that there are situations in which the load does not depend on the frequency. If there are two (single-thread) processes which consume as much CPU as they can get but nothing else on the system needs much CPU then the load is always two, no matter at which frequency. But that is not the typical case.

questions

  1. Does the kernel's load value refer to the current frequency (what I assume) or to the maximum available frequency?

  2. Is there a tool which takes this into consideration? I.e. a tool which e.g. shows two values: "load: 2.5 (measured) / 1.0 (corrected)"

  • I have no idea what you're asking. Most of your sentences seem to be missing some. What is of little use? What do you mean by “load” here? The load would have to be much lower if what? Is there a tool that takes what into consideration? Does the kernel what? – Gilles 'SO- stop being evil' Nov 26 '14 at 23:01
  • I think it's something much less dynamic than what I thought it was at first. From what I gather, it's just an average for jobs in the queue. See this and man 5 proc @/proc/loadavg. – user44370 Nov 27 '14 at 18:43

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.