Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

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!

share|improve this question

1 Answer 1

It's impossible for anyone to provide an answer on this.

The purpose is to serve as many clients as I can using this server

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.

share|improve this answer
    
Sorry but my purpose of this question is to get a common sense on what I can expect from this type of setup, then I can use ab or other test tools to stress load the server and make sure everything is ok. If I don't know what is the server's potential, how should i understand any test results. –  Long Cheng Apr 11 '11 at 10:57

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.