my webserver running centos 5.7 is showing quite a lot of disk write activity which I cannot explain really.

I run a few websites on this server with the help of nginx and php-fpm and xcache. On the file-system i have added noatime.

Now this is running fine, but I'm seeing a high number of writes per second that I cannot explain. There aren't any files being added, I have disabled the nginx access log. The php-fpm error log and nginx error log are only getting a few lines added to it per minute. I've checked all other logs in /var/log and nothign accounts for the number of writes that are happening.

On average there are about 2 megabytes of data per minute being written, at about 200 IO's per second.

How could I find out what is causing these writes?


You are you presently measuring the 200 IOPS? The iotop utility is a quick way to capture per-process disk I/O stats. You should be able to grab it from the EPEL repository.

  • Does the RHEL5 kernel support I/O task accounting? – Mark Wagner Feb 22 '12 at 2:27
  • 1
    CentOS 5.7/RHEL 5.7 with a recent kernel has the necessary hooks for iotop precompiled in. Kernel 2.6.18-274.12.1.el5 works for sure. – ewwhite Feb 22 '12 at 2:32
  • Thanks for the tip. From what I can see it's mainly nginx worker processes that are doing all the writing. Access Log = Off, so what could nginx be writing? – Mr.Boon Feb 22 '12 at 5:55

Another thing that I did is do lsof partition in question. That will sometimes, not always, show you all the files being opened and hence "worked on"

Doesn't always work though.

If sdd is mounted on home4 just do

lsof /home4

and see for yourself.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.