Lesson 3 of 13 · 13m
Load Average Is Not CPU
Linux load counts runnable and uninterruptible tasks, so load 40 with idle CPUs means storage, not cores.
Load average on Linux is not CPU usage. It is the exponentially averaged count of tasks in two states: R — running or runnable — and D — uninterruptible sleep, the state a thread enters while the kernel handles I/O it cannot back out of. A box with load 40 and 4% CPU is not a contradiction. It is forty threads parked in D on a dead NFS mount, and every load-based alert you have will fire for a machine doing zero work.
BSD systems count only R. Linux folded D in so that processes stuck on storage surface in the one number everyone already watches. The mechanism is deliberate; it just gets misread.
Reading the real picture
vmstat 1 splits the ambiguity cleanly. Column r is runnable-but-queued — CPU starvation. Column b is blocked in uninterruptible sleep — I/O starvation. High r wants more cores or less work. High b wants iostat, not more threads.
top's CPU line — %us %sy %id %wa %st — carries its own trap. %wa counts only CPUs that are idle because they have nothing to do except wait on outstanding I/O. A box where every CPU is pegged in %us while the disk queue backs up reports %wa of zero and still drowns in I/O. %wa can tell you I/O is the problem; it can never tell you I/O is not. The verdict comes from iostat -xz 1: per-device await and aqu-sz show service time and queue depth on the hardware itself.
For per-process attribution, pidstat -u reports CPU and pidstat -d reports per-process disk reads and writes — the difference between "the box is slow" and "logrotate is the thing holding the disk."
The averaging window matters too
The three numbers — 1, 5, 15 minutes — are exponential moving averages, not instantaneous samples. A load of 90 with the 1-minute figure at 140 and falling is a spike draining. The same load rising over 15 minutes is a queue growing. Always read the trend across the three values; the single 1-minute number overstates a flash crowd and understates a slow leak.
Per-core granularity
mpstat -P ALL 1 breaks utilization per core, and it catches the failure load average hides entirely: one thread pegged at 100% while fifteen cores idle. Single-threaded bottlenecks — a serializer thread, one hot event loop — look like "load 1 on 16 cores" while the service dies behind it. /proc/loadavg shows the raw numbers plus running/total task counts and the most recent PID, useful for scripted checks that do not want to parse top. When running is a small fraction of total on an allegedly busy box, the tasks are somewhere else — usually D.
Evidence
The classic incident shape: a monitoring system pages on "load > ncpu" for a healthy database host doing heavy sequential reads. Threads queue in D on saturated storage, load climbs past 100, CPU idles, and the page wakes someone to stare at a graph of a disk doing its job. The inverse happens too — genuine CPU saturation with modest load, when the workload is a handful of threads pegged at 100% each. Load 4 on a 4-core box can be four threads that each want a whole core forever.
The practice
- Normalize load by core count, then read
vmstat'srversusbto pick the resource. %waproves the presence of I/O wait, never the absence — confirm or deny withiostat -xzawait.pidstat -d 1names the process doing the I/O;iotop -odoes it live.- Alert on saturation of the specific resource — await, queue depth, throttle counters — not on load average alone.
Was this lesson helpful?
Keep reading
Related articles from the SudoSecurity blog.
Your Minecraft Server Isn't Slow, It's Misconfigured
Can't keep up! is not a hardware message. It's the server telling you a tick took longer than 50ms, and almost every cause is a default nobody changed. Here's what actually moves MSPT, with the flags that are now wrong and the setting that isn't where every guide says it is.
Your Minecraft Server Wants Java 25, Not Java 26
Every six months the same thread appears and nobody maps the JVM engineering onto what a Minecraft server actually does. This does — version by version, with the flag most guides still tell you to set that will eventually stop your server from booting.
Your Container Is Running SerialGC and Nobody Told You
You tuned G1 flags for a week. Your pod has one CPU, which means the JVM quietly picked a single-threaded collector at startup and ignored every flag you set. Here is the OpenJDK source that made that decision.
How to Debug Minecraft Server Lag with Spark Profiler (2026 Guide)
Your server dropped to 12 TPS. You copied Aikar's flags. You upgraded Java. Nothing changed. That's because JVM flags don't fix plugin bugs. Here's how to find what's actually killing your tick budget.