5

I've got a constant 1.4 megabytes/sec of IO read on one server (see iostat output below). What can I do to find which process is the cause ? I already tried iotop and htop, but could not pinpoint the issue with thoses:

Linux 2.6.35.4-x86_64-linode16 (la-machine)     02/16/11    _x86_64_    (4 CPU)

avg-cpu:  %user   %nice %system %iowait  %steal   %idle
       0.16    0.01    0.11    0.68    0.01   99.03

Device:            tps    MB_read/s    MB_wrtn/s    MB_read    MB_wrtn
xvda             42.29         1.39         0.08     568159      30959
xvdb              0.45         0.00         0.00        988       1202

Any hint on either using htop/iotop or another tool to help me find out which process is eating the disk ? (This is a server with 0 traffic currently).

Thank you!

Thibaut Barrère
  • 651
  • 1
  • 9
  • 17

4 Answers4

3

http://www.linuxinsight.com/proc_sys_vm_block_dump.html

Set vm.block_dump for a second, and then turn it off immediately (sysctl -w ... ; sleep 1; sysctl -w ...). dmesg then reveals all the low-down.

poige
  • 9,171
  • 2
  • 24
  • 50
3

As you already used iotop,I am not sure how much this is useful,but you can use systemtap like

stap -v iotop.stp

and it will give you output

     Process       KB Read  KB Written
        Xorg            21           0
       crond            10           0
       wfica             2           0
Prashant Lakhera
  • 683
  • 1
  • 9
  • 25
1

try with process accounting.

tools like atop in pair with process accounting will be able to show you what processes are using the disk I/O the most.

you can also check "sa" command line tool to interpret process accounting info and sort processes by (average)number of I/O operations

Hrvoje Špoljar
  • 5,162
  • 25
  • 42
0

Well, you can start by running lsof to narrow down which processes have files open on whatever filesystem is on /dev/xvda. Check your /etc/fstab to determine which filesystem that is.

Phil Hollenback
  • 14,647
  • 4
  • 34
  • 51