Trace high CPU and disk I/O on a Linux server

8 steps · about 1 h 39 min · Intermediate

  1. Check utilisation, saturation and errors for every resource (article, Brendan Gregg, 15 min)

    Gives you a checklist so no CPU, disk or network bottleneck is skipped.

  2. Run the ten-command first minute of a performance check (article, Netflix Technology Blog, 12 min)

    Shows which quick commands reveal load, run queues and I/O waits first.

  3. Break CPU and I/O use down per process with pidstat (reference, man7.org, 10 min)

    Lets you name the exact process behind a busy CPU or disk.

  4. Read disk latency and queue depth with iostat (reference, man7.org, 10 min)

    Explains await and utilisation figures that show a saturated device.

  5. Spot the processes doing the most disk I/O with iotop (reference, man7.org, 6 min)

    Adds a live per-process view of reads and writes.

  6. Sample on-CPU stacks with perf record and report (guide, Brendan Gregg, 25 min)

    Teaches how to find the hot functions inside a busy process.

  7. Turn perf samples into a CPU flame graph (guide, Brendan Gregg, 15 min)

    Makes thousands of stack samples readable at a glance.

  8. Watch live hot functions with perf top (reference, man7.org, 6 min)

    Gives a quick live view before committing to a full recording.