Skip to content
AtGlance
Blog
8 min read Niket Chandrawanshi

High Load Average, Idle CPU: Diagnosing Linux Load Correctly

A high load average does not always mean busy CPUs. On Linux, load also counts tasks stuck waiting on disk or network storage. Learn how to tell CPU saturation, I/O stalls, memory pressure and throttling apart using standard tools.

High Load Average, Idle CPU: Diagnosing Linux Load Correctly

High Load Average, Idle CPU: Diagnosing Linux Load Correctly

The alert says load average is 40 on an 8-core server. You log in expecting every CPU to be pinned at 100%, but top shows the processors mostly idle. The application is slow, the load number is alarming, and the obvious explanation does not fit.

This happens because Linux load average is not a CPU metric. It measures demand for the system as a whole, and that includes tasks waiting on storage, not just tasks waiting for a CPU. Reading it as CPU usage leads to wrong conclusions, like adding cores to a server whose real problem is a slow disk or a hung network mount.

This guide explains what Linux load actually measures and gives you a step-by-step way to find out what is behind a high number. Every diagnostic command in this guide is read-only.

What Linux Load Average Really Counts

The three numbers shown by uptime are moving averages over roughly 1, 5 and 15 minutes. On Linux, they count tasks in two states:

  • Runnable (R): running on a CPU or waiting in the queue for one.
  • Uninterruptible sleep (D): blocked inside the kernel, usually waiting for I/O such as disk reads, writes or network filesystem operations.

The second state is the key. A process waiting on a slow disk uses no CPU at all, yet it still adds to the load. That is why a server can show very high load with idle processors.

To put the numbers in context, compare them with the number of CPUs:

uptime
nproc
cat /proc/loadavg

A load roughly equal to the CPU count means the system is fully used. A load far above it means tasks are waiting. Your job is to find out whether they are waiting for CPU or for something else.

Step 1: Separate Runnable from Blocked Tasks with vmstat

vmstat gives a quick split between the two causes. Run it with a one-second interval for a few samples:

vmstat 1 5

Ignore the first line, which shows averages since boot. In the following lines, focus on:

  • r: tasks that are runnable. Consistently higher than the CPU count means CPU saturation.
  • b: tasks blocked in uninterruptible sleep. A high value here points to I/O.
  • wa: percentage of CPU time spent idle while waiting for I/O.
  • si and so: memory swapped in and out. Non-zero values that stay high mean memory pressure.
  • st: CPU time stolen by the hypervisor. On virtual machines, high steal means the host is overcommitted.

This one command usually tells you which path to follow next.

Step 2: If Tasks Are Blocked, Find Out What They Are Waiting On

List processes currently in uninterruptible sleep, along with the kernel function they are waiting in:

ps -eo state,pid,ppid,comm,wchan:32 | awk '$1 ~ /D/'

The wchan column shows where in the kernel the process is sleeping. Names related to block I/O, filesystem journaling or NFS give you a strong hint. Run the command several times. A process that briefly appears in D state is normal; one that stays there is stuck.

For a stuck process, root can view its kernel stack, which shows the full call chain:

sudo cat /proc/PID/stack

Some systems restrict this file for security reasons, so it may be empty or unavailable.

Also check whether the kernel has logged hung tasks:

sudo journalctl -k --since '1 hour ago' | grep -i 'blocked for more than'

These messages appear when a task stays in uninterruptible sleep longer than the kernel's hung task timeout. They include a stack trace that often names the storage device or filesystem involved.

Check Network Filesystems

A common cause of many D-state processes is an NFS or other network mount whose server has become unreachable. Every process touching that path blocks. List network mounts:

findmnt -t nfs,nfs4,cifs

If the stuck processes are accessing one of these mounts, the problem is the network path or the remote server, not the local machine. Be careful when investigating: even running ls or df on a hung mount can block your own shell.

Step 3: Measure Disk Latency and Saturation with iostat

If blocked tasks point to local storage, measure the devices. iostat is part of the sysstat package on most distributions:

iostat -xz 1 5

The -x option shows extended statistics and -z hides idle devices. Key columns:

  • r_await and w_await: average time in milliseconds for read and write requests, including queue time. Rising values mean requests are waiting.
  • Queue size (shown as aqu-sz or avgqu-sz depending on the sysstat version): how many requests are waiting on average.
  • %util: how much of the time the device was busy. On SSDs and RAID arrays that process many requests in parallel, 100% does not necessarily mean the device is at its limit, so read it together with latency.

To find which processes generate the I/O:

pidstat -d 1 5

This shows read and write rates per process. Common findings include backup jobs, log shippers, database checkpoints, package updates and runaway application logging.

Step 4: If Tasks Are Runnable, Confirm CPU Saturation

If vmstat shows a high r value and low idle time, the CPUs really are busy. Look at the per-CPU breakdown:

mpstat -P ALL 1 3

This helps you spot patterns:

  • All CPUs busy in %usr: application code is consuming the CPU.
  • High %sys: the kernel is doing a lot of work, for example from heavy networking, many system calls or memory management.
  • One CPU at 100% while the rest are idle: a single-threaded process or an interrupt bottleneck.
  • High %steal: the virtual machine is not getting the CPU time it expects from the host.

To identify the processes using CPU:

pidstat -u 1 5

Step 5: Use Pressure Stall Information for a Direct Answer

Many modern kernels provide Pressure Stall Information (PSI), which measures how much time tasks spend stalled waiting for CPU, memory or I/O. It answers the question load average cannot: which resource is causing the waiting?

cat /proc/pressure/cpu
cat /proc/pressure/io
cat /proc/pressure/memory

If these files do not exist, PSI is not enabled in your kernel. Each file contains lines like:

some avg10=12.50 avg60=8.20 avg300=3.10 total=123456789
full avg10=6.00 avg60=4.10 avg300=1.50 total=98765432
  • some is the percentage of time at least one task was stalled on that resource.
  • full is the percentage of time all non-idle tasks were stalled at once, meaning no useful work was happening. Depending on the kernel, full may be absent or always zero for CPU at the system level.
  • avg10, avg60 and avg300 are averages over 10, 60 and 300 seconds.

High io pressure with low cpu pressure confirms a storage problem. High memory pressure means tasks are waiting on memory reclaim or swapping, even if free shows some memory available.

Step 6: Check for CPU Throttling in Containers

Containers and systemd services can be slow while the host looks fine, because cgroup CPU limits throttle them. On systems using cgroup v2, each cgroup has a cpu.stat file:

# Example for a systemd service; container paths vary by runtime
cat /sys/fs/cgroup/system.slice/myapp.service/cpu.stat

Look at nr_throttled and throttled_usec. If these grow quickly, the workload is hitting its CPU quota. The fix is to adjust the limit or reduce the workload's CPU use, not to add host capacity.

Per-cgroup pressure files such as cpu.pressure and io.pressure in the same directory show stalls for just that workload. systemd-cgtop gives a live overview of resource use by cgroup.

Security Considerations

High load is not always a performance problem. Sometimes it is a security signal:

  • Unexpected CPU consumers. If runnable tasks belong to processes you do not recognize, especially ones with random-looking names or running from /tmp, /dev/shm or a user's home directory, investigate them as a possible cryptominer or other compromise before you kill them. Record the process details first, as they may be needed for incident response.
  • Process floods. A sudden explosion in the number of processes can be a fork bomb or a misbehaving script. Process limits, such as TasksMax= for systemd services and pids limits for containers, contain the damage.
  • Do not rely on killing D-state processes. Processes in uninterruptible sleep do not respond to signals, including kill -9, until the I/O completes. Fix the underlying storage or network issue instead.

Warning: rebooting to clear stuck processes may work, but a hung storage device or unreachable NFS server can also make shutdown hang. Make sure you have console access, and understand the root cause, or the problem will return after the reboot.

Turning Diagnosis into Better Monitoring

Load average alone is a weak alerting signal. Better signals include:

  • CPU utilization and run queue length for CPU saturation
  • Disk latency rather than throughput or %util alone
  • PSI averages for CPU, memory and I/O where available
  • Throttling counters for containers and services with CPU limits
  • Steal time on virtual machines

Collecting these consistently across hosts, and comparing them with what each host is configured to run, makes it much faster to see whether a problem is local or fleet-wide. That broader view of system state is the kind of infrastructure visibility AtGlance focuses on, and the same metrics are useful in any monitoring stack.

Conclusion

On Linux, load average counts both tasks waiting for CPU and tasks blocked on I/O, so a high number with idle processors is a clue, not a contradiction. Use vmstat to split runnable from blocked tasks, follow blocked tasks to the disk or mount they are waiting on, confirm CPU saturation with mpstat and pidstat, and use PSI and cgroup statistics for a direct view of resource pressure. Diagnose before you scale: the right fix depends on which resource is actually causing the wait.

Found this useful? Share it with your team.

More from the blog