Take the 2-minute tour ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

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?

share|improve this question

2 Answers 2

up vote 6 down vote accepted

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.

share|improve this answer
    
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.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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