0

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!

Long Cheng
  • 247
  • 1
  • 2
  • 8

1 Answers1

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.

symcbean
  • 19,931
  • 1
  • 29
  • 49
  • 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