Example of Apache Performance Benchmark / ApacheBench (ab)

Home » Apache » Example of Apache Performance Benchmark / ApacheBench (ab)
Date: 2007-08-26
Link: http://apache.devquickref.com/apache-example-performance-benchmark-apachebench-ab.html

This example shows how to use Apache Performance Benchmark or ApacheBench (ab)

 
ab -k -n 10 -c 100 http://domain.com
-n=10  - send max 10 requests
-c=100 - concurrent requests
-k Keep alive (reuse TCP connection)
the result may look like this:
This is ApacheBench, Version 2.0.41-dev <$Revision: 1.121.2.12 $> apache-2.0
Copyright (c) 1996 Adam Twiss, Zeus Technology Ltd, http://www.zeustech.net/
Copyright (c) 2006 The Apache Software Foundation, http://www.apache.org/
Benchmarking lordspace (be patient).....done
Server Software:        Apache/2.0.59
Server Hostname:        lordspace
Server Port:            80
Document Path:          /dev/
Document Length:        0 bytes
Concurrency Level:      50
Time taken for tests:   5.531250 seconds
Complete requests:      100
Failed requests:        0
Write errors:           0
Non-2xx responses:      100
Keep-Alive requests:    100
Total transferred:      30750 bytes
HTML transferred:       0 bytes
Requests per second:    18.08 [#/sec] (mean)
Time per request:       2765.625 [ms] (mean)
Time per request:       55.313 [ms] (mean, across all concurrent requests)
Transfer rate:          5.42 [Kbytes/sec] received
Connection Times (ms)
              min  mean[+/-sd] median   max
Connect:        0    0   0.0      0       0
Processing:   937 2210 744.4   2156    3203
Waiting:      937 2210 744.2   2156    3203
Total:        937 2210 744.4   2156    3203
Percentage of the requests served within a certain time (ms)
  50%   2156
  66%   2562
  75%   3171
  80%   3187
  90%   3187
  95%   3203
  98%   3203
  99%   3203
 100%   3203 (longest request)
 
 
Comments
author: Anonymous date: 2009-09-16 13:10:00
title: Re: Example of Apache Performance Benchmark / ApacheBench (ab)
-c must be higher than -n