Need some tips for tuning the web server

We are currently using LSWS to power a number of Wordpress installations on a 2GB VPS slice. The VPS slice is dedicated for serving LSWS requests (so MySQL is served remotely), LSWS is the latest (4.0.10 Enterprise), PHP is 5.2.10 with APC and Memcache enabled. The Wordpress installations all have W3 Total Cache enabled too.

However, we are still seeing relatively high server load. From 'top', it appears that lsphp5 processes are using quite a bit of CPU power.

High cpu usage stats is normal but it does not affect performance or any other areas of the server. We average between 1.8 to 3.5 during busy times and our server is blazing fast with mysql, php and many other service running. Nothing to worry about with your cpu usage.

The reason for my post is that, the posted server load was taken during off peak time, and the current server only hosts a small portion of our sites. We are planning to migrate our larger sites to the same server in the upcoming weeks, and I was a bit worried that the server might not coupe very well once the larger sites are up and running. :|

Max idle time and connection keepalive timeout should not be set. Initial request timeout should be around 60.

What you see probably is normal as LSWS uses minimum number of persistent PHP processes to serve all requests, CPU utilization may looks like for indivudal process, but the overall system level CPU utilization is lower.

Another note on W3 Total Cache, looks like everything is still served by PHP, just cached by memcache or something. it is slower than WP super cache, if you do not need to keep everything dynamic or any specific need for features in W3 Total Cache, WP super cache is a better choice for busy blog site. Serving a static page is 100X faster than serving a PHP page.

Thank you mistwang! I've unset max idle time and connection keepalive timeout and set the initial request timeout to 60 per your instruction. On a busy site though, wouldn't that cause unneccesarry overheads? i.e. too many idle/keep alive connections?

It's interesting that you mentioned the two Wordpress caching plugins, I am always under the impression that because memcache is caching on the memory level, it will be faster than serving static pages. I briefly benchmarked WP Super Cache and W3 Total Cache before rolling the latter one to all our Wordpress installations, and the result was in favour of W3 Total Cache. I guess I should do a more comprehensive benchmark later on, just to make sure we are on the right track.

Thanks mistwang. I had looked into the possibility of a small scale DoS attack. But at the time of the high load (which sustained for about 10-15 minutes), requests per second was only about 50-60, which the server should have handled it without causing such a high load. There was no cron jobs running at the time, no errors from either the server log or PHP log.

Looks like there wasn't enough memory allocated to lsphp5, I didn't realise APC shm size is counted towards the memory limit. I have increased the memory limit now and hopefully this problem will go away.