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.

Recently we get a lot more traffic to our webserver and sometimes it doesn't respond anymore. We have changed some settings and to get an idea of what our server can handle I've run some ab tests.

We changed the my.cnf to the my-large.cnf (http://fts.ifac.cnr.it/cgi-bin/dwww/usr/share/doc/mysql-server-5.0/examples/my-large.cnf.gz) and set the maximum connections to 350

The problem is that I'm not sure if the results mean that it can handle a lot (a 1000 simultanious users) or not?

if run a test like this:

 ab -n 10000 -c 100 www.mysite.com 

I get a result like this

Server Software:        Apache/2
Server Hostname:        www.mysite.com
Server Port:            80

Document Path:          /
Document Length:        29311 bytes

Concurrency Level:      100
Time taken for tests:   704.062 seconds
Complete requests:      10000
Failed requests:        1634
   (Connect: 0, Receive: 0, Length: 1634, Exceptions: 0)
Write errors:           0
Non-2xx responses:      1634
Total transferred:      255952902 bytes
HTML transferred:       251613362 bytes
Requests per second:    14.20 [#/sec] (mean)
Time per request:       7040.615 [ms] (mean)
Time per request:       70.406 [ms] (mean, across all concurrent requests)
Transfer rate:          355.02 [Kbytes/sec] received

Connection Times (ms)
              min  mean[+/-sd] median   max
Connect:       11   16   3.1     15     105
Processing:    91 6998 16245.3   5384  237924
Waiting:       90 6814 15642.3   5296  237923
Total:        105 7014 16245.3   5399  237939

Does this mean the server should be able to handle 10000 user?

Our server specs:

  • Intel Xeon Quad Core
  • 1GB Dedicated RAM
  • 2GB SWAP RAM

I would think this should be able to handle some traffic?

share|improve this question
add comment

2 Answers

ab is a great tool if you need to perform simple tests.

If your site is static and contains only one html document, then you can rely on ab. But I do not think this is the case.

If your site is dynamic, it contains files css, javascript, images, ajax, headers cache, etc. ... So ab does not correctly simulate users and your benchmark is not relevant.

How to do a relevant benchmark?

You can use Jmeter for example. Jmeter offers a proxy that can record the traffic on your browser. You can then play it X times to simulate a nomber of users.

There are of course also many commercial solutions (appliances, cloud, etc.)

share|improve this answer
    
and what should I use instead? –  dazz May 22 '12 at 7:48
    
I just edit my answer with an opensource solution :-) –  Yohann May 22 '12 at 8:01
add comment

if run a test like this:

Then, depending on how badly your webserver is configured you may get different results each time. Indeed, you might want to set a tuning objective of reducing the variation between consecutive runs. And you really don't want to be doing this on your live server.

Does this mean the server should be able to handle 10000 user?

No. The number of users is irrelevant to the amount of traffic a webserver can handle - the limit is the number of concurent requests. If you want to know how many users the server can handle you're going to have to do some very serious modelling including looking at things such as bandwidth and RTT (recording and replaying a session does not give an accurate picture, although it's better than just hitting a single URL).

I'm not sure if the results mean that it can handle a lot or not

How much is a lot?

We have changed some settings

Now we're getting to something usable. How do the metrics compare with before you applied the changes?

share|improve this answer
add comment

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.