Disk IO Spike

I have linode 512 on Ubuntu 10.04. I've configured my MySQL and Apache prefork MPM like it says on here: http://library.linode.com/troubleshooti … networking">http://library.linode.com/troubleshooting/memory-networking but I'm still experiencing occasional Disk IO spikes which slows/crashes my system. I've read on the other posts to keep my MaxClients around 20 and turn KeepAlive off but I don't know what I should do with the other parameters in my worker MPM. Here's what it looks like now:

 <ifmodule mpm_worker_module="">StartServers          2
    MinSpareThreads      25
    MaxSpareThreads      75
    ThreadLimit          64
    ThreadsPerChild      25
    MaxClients           25
    MaxRequestsPerChild  0</ifmodule> 

I can't turn my MaxClients down anymore unless I turn my ThreadsPerChild down, but I don't what it all actually means. How do I optimize it so that it'll stop crashing?

6 Replies

If you're using the prefork MPM (which you should only be doing if you're using mod_php), the stuff in the section will be ignored.

And apache2ctl -M | grep mpm should tell you whether you're using the prefork or worker MPM.

@Vance:

And apache2ctl -M | grep mpm should tell you whether you're using the prefork or worker MPM.

I'm using worker MPM

In that case, MaxClients shouldn't need tuning; this is mostly applicable for those who use mod_php to run PHP scripts within Apache.

What are you using between Apache and MySQL?

I'm using Ruby on Rails 3

So I've tuned by worker mpm MaxClients to 25 and KeepAlive Off for 2 weeks now and it hasn't crash. Swap IO hasn't been spiking as much, spikes to 0.2k once a week. What i'm noticing is in my IPv6 traffic, I'm starting to see "Priv Out" and "Outgoing" rates. I've up my MaxClients to 50 to see how it goes. Should my MaxRequestsPerChild be tuned something else other than 0?

Reply

Please enter an answer
Tips:

You can mention users to notify them: @username

You can use Markdown to format your question. For more examples see the Markdown Cheatsheet.

> I’m a blockquote.

I’m a blockquote.

[I'm a link] (https://www.google.com)

I'm a link

**I am bold** I am bold

*I am italicized* I am italicized

Community Code of Conduct