Understanding CPU load average

Understanding CPU load average

linux_cpu_load_avg

What is Load Average

It represents three numbers shown in the uptime or top command. The three numbers represent averages over 1,5, 15 minutes interval.

Threshold Load Average

Basically in order to determine what is the threshold value of load average for your system you need to know how many CPU processors or cores are processing the requests.

Determining Number of cores

Here are some of useful commands that you can use to know the number of cores present on your system.

grep 'model name' /proc/cpuinfo | wc -l
nproc
lscpu | grep "CPU(s)"

Understanding the load Average numbers

Let us take a few example load to understand the load averages. We can get the load average of a system using the below command.

uptime

Single core processor

Output:

02:28am  up 395 days 11:53,  1 user,  load average: 0.73, 0.69, 0.71

We can interpret the above numbers as in below statements.

  • Over last 1 min – The CPU was only loaded by 73% and was idled for 27%
  • Over last 5 min – The CPU was only loaded by 69% and was idled for 31%
  • Over last 15 min – The CPU was only loaded by 71% and was idled for 29%

Single core processor with heavy load

Output:

9:36pm  up 445 day(s), 14:27,  1 user,  load average: 1.05, 0.70, 5.09
  • Over last 1 min – The CPU was overloaded by 0.05 processes (i.e 5% of the processes were waiting to be served by CPU)
  • Over last 5 min – The CPU was idled for 30%
  • Over last 15 min – The CPU was overloaded by 4.09 processes (i.e 409% of the processes were waiting to be served by CPU)

Dual core processor

Output:

9:36pm  up 445 day(s), 14:27,  1 user,  load average: 2.00, 1.70, 1.09
  • Over last 1 min – Each of the core processor was fully occupied (i.e serving the request). 100% cpu core utilization 
  • Over last 5 min – Assuming one of the core is at full utilization, the other processor was at 70% of the utilization
  • Over last 15 min – Assuming one of the core is at full utilization, the other processor was at 9% of the utilization

So, to summarize

  • A load average of 1 on a single core processor means the Core is at 100% utilization
  • A load average of 1 on a dual core processor means the cores are at 50% utilization each
  • A load average of 1 on a quad core processor means the cores are at 25% utilization each
  • For a singe core processor a load average value between 0.0 – 1.0 means your system is fine, But a consistent value of .7 and above needs to have a look
  • For a dual core processor a load average value between 0.0 – 2.0 means your system is fine, But a consistent value of 1.7 and above needs to have a look
  • For q quad core processor a load average value between 0.0 – 4.0 means your system is fine, But a consistent value of 3.7 and above needs to have a look

NOTE: There might be changes that your system may spike up of a minutes, so try to look at load average values over 5 min or 15 min interval period for analysis.

Hope you enjoyed reading this article. Thank you..