AAF: AAOBloggers

:)

See how fast your server/webhost really is!

with 14 comments

as i wait for my boss to show up, i’ll write this nice little post about a tool I “discovered” today.
Most of you have probably heard of apache. one tool that comes with it is a benchmarking tool called ab. this tool can be used to preform benchmark tests on any HTTP server (not only apache) and supports a whole bunch of options. most of these options are for special cases, but for a basic setup (99.999999% of the web’s servers*) the following command is all you need:

ab -c [Number of users] -n [Number of requests] http://%5Bdomain%5D:%5Bport%5D/

where
Number of users: the number of concurrent users the tool should simulate.
Number of requests: the number of requests ab should generate.
Domain: sites domain e.g. example.com
port: normally 80, sometimes 8080. can be something else

this can be used to benchmark local and remote servers. i have posted the output of ab after a ran it to test my server (ab -c 10 -n 1000 http://localhost:80/):

Server Software:        Apache/2.2.11
Server Hostname:        localhost
Server Port:            80

Document Path:          /
Document Length:        14593 bytes

Concurrency Level:      10
Time taken for tests:   0.849 seconds
Complete requests:      1000
Failed requests:        0
Write errors:           0
Total transferred:      14942826 bytes
HTML transferred:       14622186 bytes
Requests per second:    1178.15 [#/sec] (mean)
Time per request:       8.488 [ms] (mean)
Time per request:       0.849 [ms] (mean, across all concurrent requests)
Transfer rate:          17192.28 [Kbytes/sec] received

Connection Times (ms)
              min  mean[+/-sd] median   max
Connect:        1    3   2.3      3      16
Processing:     1    5  17.6      3     209
Waiting:        0    4  16.1      2     207
Total:          3    8  17.6      6     210

Percentage of the requests served within a certain time (ms)
  50%      6
  66%      6
  75%      7
  80%      7
  90%      8
  95%     17
  98%     19
  99%    159
 100%    210 (longest request)

as you can see, apache -on the same system- can handle 1178.15 users per second at 17192.28 Kbytes/sec (i wouldn’t mind having that kind of internet speed)

now, lets test a remote server (microsoft.com for example, i’m sure they won’t mind the extra load). [ab -c 10 -n 1000 http://microsoft:80/%5D

Server Software:        Microsoft-IIS/6.0
Server Hostname:        microsoft.com
Server Port:            80

Document Path:          /
Document Length:        0 bytes

Concurrency Level:      10
Time taken for tests:   101.323 seconds
Complete requests:      1000
Failed requests:        2
   (Connect: 0, Receive: 1, Length: 0, Exceptions: 1)
Write errors:           0
Non-2xx responses:      999
Total transferred:      423576 bytes
HTML transferred:       0 bytes
Requests per second:    9.87 [#/sec] (mean)
Time per request:       1013.227 [ms] (mean)
Time per request:       101.323 [ms] (mean, across all concurrent requests)
Transfer rate:          4.08 [Kbytes/sec] received

Connection Times (ms)
              min  mean[+/-sd] median   max
Connect:       13   26  14.4     19      83
Processing:   647  775 1138.3    663   30042
Waiting:        0  743 661.9    661    6704
Total:        664  800 1139.1    684   30060

Percentage of the requests served within a certain time (ms)
  50%    684
  66%    694
  75%    705
  80%    711
  90%    737
  95%    752
  98%    776
  99%   6676
 100%  30060 (longest request)

This benchmark isn’t as accurate as the previous one. (microsoft keeps closing the connection. the first time it did it after 800 req.s the second time it closed it after 400 req.s i had to force it using the -r option to get the full 1000 requests).
microsoft (at the time of this test) can serve up to 9.8 users per second. epic slug.

ab also has the abilty to gennerate plotting data, but i don’t have time to get into this right now. see ya.

SIGTERMer
___
* this number might not be accurate 🙂

Advertisements

Written by seininn

April 27, 2009 at 1:12 pm

Posted in Articles

14 Responses

Subscribe to comments with RSS.

  1. please make it longer next time….
    oh wait there wont be another one because u used up all the letters in the world by writing this one….wait…… I’ve just finished my research and the result of that research is that this is the longest post on earth …………….congratulation………..

    long hair dude

    April 27, 2009 at 1:40 pm

  2. have you even read it?

    sigtermer

    April 27, 2009 at 5:54 pm

  3. no but I heard some guy told me that it’s about micro shit so I’ll try to make a time for it(to read it)

    long hair dude

    April 28, 2009 at 11:00 am

  4. micro? try Massive

    sigtermer

    April 28, 2009 at 11:48 am

  5. massive shit??hum….not bad,that’s even cooler then micro shit because micro shit gives it a value but massive shit make it crash under the shitness.

    bone-crusher

    April 28, 2009 at 12:33 pm

  6. so we agree on calling it massive shit?

    sigtermer

    April 28, 2009 at 1:00 pm

  7. of course….It’s a deal the new name is “massive shit”

    bone-crusher

    April 28, 2009 at 1:02 pm

  8. what is?

    sigtermer

    April 28, 2009 at 1:06 pm

  9. what is what ?

    bone-crusher

    April 28, 2009 at 1:25 pm

  10. what is what is what?

    sigtermer

    April 28, 2009 at 1:35 pm

  11. what is what is what is what?

    bone-crusher

    April 28, 2009 at 1:59 pm

  12. one “forum”ish post is enough dont you think?
    https://aaobloggers.wordpress.com/2009/04/23/google-images-a-new-option/

    sigtermer

    April 29, 2009 at 3:25 am

  13. I agree with you so that is the only one left

    bone-crusher

    April 29, 2009 at 11:03 am

  14. Hey’Ya’ll Try replying on each other’s comment, It’ll be better instead of this catastrophe!!

    Anxious Nut

    April 29, 2009 at 3:22 pm


Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: