Linux Labs

Inside the system: resources, kernel, processes / Stage 5 of 12

Who loads the disk

Not running Starting usually ~20 s
Leave the lesson

Step 6 of 6 · summary · 3 min

Summary

  • A large wa with small us and sy means the CPU sits idle while processes wait for the disk; such processes are in the D state and in the b column.
  • iostat -dx 1 2 shows which disk is busy: %util is the share of time with requests, w_await is how long one write waits.
  • sudo pidstat -d 1 3 breaks writes down by process, and ps -o unit -p <PID> shows the service of a process.
  • The idle class lets others have the disk: ionice -c3 -p until the process ends, IOSchedulingClass=idle in the unit for every new process of the service.
  • The machine at the start of the lesson was slow while the CPU was free because the export wrote small blocks and waited for each: the disk was busy, and the CPU sat idle in wa.
Ubuntu 24.04
Loading…