Benchmarking your app with “ab”

“ab” – benchmark utility is built into Apache. A popular alternative to “ab” which can also test lists of urls – meaning benchmark your whole app – is siege – http://www.joedog.org/siege-home/

Here is the report it gives for my localhost project api test.

$ ab -n 100 -c 10 http://localhost:8888/ITEHealthAdmin/web/app_dev.php/api/demonstrationentity1s/1.json
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 localhost (be patient).....done

Server Software:        Apache/2.2.25
Server Hostname:        localhost
Server Port:            8888

Document Path:          /ITEHealthAdmin/web/app_dev.php/api/demonstrationentity1s/1.json
Document Length:        88 bytes

Concurrency Level:      10
Time taken for tests:   15.564 seconds
Complete requests:      100
Failed requests:        0
Write errors:           0
Total transferred:      46100 bytes
HTML transferred:       8800 bytes
Requests per second:    6.43 [#/sec] (mean)
Time per request:       1556.410 [ms] (mean)
Time per request:       155.641 [ms] (mean, across all concurrent requests)
Transfer rate:          2.89 [Kbytes/sec] received

Connection Times (ms)
              min  mean[+/-sd] median   max
Connect:        0    0   0.4      0       2
Processing:  1146 1538  87.1   1541    1806
Waiting:     1104 1409  69.9   1408    1700
Total:       1146 1538  87.2   1541    1807

Percentage of the requests served within a certain time (ms)
  50%   1541
  66%   1564
  75%   1587
  80%   1592
  90%   1628
  95%   1659
  98%   1725
  99%   1807
 100%   1807 (longest request)

Andre Venter has written 120 articles

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>