Part 2 of 7 · 2 min read
The USE method
Think of checking a road network after a complaint of delays. For each road you ask three questions: how full is it, are cars queueing to enter, and are there accidents. A road can be full without a queue (fine) or have a queue at modest use (a bad junction). The analogy stops in one place: a road has one lane count, and a computer resource may be used by many tasks at once.
In plain words: The USE method says: for each resource, check three things. Utilisation is the share of time that the resource is busy (or the share of its capacity that is used). Saturation is the amount of extra work waiting that the resource cannot serve now, such as a run queue or a disk queue. Errors are counts of failures, such as I/O errors or out-of-memory kills. The resources are the processors, memory, disks, network and, in software, locks and file descriptors. The method makes a short checklist that finds most bottlenecks, and it stops guessing.
| Resource | Utilisation | Saturation | Errors |
|---|---|---|---|
| Processor | 100 - id in vmstat |
r greater than the number of cores |
rare |
| Memory | used against total in free |
si and so above 0 (swapping) |
OOM kills in dmesg |
| Disk | busy share, wa in vmstat |
b greater than 0, queue length |
I/O errors in dmesg |
A worked example. A web server is slow. The USE checklist takes one minute: vmstat 1 5 for the processor and swap (id, r, si, so), free -m for memory, df -h for space, and dmesg for errors. If id is 0 and r is 8 on 4 cores, the processor is saturated. If id is high and b and wa are high, the processes wait for the disk. If si and so are not zero, memory is short.
The key lines. Utilisation alone can mislead: a resource at 100 per cent with no queue is working at its best, and a resource at 60 per cent with a long queue is in trouble (bursts). Always read saturation.
USE method
The USE method is a way to find performance bottlenecks: for every resource of the system, check its utilisation (how busy it is), its saturation (how much work is waiting for it) and its errors, in that order, before looking at details.
Example: a processor with id at 0 and a run queue (r) of 8 on 4 cores is fully used and saturated.
Check yourself:
1. What are the three letters of USE?
2. Why is saturation more telling than utilisation?
3. Which vmstat column is the run queue?