High Apache CPU usage on 2 GB Droplet

Posted December 28, 2013 11.9k views
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

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.

Submit an Answer
8 answers
I've also tweaked Varnish settings in /etc/default/varnish, but with no positive effect.

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.

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.
If it will help, when I view Top, Apache always spikes, not Varnish just does not even seem to blink.
WordPress best practices recommend Nginx, instead of Apache. Also, you may want to check out 10 Million hits a day with WordPress using a $15 server (but notice that the author of that blog post now uses a $10/mo. DigitalOcean VPS).

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.

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?
Look at the graphs he's using to back up his claim, then picture what "10 millions hits a days" means.

The process of setting up the system is not the misleading part, it's the "10 millions hit a days."
Has anyone been able to figure out what's happening? I got same issue..

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