ab Results Before and After Server Move

Posted on in System Administration

Electronic Eye

Behold, the benefits of virtualization!

I spent most of the evening preparing to move a few websites. I decided to do some benchmarking just to see what sort of improvement I was getting from the new server setup. Although the old server didn't feel slow when browsing sites, the results of the benchmarking were even better than expected.

The old server has 768 MB of RAM, one Pentium 4 processor running at 2.40GHz with hyper-threading enabled, and an IDE hard drive. It's running an old version of Fedora, Apache 2.0, and MySQL 4.1. Here's the output (with website name obscured) from ab:

$ ab -kc 10 -t 30 http://www.03323fdf.com/
This is ApacheBench, Version 2.3 <$Revision: 655654 $>
Copyright 1996 Adam Twiss, Zeus Technology Ltd, http://www.zeustech.net/
Licensed to The Apache Software Foundation, http://www.apache.org/

Benchmarking www.03323fdf.com (be patient)
Finished 42 requests


Server Software:        Apache
Server Hostname:        www.03323fdf.com
Server Port:            80

Document Path:          /
Document Length:        31366 bytes

Concurrency Level:      10
Time taken for tests:   30.625 seconds
Complete requests:      42
Failed requests:        1
   (Connect: 0, Receive: 0, Length: 1, Exceptions: 0)
Write errors:           0
Keep-Alive requests:    0
Total transferred:      1327075 bytes
HTML transferred:       1317373 bytes
Requests per second:    1.37 [#/sec] (mean)
Time per request:       7291.637 [ms] (mean)
Time per request:       729.164 [ms] (mean, across all concurrent requests)
Transfer rate:          42.32 [Kbytes/sec] received

Connection Times (ms)
              min  mean[+/-sd] median   max
Connect:       29   34   4.9     33      53
Processing:  3941 5957 1922.5   5550   15562
Waiting:     2715 4097 1737.3   3673   13459
Total:       3971 5991 1922.8   5584   15599

Percentage of the requests served within a certain time (ms)
  50%   5584
  66%   5805
  75%   6341
  80%   7012
  90%   7531
  95%   8759
  98%  15599
  99%  15599
 100%  15599 (longest request)

Wow, that looks horrible, doesn't it? Like I said in the opening paragraph, browsing the few sites still running on this server does not feel this slow. Obviously, ab is putting a pretty hefty load on the server.

The new setup uses two servers instead of one. They are running on VMware ESXi 4.1 with 512 MB of RAM, 2 Xeon VCPUs, and paravirtualized iSCSI storage. They are running Ubuntu 10.04 LTS, Apache 2.2, and MySQL 5.1. The database and web servers are running on separate hosts. Here again is the output (with website name obscured) from ab:

$ ab -kc 10 -t 30 http://www.03323fdf.com/
This is ApacheBench, Version 2.3 <$Revision: 655654 $>
Copyright 1996 Adam Twiss, Zeus Technology Ltd, http://www.zeustech.net/
Licensed to The Apache Software Foundation, http://www.apache.org/

Benchmarking www.03323fdf.com (be patient)
Finished 368 requests


Server Software:        Apache
Server Hostname:        www.03323fdf.com
Server Port:            80

Document Path:          /
Document Length:        31366 bytes

Concurrency Level:      10
Time taken for tests:   30.071 seconds
Complete requests:      368
Failed requests:        0
Write errors:           0
Keep-Alive requests:    0
Total transferred:      11651553 bytes
HTML transferred:       11562013 bytes
Requests per second:    12.24 [#/sec] (mean)
Time per request:       817.139 [ms] (mean)
Time per request:       81.714 [ms] (mean, across all concurrent requests)
Transfer rate:          378.39 [Kbytes/sec] received

Connection Times (ms)
              min  mean[+/-sd] median   max
Connect:       23   36  26.7     31     230
Processing:   360  768 192.8    750    2227
Waiting:      240  567 174.7    542    2035
Total:        385  803 193.2    785    2263

Percentage of the requests served within a certain time (ms)
  50%    785
  66%    833
  75%    874
  80%    898
  90%    977
  95%   1052
  98%   1259
  99%   1723
 100%   2263 (longest request)

I think the results speak for themselves...

My Bookshelf

Reading Now

Other Stuff