Table of Contents


Hayek's Linux Manual

ab is an Apache benchmark tool


This tool is designed to give you an idea of how your Apache server will perform. For example, it will show you how many requests per second Apache can serve.

Useful Flags

 -A username:password
 passes BASIC credentials to the server. Information is sent in base64 encoding, the data will be sent regardless of the reply from the server (i.e. 401 error).
 -b windowsize
       TCP buffer size in bytes
 -c concurrency
       number of multiple requests to try at a time. Default is one.
 -e file.csv
       output results to a csv file
 -f protocol
       Give SSL2, SSL3, TLS1, or ALL
 -h help
       Enable keepalive (multiple requests in one session)
       quiet mode
       Don't exist on socket errors
 -s timeout
       Maximum wait time before timeout. Default 30s
 -t timelimit
       Test time in seconds
 -v level
       verbosity level


 [hayek@localhost ~]$ ab -t 30 -e test.csv localhost/home
 This is ApacheBench, Version 2.3 <$Revision: 1430300 $>
 Copyright 1996 Adam Twiss, Zeus Technology Ltd,
 Licensed to The Apache Software Foundation,
 Benchmarking localhost (be patient)
 Completed 5000 requests
 Completed 10000 requests
 Completed 15000 requests
 Completed 20000 requests
 Completed 25000 requests
 Completed 30000 requests
 Completed 35000 requests
 Completed 40000 requests
 Completed 45000 requests
 Completed 50000 requests
 Finished 50000 requests
 Server Software:        Apache/2.4.6
 Server Hostname:        localhost
 Server Port:            80
 Document Path:          /home
 Document Length:        230 bytes
 Concurrency Level:      1
 Time taken for tests:   4.937 seconds
 Complete requests:      50000
 Failed requests:        0
 Write errors:           0
 Non-2xx responses:      50000
 Total transferred:      23050000 bytes
 HTML transferred:       11500000 bytes
 Requests per second:    10128.24 [#/sec] (mean)
 Time per request:       0.099 [ms] (mean)
 Time per request:       0.099 [ms] (mean, across all concurrent requests)
 Transfer rate:          4559.68 [Kbytes/sec] received
 Connection Times (ms)
             min  mean[+/-sd] median   max
 Connect:        0    0   0.0      0       0
 Processing:     0    0   0.0      0       2
 Waiting:        0    0   0.0      0       2
 Total:          0    0   0.0      0       2
 Percentage of the requests served within a certain time (ms)
 50%      0
 66%      0
 75%      0
 80%      0
 90%      0
 95%      0
 98%      0
 99%      0
100%      2 (longest request)

QR Code
QR Code ab_hayek.0 (generated for current page)