2

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?

2 Answers 2

6

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.

3
  • Does the RHEL5 kernel support I/O task accounting? Feb 22, 2012 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, 2012 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, 2012 at 5:55
2

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.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .