AlgoViz

Linux CPU & memory triage

easy 6 min

Host utilization reports how busy resources were over an interval.

Video lesson · Chapter 1 of 8

Load rises while the CPU still has headroom

0:00 / 4:59

Theory

Read or listen first. About 1 min.

What it is

Host utilization reports how busy resources were over an interval. Saturation describes work waiting for them. Linux load average includes runnable work and tasks in uninterruptible sleep, so a high load average does not by itself identify CPU demand. Measure pressure and queueing at the boundary where the service runs.

Why it exists

During a batch import, load average increases but many CPUs remain idle. Inspect runnable versus blocked tasks, memory pressure, disk waits and cgroup limits. A large working set can cause repeated reclaim and stalls while CPUs wait. Test a bounded reduction in import concurrency and see which counters move with user latency.

If memory and I/O stalls stay flat while runnable demand rises, inspect group bandwidth limits and core placement.

Load rises while the CPU still has headroom

Run queue → Running worker (dispatch). Running worker → Memory reclaim (stall on allocation). Memory reclaim → Run queue (wake when ready)
Run queue → Running worker (dispatch). Running worker → Memory reclaim (stall on allocation). Memory reclaim → Run queue (wake when ready)

How it works

Step through the idea, or press Play.

Step 1 of 3

Baseline. The interactive workload rarely stalls on memory.

Understand it

Worked incident

Load rises while the CPU still has headroom

ObservationMemory stall time per 10 s (ms)Interpretation
Baseline25The interactive workload rarely stalls on memory.
Incident1500An import expands the working set and stalls consume 1.5 seconds per interval.
After intervention39Limit import concurrency and verify stalls, request latency and batch completion together.
Illustrative measurements from the same workload at three checkpoints.

Choose the next investigation

If memory and I/O stalls stay flat while runnable demand rises, inspect group bandwidth limits and core placement.

Summary

The whole topic in one minute.

Load mixes different waits. Memory stall evidence identifies a distinct bottleneck that extra cores may not relieve.

If memory and I/O stalls stay flat while runnable demand rises, inspect group bandwidth limits and core placement.

Sources