The pager says load average is 34 on a 16-core database host. You open top expecting a runaway process and find the CPUs 93% idle, no process above 4%, and a 1-minute load that keeps climbing anyway. That gap between the load number and the CPU graph is the whole problem, and it comes from an old rule of thumb that does not hold on Linux: the idea that load average measures how busy the processors are.

On Linux it measures something wider. It counts tasks that want a CPU and tasks that are stuck waiting inside the kernel in a state that cannot be interrupted, which in practice means waiting on disk, on a network filesystem, or on memory being freed.

Break the "load equals CPU" rule in your head, and the high load with idle CPUs stops being a mystery and becomes a pointer: something is making tasks wait, and the job is to find out what.

What the three numbers actually count

Every 5 seconds the kernel counts tasks in two states and folds the count into three moving averages, one each for 1, 5 and 15 minutes. A few terms make the mechanics clear.

Load average: an exponentially damped moving average of the number of tasks that are running, waiting to run, or in uninterruptible sleep. The three figures in uptime, top and /proc/loadavg are the same calculation with different damping windows.

Uninterruptible sleep (D state): a task that is blocked inside the kernel and will not wake up for signals until the operation it waits on finishes. Disk reads, some NFS operations and certain memory reclaim paths put tasks here. ps and top show such tasks with the letter D.

iowait: time during which a CPU was idle while at least one I/O request it issued was outstanding. It is a flavour of idle time, so a busy disk can produce high iowait or almost none depending on how many cores are idle, which makes it a weak signal on machines with many cores.

Pressure Stall Information (PSI): counters in /proc/pressure, available since kernel 4.20, that report the share of time tasks were stalled waiting for CPU, memory or I/O. Unlike load, it is expressed as a percentage of wall-clock time.

The averaging works like this, applied at each 5-second sample:

load_new = load_old * e^(-5 / (60 * m)) + n * (1 - e^(-5 / (60 * m)))

m = window in minutes (1, 5 or 15)
n = tasks running, runnable or in D state at this sample

decay factor per sample:
  1 min   e^(-1/12)  = 0.920
  5 min   e^(-1/60)  = 0.983
  15 min  e^(-1/180) = 0.994

The kernel stores these factors as fixed-point integers, 1884, 2014 and 2037 out of 2048, which work out to the same 0.920, 0.983 and 0.994. Now plug in a hung NFS server. Suppose 30 tasks enter D state at once and nothing else runs.

After 1 minute, or 12 samples, the 1-minute load is 30 times (1 minus 0.920 to the 12th power), about 30 times 0.63, so roughly 19. After 5 minutes it is close to 30. The 15-minute figure takes about 15 minutes to reach 19. That is why the three numbers diverge during an incident. Five minutes into this one they read about 30, 19, 9, which means "started a few minutes ago"; three minutes after the server comes back they read about 2, 16, 25, which means "fading".

The fourth field of /proc/loadavg tells you which half of the definition you are looking at. A line like 29.87 18.52 8.14 2/913 48211 says only 2 of 913 tasks are runnable right now. With a load near 30 and 2 runnable tasks, the other 28 are in D state. That single line often settles the question before you open any other tool.

Finding the blocked tasks and what they wait on

The goal is to move from "load is high" to a named process and a named resource. The commands below, run in this order, usually get there in under 10 minutes.

cat /proc/loadavg
nproc
vmstat 1 5
ps -eLo state,pid,tid,wchan:32,comm | awk '$1 == "D"' | sort -k4 | uniq -c -f3 | sort -rn | head
iostat -xz 1 3
cat /proc/pressure/io
cat /proc/pressure/memory

Start with vmstat. Its r column counts runnable tasks and its b column counts tasks blocked in uninterruptible sleep. If b sits at 25 while r stays at 1 or 2 and the id column shows 90% idle, you have confirmed that the load is waiting, not computing.

If r is the large number instead, the load really is CPU demand and the "low CPU" you saw was probably an average across many cores: one core pinned at 100% on a 64-core host shows as about 1.6% total, so check per-core usage with mpstat -P ALL 1 before going further.

Next, list the D-state threads with ps. The -L option matters because load counts threads, and a single process with 200 blocked threads shows as one line without it. The wchan column names the kernel function each task sleeps in.

Function names containing nfs or rpc point at a network filesystem; names involving page or folio locks, writeback or block layer waits point at local storage; names involving reclaim or compaction point at memory pressure. On a host where you are root, /proc/PID/stack for one of those tasks shows the full kernel call chain.

Then confirm the resource. iostat -xz shows per-device utilisation, queue size and await, the average time in milliseconds a request spends queued and serviced. A spinning disk with await of 400 ms, or a cloud volume that has hit its provisioned IOPS ceiling, explains a pile of blocked tasks. Treat the %util column carefully on SSD and NVMe devices: they serve many requests in parallel, so 100% util does not mean the device is saturated.

Finally, read PSI. The io file has two lines. The some line reports the share of time at least one task was stalled on I/O, and the full line the share of time all non-idle tasks were stalled at once. Values like some avg10=62.00 mean that over the last 10 seconds, tasks were waiting on I/O 62% of the time, which is a direct measure of the pain users feel and a far better alerting signal than load.

Causes beyond a slow disk

A saturated local disk is the textbook cause, but several others produce the same picture of high load and idle CPUs, and each has a recognisable signature.

Hung network filesystems are the classic. An NFS mount with the hard option, which is the default, makes processes wait forever for a server that has stopped answering. Every process that touches the mount, including shells running ls or monitoring agents calling df, joins the D-state queue.

The load can climb past 100 on a machine doing nothing, and it falls only when the server returns. grep nfs /proc/mounts and the wchan column usually reveal it within a minute. Some teams switch to soft mounts to avoid this, which trades hangs for I/O errors that applications may not handle, so that decision belongs to the data owner.

Memory pressure is the second. When a host runs short of free memory, tasks that allocate may enter direct reclaim and wait while the kernel writes dirty pages or swaps. Pages faulted back in from swap are disk reads. CPU stays low, load climbs, and /proc/pressure/memory shows stall percentages rising. vmstat's si and so columns, swap in and swap out, show the traffic in kilobytes per second.

Containers add a measurement trap. The load average is a host-wide number, and uptime inside a container reports the host's load, not the container's, unless a tool such as lxcfs virtualises it. A container that looks idle can therefore show load 40 because a neighbour on the same node is hammering a shared volume. On Kubernetes nodes, check load and PSI at the node level, and use cgroup-level pressure files where your kernel exposes them.

Thread-heavy runtimes are the fourth. A service with a large thread pool that logs synchronously to a slow volume can put hundreds of threads into D state for a few milliseconds each, many times per second. The 5-second sampling catches enough of them to keep the load high, even though no single wait looks dramatic.

Last, a short list of historical oddities: some drivers and kernel threads used to sleep in D state while idle, inflating load on otherwise quiet machines. Modern kernels mark many of these waits as idle so they are not counted, but on old kernels a constant load of 1 or 2 on an idle box can come from exactly that, and it is harmless.

Killing stuck tasks, other kernels and the core-count rule

Why can't I kill the processes stuck in D state?

A signal is acted on only when the task returns from the kernel wait, and a task in uninterruptible sleep does not return until the I/O completes or fails. That is why kill -9 often has no visible effect on tasks waiting on a block device or a misbehaving driver, and if the device never answers, a reboot may be the only way out. NFS is the exception: since kernel 2.6.25 its waits use a killable variant of this state, so SIGKILL does end them, which is why the old intr mount option was retired.

Do other operating systems count load the same way?

No. Linux started counting uninterruptible tasks in a 1993 kernel change, so its load average measures demand for CPU plus certain kinds of waiting. Most other Unix-like systems count only CPU demand, which means a load of 20 on Linux and on a BSD host can describe very different situations.

Does load average count threads or processes?

Threads. The kernel schedules tasks, and each thread is a task, so a single Java or Go process with 200 threads blocked on a slow log volume can add 200 to the load on its own, while ps without thread options shows one line.

Is a load equal to the core count a problem?

For CPU-bound work, a load that stays at about the number of cores means every core is busy with no queue, which is fine. When the load is mostly D-state tasks, the core count is irrelevant, and the useful question is how long tasks are waiting, which PSI and iostat answer and load average cannot.

Before the next incident, add the avg60 value from the some line of /proc/pressure/io and /proc/pressure/memory to your host dashboards, next to the load graph. Node exporter exposes PSI as metrics on kernels that support it. The next time load and CPU disagree, the pressure graph will already tell you whether tasks are waiting on storage or on memory, and the ps command above will tell you which ones.