High Apache CPU usage on 2 GB Droplet

  • Posted December 28, 2013

About to move a site to a 2 GB Droplet, but I keep seeing high CPU usage hyst by clicking on the home or on any other page.

I have Varnish in front of Apache, with APC and PageSpeed configured. Even with that configuration, I still see an Apache process gunning at more than 100% (yes, that’s true).

I’ve messed with the plugins and tweaked mpm-prefork settings, but have not seen any change.

If it will help, here are my prefork settings:

StartServers                     5
MinSpareServers              5
MaxSpareServers           10
MaxClients                   150
MaxRequestsPerChild 3000

Submit an answer
You can type!ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

@natwar86: First you need to find out what process is using up a lot of CPU. You can run “htop” (run <code>sudo apt-get install htop</code> to install it if you do not have it installed it) and then press “P” to sort the processes by CPU usage.

Has anyone been able to figure out what’s happening? I got same issue… <br> <br>

Look at the graphs he’s using to back up his claim, then picture what “10 millions hits a days” means. <br> <br>The process of setting up the system is not the misleading part, it’s the “10 millions hit a days.”

@finid, <br> <br>Did you even bother reading (carefully) the article? What part of it did you find misleading? What part of the article’s recommendations are contrary to WordPress best practices?

@Pablo, <br> <br>Please stop citing that guy’s article. It’s misleading. Theoretical stats can be extrapolated to tell all kinds of tale’s. His is a good tale. Won’t hold up in the wild.

WordPress best practices recommend Nginx, instead of Apache. Also, you may want to check out <a href=“”>10 Million hits a day with WordPress using a $15 server</a> (but notice that the author of that blog post now uses a $10/mo. DigitalOcean VPS).

If it will help, when I view Top, Apache always spikes, not Varnish just does not even seem to blink.

I’ve also tweaked Varnish settings in /etc/default/varnish, but with no positive effect. <br> <br>And just to emphasize that this has nothing to do with plugins, I have a 512 MB Droplet with just 3 plugins, but still showing the same high CPU usage. <br> <br>On both Droplets, I’m using Quick Cache, but the choice of caching plugins does not seem to matter, because I’ve used them all, including W3 Total Cache and Wp Super Cache.