[GLLUG] Swapin in iotop

Nix nix at esperi.org.uk
Fri Mar 8 21:13:04 UTC 2013


On 8 Mar 2013, Tom Taylor stated:

> Does anyone know what this metric actually refers to?

iotop --help tells you:

,----
| DISK READ and DISK WRITE are the block I/O bandwidth used during the
| sampling period. SWAPIN and IO are the percentages of time the thread
| spent respectively while swapping in and waiting on I/O more generally.
`----

These figures are accumulated within delayacct_blkio_start() /
delayacct_blkio_end() pairs in the kernel, which is done from
io_schedule()/io_schedule_timeout() around the time when a task is being
put to sleep by something that believes it has initiated I/O. This in
its turn is only considered swap I/O if the DELAYACCT_PF_SWAPIN flag was
set in the task's delays flags, which is only true inside
do_swap_page(). So this does indeed signify swapping.

> I can see processes showing with a % of SWAPIN on a box that isn't swapping
> anything to disk.

It might well be a minor page fault, with the page coming out of the
swap cache rather than on-disk swap.

-- 
NULL && (void)




More information about the GLLUG mailing list