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 1 of 6 · on a machine · 4 min

The CPU is free, the machine is waiting

What you will learn

  • Recognise waiting for the disk by wa and the b column in vmstat and by processes in the D state.
  • Find the busy disk in iostat -dx, and the process holding it in pidstat -d.
  • Let other processes have the disk with the idle class in ionice and keep the class in the service unit.

In the morning the shop website responds slowly. You open top and see that programs barely use the CPU. Look at where its time goes.

Exercise · look

See what the CPU is doing

Look at the first three lines of top, then at five vmstat snapshots, one per second.

First, predict

Programs barely use the CPU. Which column of the cpu group in vmstat will be the largest?

Now start the exercise, run the command and compare your prediction with the output.

Sign in and start The machine is available after signing in
Check yourself 1 question

Programs use a few percent of the CPU, id is near zero, wa is above 90, and the bo column shows thousands. What is going on on the machine?

  • An overloaded CPU would show large us and sy and a queue in the r column. Here us is in single digits, and r is 0.

  • Swap traffic shows in the si and so columns — they are zeros, and free -m shows Swap 0: the machine has no swap.

  • Time taken by the host is the st column, and it is 0.

The CPU is idle: a process is waiting for its write to reach the disk.

Ubuntu 24.04
Loading…