I am running a web server (Ubuntu 11.04) that exhibits unexpected high write traffic. When the server is not supposed to write at all, the amount of write traffic is comparable to the read traffic.
Concerned about unnecessary write operation, I tried to analyzed what is going wrong on the system. I can exclude heavy apache logging or access time issues (using noatime mount configuration).
To track down the problem I wanted to see what files where written. Therefore I enabled IO loggin via block_dump (useful blog entry on this topic: sprocket.io). Every filesystem activity will get logged in syslog. Here a short excerpt of my system:
Aug 21 18:22:55 xxxxx kernel: [3984721.590864] apache2(2761): READ block 1098502400 on md2 (8 sectors)
Aug 21 18:22:55 xxxxx kernel: [3984721.594005] kjournald(316): WRITE block 2224394648 on md2 (8 sectors)
Aug 21 18:22:55 xxxxx kernel: [3984721.594029] md2_raid1(260): WRITE block 2925532672 on sdb3 (8 sectors)
Aug 21 18:22:55 xxxxx kernel: [3984721.594044] md2_raid1(260): WRITE block 2925532672 on sda3 (8 sectors)
Aug 21 18:22:55 xxxxx kernel: [3984721.644244] apache2(2761): READ block 2242118744 on md2 (8 sectors)
Ok, now I know what blocks were written. But is there a way to actually identify the filenames that were written based on these block ids?
Thanks for your help!
BTW: I am using a Software Raid, might be part of the problem.