Install the sysstat package
apt-get install sysstat
# iostat -m
Linux 2.6.27-14-generic (slowaris) 07/28/2009 _x86_64_
avg-cpu: %user %nice %system %iowait %steal %idle
4.88 6.65 3.03 1.49 0.00 83.95
Device: tps MB_read/s MB_wrtn/s MB_read MB_wrtn
md0 221.24 0.64 0.78 1765002 2159490
We can see that I/O isn’t terribly high here, but there are 221 transfers per second going on.
To check what processes are causing I/O
echo 1 > /proc/sys/vm/block_dump
tail -f /var/log/syslog | grep md0
Jul 28 08:20:12 server kernel: [2752582.434647] kvm(17362): READ block 1017744552 on md0
Jul 28 08:20:12 server kernel: [2752582.502401] kvm(17362): READ block 615283608 on md0
Jul 28 08:20:13 server kernel: [2752582.634622] kvm(17362): READ block 1017744576 on md0
Jul 28 08:20:14 server kernel: [2752583.964709] kvm(17362): READ block 1017744608 on md0
Jul 28 08:20:14 server kernel: [2752584.372889] kvm(1868): dirtied inode 17367041 (live-default-32.img) on md0
Jul 28 08:20:14 server kernel: [2752584.372908] kvm(1868): dirtied inode 17367041 (live-default-32.img) on md0
We see that kvm is causing some disk I/O; now where know where to start investigating!
To turn off these messages
echo 0 > /proc/sys/vm/block_dump