Benchmarking: Apache Benchmark (ab)

From Define Wiki
Jump to navigation Jump to search

Install

apt-get install apache2 apache2-utils (ubuntu)

Run the benchmark

  • Make sure the apache webserver is running!
root@cal1:~/scratch$ ab -n 16000 -c 10 http://localhost/
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)
Completed 1600 requests
Completed 3200 requests
Completed 4800 requests
Completed 6400 requests
Completed 8000 requests
Completed 9600 requests
Completed 11200 requests
Completed 12800 requests
Completed 14400 requests
Completed 16000 requests
Finished 16000 requests


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

Document Path:          /
Document Length:        177 bytes

Concurrency Level:      10
Time taken for tests:   2.878 seconds
Complete requests:      16000
Failed requests:        0
Write errors:           0
Total transferred:      7264000 bytes
HTML transferred:       2832000 bytes
Requests per second:    5558.99 [#/sec] (mean)
Time per request:       1.799 [ms] (mean)
Time per request:       0.180 [ms] (mean, across all concurrent requests)
Transfer rate:          2464.63 [Kbytes/sec] received

Connection Times (ms)
              min  mean[+/-sd] median   max
Connect:        0    1   0.1      1       1
Processing:     0    1   0.1      1       4
Waiting:        0    1   0.1      1       3
Total:          1    2   0.1      2       4

Percentage of the requests served within a certain time (ms)
  50%      2
  66%      2
  75%      2
  80%      2
  90%      2
  95%      2
  98%      2
  99%      2
 100%      4 (longest request)