1

I have an Apache webserver on CentOS. It is not doing anything fantastic or complicated at all but it does at intervals experience a high load (120 for 4 CPUs) for some reason. During this time I see high waits and write durations. I have narrowed this down to flushing of dirtypages to disk to make room for new data.

I have tried many things and talked to the developers who are also puzzled by this. I am stumped.

Details: vmware virtual guest server 4 cpus 12G RAM Apache PHP

I have 40 servers in this cluster that share the same disk structure. Only the webservers are experiencing this issue.

What I think is happening is the dirty pages are full and overflowing. So the flush is switching to a synchronous write and blocking all other I/O until finished.

I have set the following in sysctl.conf:

vm.dirty_background_ratio = 5

vm.dirty_ratio = 10

No real impact though. I added more RAM and again no real impact.

Any ideas?

1 Answer 1

0

Try setting bigger difference between vm.dirty_ratio and vm.dirty_background_ratio. For example vm.dirty_ratio=40 and vm.dirty_background_ratio = 5. Anyway, strange, that web servers write so much to disks. Check what and where is written.

3
  • I'll give that a go and let you know how it turns out. I agree very strange, I have never observed this type of behavior in a webserver before. May 30, 2014 at 13:44
  • Still seeing Load spikes and the I/O is still slow but not blocking anymore. I'll increase the difference even more and see how that turns out. Jun 4, 2014 at 18:05
  • Changed to: vm.dirty_background_ratio = 5 vm.dirty_ratio = 80 Jun 9, 2014 at 17:37

You must log in to answer this question.

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