Understanding CPU load Average
Understanding CPU load Average
================================================================
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
2
$nproc
2
$lscpu | grep “CPU(s)”
CPU(s): 2
Understanding the load Average numbers – Let us take a few example load to understand the load averages
1. Assuming that we are having single core processor with the below load average details
$uptime
02:28am up 395 days 11:53, 1 user, load average: 0.73, 0.69, 0.71
| | |
load avg. over last 1 min —————————— | |
load avg. over last 5 min ———————————– |
load avg. over last 15 min —————————————-
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%
2. Again a single core with some heavy load on the CPU
$uptime
9:36pm up 445 day(s), 14:27, 1 user, load average: 1.05, 0.70, 5.09
| | |
load avg. over last 1 min —————————— | |
load avg. over last 5 min ———————————– |
load avg. over last 15 min —————————————-
We can interpret the above numbers as in below statements
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)
3. Two core processor with load average as below
$uptime
9:36pm up 445 day(s), 14:27, 1 user, load average: 2.00, 1.70, 1.09
| | |
load avg. over last 1 min —————————— | |
load avg. over last 5 min ———————————– |
load avg. over last 15 min —————————————-
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
load avg. 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.
Leave a Reply
You must be logged in to post a comment.