Understanding CPU Utilization vs. CPU Load and Troubleshooting High Load Scenarios
This article explains the difference between CPU utilization and CPU load, describes how to interpret these metrics, and provides practical Linux commands and step‑by‑step methods for diagnosing high load with low utilization or vice versa, including common I/O and indexing issues.
Difference Between CPU Utilization and CPU Load
CPU utilization measures the percentage of CPU time slices actually used by processes, while CPU load represents the average number of tasks either running or waiting for CPU over a period.
Utilization reflects real‑time usage; load reflects current and near‑future demand, so a program can drive utilization to 100% but keep load near 1 if it is the only active task.
On a single‑core system a load of 1 means full capacity; values above 1 indicate queuing. On multi‑core systems the threshold scales with core count (e.g., 4 cores can handle load up to 4 comfortably).
Typical commands to view these metrics are uptime , w , and top .
How to Check Physical CPU and Core Counts
Physical CPU count:
cat /proc/cpuinfo| grep "physical id"| sort | uniq| wc -lCore count per physical CPU:
cat /proc/cpuinfo| grep "cpu cores" | uniqLogical CPU count:
cat /proc/cpuinfo| grep "processor"| wc -lWhen Load Is High but Utilization Is Low
This usually indicates many tasks are blocked, often due to I/O bottlenecks or unindexed MySQL queries causing extensive disk waits.
Scenario 1: Excessive Disk I/O
Heavy read/write requests push many processes into uninterruptible sleep (state D), raising load while CPU stays idle.
Scenario 2: MySQL Without Indexes or Deadlocks
Large table scans or deadlocks generate I/O wait, increasing load without raising CPU usage.
Use top to confirm high load with low utilization, then ps -aux to look for processes in state D.
When Load Is Low but Utilization Is High
This suggests a few CPU‑bound tasks are running for long periods, often due to inefficient, compute‑intensive code.
Identify the culprit with top , locate the high‑usage process, and inspect its code.
Diagnosing 100% CPU Utilization
1. Find the high‑usage process
top2. List threads of that process
top -Hp pid3. Convert thread ID to hexadecimal
printf "0x%x\n" 74317results in 0x1224d
4. Locate the offending code
jstack 72700 | grep '0x1224d' -C5 --colorNote: jstack works on Java process PIDs, not thread IDs.
Common Linux Commands
File and Directory Operations
ls , ls -a , ls -l
touch
cat
more , less
tail -fn 100 xx.log
Permission Management
chmod +x filename (symbolic) or chmod 777 filename (numeric).
chown user:group filename
Compression and Archiving
zip test.zip file (use -r for directories)
unzip file.zip
gzip file (or gzip -c file > file.gz )
tar -cvf archive.tar files , tar -xvf archive.tar , or combined tar -zcvf archive.tar.gz files and tar -zxvf archive.tar.gz
Understanding the distinction between packing (tar) and compression (gzip) helps manage large collections of files efficiently.
For more detailed examples and screenshots, refer to the original article.
Selected Java Interview Questions
A professional Java tech channel sharing common knowledge to help developers fill gaps. Follow us!
How this landed with the community
Was this worth your time?
0 Comments
Thoughtful readers leave field notes, pushback, and hard-won operational detail here.