Server load problems. Varnish vs Nginx vs Apache vs PHP DSO vs FCGI vs suPHP vs APC vs eAccelerator vs memcached

After noticing one of my servers was down i needed a solution to the server load problems i was having.

My sites on the server usually handle the loads that are on them but i was getting a huge spike in traffic that was causing the server to start swapping in and out of the swap….. which snowballed and caused the server to go from a load average of about 1 to well over 100!!!

What was to be done?

I already use supercache on all my sites along with widget cache.  This helps greatly but the problem is i am running multiple sites on these servers and i really need to prevent the servers from becoming overloaded.


I was using Apache + mod_fcgi and nginx on cpanel.  It worked well until i went over a certain amount of traffic at the same time.

I quickly replaced nginx with the varnish cpanel plugin which helped a little and caused the load to drop.

I also noticed that FCGI was running away with processes and helping cause the swapping.  Exchaning this for suPHP did help but i found the performance wan’t anywhere near as good.

As i am the only person on the server i have since moved to DSO which dropped my load average down to around 1 which is perfect for me.

The only problem being that dso runs as the apache user nobody:nobody.   as i wanted to change from super cache to w3 (as i’ve seen some stats indicating that w3 total cache can handle a higher load) i have had to go through sorting file permissions of each site so that the W3 plugin can write the cache.

playing around with APC , eAccelerator and memcached  i have found the best results are in using enhanced disk for my page cache and APC for the database, object and minify.  MY sites are now ready for any spike in traffic that can be thrown at them!