Site load benchmark testing with apache ab

There are many services for testing and benchmarking site load average in the web but many of them is require a payments. Fortunately in Mac OS and Linux we have Apache service utility named Apache Benchmark thats can do test with one line command input.

For example I test random site with ab using one IP address via WIFI -> 4G network with concurrency 200 and 1000 requests per time:

ab -c 200 -n 1000

The output:

CyberXs-MBP:~ cyberx$ ab -c 200 -n 1000
This is ApacheBench, Version 2.3 
Copyright 1996 Adam Twiss, Zeus Technology Ltd,
Licensed to The Apache Software Foundation,

Benchmarking (be patient)
Completed 100 requests
Completed 200 requests
Completed 300 requests
Completed 400 requests
Completed 500 requests
Completed 600 requests
Completed 700 requests
Completed 800 requests
Completed 900 requests
Completed 1000 requests
Finished 1000 requests

Server Software:        openresty
Server Hostname:
Server Port:            80

Document Path:          /revolver_cms_v.1.0.9/
Document Length:        16984 bytes

Concurrency Level:      200
Time taken for tests:   16.783 seconds
Complete requests:      1000
Failed requests:        894
   (Connect: 0, Receive: 0, Length: 894, Exceptions: 0)
Non-2xx responses:      894
Total transferred:      10029004 bytes
HTML transferred:       9855404 bytes
Requests per second:    59.58 [#/sec] (mean)
Time per request:       3356.659 [ms] (mean)
Time per request:       16.783 [ms] (mean, across all concurrent requests)
Transfer rate:          583.55 [Kbytes/sec] received

Connection Times (ms)
              min  mean[+/-sd] median   max
Connect:       69  437 287.1    431    1247
Processing:   113 1663 2268.0    729    9685
Waiting:       96 1565 2237.5    686    9598
Total:        195 2100 2286.3   1167   10625

Percentage of the requests served within a certain time (ms)
  50%   1167
  66%   1519
  75%   1660
  80%   1926
  90%   7105
  95%   8116
  98%   8728
  99%   8965
 100%  10625 (longest request)

One small problem with it is a server side blocking requests from one IP when limit are achieved to prevent flood. It is not replaces cloud testing because many servers can generate more IP addresses and can do real overloading picture but Apache Benchmark fast and simple.

Apache Benchmark overload statistics
Apache Benchmark overload statistics

With 106 successful request of 1000 defined over ~3s for one of 200 threads we can look at overload graph placed in server side statistics. So, RevolveR CMS was eat only 2 of 10 available by hosting plan points.


You can write here as guest with moderation. Please confirm your person if you have an account or register.

Add a review as guest
Lets draw: