I have a webserver running on an IBM blade, hardware configuration is:
Intel Xeon E5506 x 2 (8 cores)
12G mem
SAS disk raid1
I use this box as a dedicated webserver serving a dozen of simple php scripts. They do mysql queries and return result codes. There is no pictures, no static files. The mysql server runs locally. Currently I'm using apache2. The purpose is to serve as many clients as I can using this server. I'm wondering what is the best value for the following configuration parameters:
MinSpareServers
MaxSpareServers
MaxClients
I'm also thinking of switching to nginx + php fastcgi. If I use this type of setup, how should I configure:
how many fastcgi processes
how many worker_processes
worker_connections
Please give your recommends based on your experience. Thanks!
It's impossible for anyone to provide an answer on this.
WTF? for most of us the problem is making the system accommodate the demand - but this statement implies that you can manipulate the demand to accommodate the capacity?????
The only way you're going to get an answer to this is by testing it out for yourself. There are lots of tools for stress testing a webserver - Apache should come with 'ab' out of the box. But for preference you should run the clients on other boxes.
nginx should be a bit faster than apache. But do apply the standard HTTP tuning stuff (i.e. cache sensibly, use compression, a PHP opcode cache). If you can generate sensible workloads, do try run mysqltuner.
I'm not overly familiar with nginx, but for apache you should be setting MaxRequests to something sensible (say 5000). Your settings for spareservers will depend on the profile of the workload - does it change a lot or is it fairly constant?
Do enable slow query logging in mysql with a low threshiold and setup your apache to log %D.