Lesson 1 of 9 · 20m
The USE Method: Find the Bottleneck Before You Tune
Utilization, saturation, and errors as a repeatable checklist for every resource — the antidote to random tuning folklore.
Most performance incidents are made worse in the first ten minutes. Someone sees high load average, reaches for a half-remembered sysctl flag, and now you have two problems: the original bottleneck and an unexplained kernel change. The USE method exists to stop that spiral. For every resource — CPU, memory, disk, network, even a thread pool — ask three questions: how busy is it, how much work is queued, and is it producing errors?
Utilization, saturation, errors
- Utilization: what percentage of time or capacity is the resource busy?
- Saturation: how much work is waiting because the resource is busy?
- Errors: is the resource failing work, not merely doing it slowly?
The order matters. A disk at 100% utilization with no queue may be fine for a batch job; the same disk with twenty seconds of queued I/O is a production emergency. High CPU utilization with no run-queue buildup is throughput; saturation means users are waiting.
A first-pass system inventory
uptime # load average: possible CPU or uninterruptible I/O saturation
vmstat 1 5 # r queue, free memory, swap, system CPU, blocked tasks
iostat -xz 1 5 # per-device utilization, await, queue depth
sar -n DEV,TCP,ETCP 1 # network throughput and TCP errors
free -m # memory and swap headlineDo not stop at the first suspicious number. load average 48 on a 64-core machine with r=2 is usually threads sleeping in uninterruptible I/O, not a CPU shortage. The numbers only make sense relative to capacity and queueing.
Build a resource checklist
For a Linux host, the first resource list is small enough to memorize:
CPU utilization %, run queue, context switches
Memory used vs cache, swap activity, OOM events
Disk device utilization, await, queue, I/O errors
Network throughput vs link capacity, retransmits, drops
Kernel file handles, sockets, slab pressure, process limitsThen descend one level: per-process CPU, per-cgroup memory, per-filesystem I/O. The trick is breadth first, depth second. You are trying to find the constrained resource class before you spend an hour perfecting flame graphs of the wrong thing.
Document the null result
Write down what you checked and ruled out. Performance work often spans shifts, teams, or weeks. "CPU is saturated, memory and disk look clean at 14:20" is gold when the incident returns at 03:00.
Field notes
- High utilization is a clue, not a verdict; saturation is usually the user-visible problem.
- Load average on Linux includes tasks in uninterruptible sleep, so it is not a pure CPU metric.
- Never tune from a single sample. Take several one-second samples before believing a transient spike.
- Errors count even when latency looks fine: retransmits, disk retries, and OOM kills often precede the slowdown.
Was this lesson helpful?