Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

As far as what I know , I think apache web server handles multiple requests through a combination of multi-processing and multi-threading. Want to know for a php application running a webserver is it just the apache which decides the concurrent users it can handle or it also depends on the php application. If yes, then to what extent?

share|improve this question

There's only one way to know, by testing under real load.

Basically you setup multiple client 'bashers' that are scripted to behave like real users but can run lots of sessions concurrently. Do this for a long enough period, measure load (cpu, mem, network, storage), look for where things break - there's usually a quite clear load point over which you start getting truncated sessions, timeouts etc. - that's your server's limit.

You can guess and get close but it'll only ever be a guess until you've tested.

Oh and by the way, there are lots of external companies out there who specialise in testing for you.

share|improve this answer
+1 for all the right reasons. – mfinni Apr 16 '10 at 20:33

http_load, siege, jmeter, ab are all tools that can allow you to do some simulation of load. However, without writing some complicated scripting, you aren't really testing things well. While Ian Bicking mentioned this more for wsgi testing, the same issues come up when dealing with webapps.

When you benchmark, are you using a local connection where every test is considered a fast client? Are they doing posts, slow uploads, hitting pages you didn't anticipate, testing your authentication mechanism, losing cookies, etc?

Your webserver plays a pretty big part of the bottleneck, but, your application code, how it is written, how it interacts with the database, how the database reacts to the queries, updates, etc all come into play. Things that you expect to work while benchmarking will break in odd and mysterious ways when traffic hits certain levels. Moving some of the load off the application server to static content servers buys you more time.

Your choice of apache's processing model also has a lot to do with things. Apache2-prefork is what most people use for mod_php, but, apache2-mpm-worker/fcgid php can be faster. Offloading static content to Varnish or Nginx can also ease some of the load on your application server which buys time.

Everything has an impact somewhere. Most of the webapp performance issues I've seen come from poor use of the SQL backend or configuration errors in Apache.

share|improve this answer

Your Answer


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.