1AB(8)                                 ab                                 AB(8)
2
3
4

NAME

6       ab - Apache HTTP server benchmarking tool
7
8

SYNOPSIS

10       ab [ -A auth-username:password ] [ -b windowsize ] [ -c concurrency ] [
11       -C cookie-name=value ] [ -d ] [ -e csv-file ] [ -f protocol ] [ -g gnu‐
12       plot-file ] [ -h ] [ -H custom-header ] [ -i ] [ -k ] [ -n requests ] [
13       -p POST-file ] [ -P proxy-auth-username:password ] [ -q ] [ -r ] [ -s ]
14       [  -S  ] [ -t timelimit ] [ -T content-type ] [ -u PUT-file ] [ -v ver‐
15       bosity] [ -V ] [ -w ] [ -x <table>-attributes ] [ -X proxy[:port]  ]  [
16       -y  <tr>-attributes  ]  [  -z  <td>-attributes  ]  [  -Z  ciphersuite ]
17       [http[s]://]hostname[:port]/path
18
19
20

SUMMARY

22       ab is a tool for benchmarking your Apache Hypertext  Transfer  Protocol
23       (HTTP)  server.  It  is  designed to give you an impression of how your
24       current Apache installation performs. This  especially  shows  you  how
25       many  requests  per second your Apache installation is capable of serv‐
26       ing.
27
28
29

OPTIONS

31       -A auth-username:password
32              Supply BASIC Authentication credentials to the server. The user‐
33              name  and  password  are separated by a single : and sent on the
34              wire base64 encoded. The string is sent  regardless  of  whether
35              the  server  needs  it  (i.e.,  has  sent  an 401 authentication
36              needed).
37
38       -b windowsize
39              Size of TCP send/receive buffer, in bytes.
40
41       -c concurrency
42              Number of multiple requests to perform at a time. Default is one
43              request at a time.
44
45       -C cookie-name=value
46              Add  a Cookie: line to the request. The argument is typically in
47              the form of a name=value pair. This field is repeatable.
48
49       -d     Do not display the "percentage served  within  XX  [ms]  table".
50              (legacy support).
51
52       -e csv-file
53              Write a Comma separated value (CSV) file which contains for each
54              percentage (from 1% to 100%) the time (in milliseconds) it  took
55              to  serve  that percentage of the requests. This is usually more
56              useful than the 'gnuplot'  file;  as  the  results  are  already
57              'binned'.
58
59       -f protocol
60              Specify SSL/TLS protocol (SSL2, SSL3, TLS1, or ALL).
61
62       -g gnuplot-file
63              Write  all  measured values out as a 'gnuplot' or TSV (Tab sepa‐
64              rate values) file. This file can easily be imported  into  pack‐
65              ages  like  Gnuplot,  IDL,  Mathematica, Igor or even Excel. The
66              labels are on the first line of the file.
67
68       -h     Display usage information.
69
70       -H custom-header
71              Append extra headers to the request. The argument  is  typically
72              in the form of a valid header line, containing a colon-separated
73              field-value pair (i.e., "Accept-Encoding: zip/zop;8bit").
74
75       -i     Do HEAD requests instead of GET.
76
77       -k     Enable  the  HTTP  KeepAlive  feature,  i.e.,  perform  multiple
78              requests within one HTTP session. Default is no KeepAlive.
79
80       -n requests
81              Number  of requests to perform for the benchmarking session. The
82              default is to just perform a single request which usually  leads
83              to non-representative benchmarking results.
84
85       -p POST-file
86              File containing data to POST. Remember to also set -T.
87
88       -P proxy-auth-username:password
89              Supply BASIC Authentication credentials to a proxy en-route. The
90              username and password are separated by a single :  and  sent  on
91              the  wire  base64  encoded.  The  string  is  sent regardless of
92              whether the proxy needs it (i.e., has sent an 407 proxy  authen‐
93              tication needed).
94
95       -q     When  processing  more  than 150 requests, ab outputs a progress
96              count on stderr every 10% or 100 requests or  so.  The  -q  flag
97              will suppress these messages.
98
99       -r     Don't exit on socket receive errors.
100
101       -s     When  compiled  in  (ab  -h will show you) use the SSL protected
102              https rather than the http protocol. This feature is  experimen‐
103              tal and very rudimentary. You probably do not want to use it.
104
105       -S     Do  not  display  the  median and standard deviation values, nor
106              display the warning/error messages when the average  and  median
107              are more than one or two times the standard deviation apart. And
108              default to the min/avg/max values. (legacy support).
109
110       -t timelimit
111              Maximum number  of  seconds  to  spend  for  benchmarking.  This
112              implies  a -n 50000 internally. Use this to benchmark the server
113              within a fixed total amount of time. Per  default  there  is  no
114              timelimit.
115
116       -T content-type
117              Content-type header to use for POST/PUT data, eg. application/x-
118              www-form-urlencoded. Default: text/plain.
119
120       -u PUT-file
121              File containing data to PUT. Remember to also set -T.
122
123       -v verbosity
124              Set verbosity level - 4 and above prints information on headers,
125              3  and above prints response codes (404, 200, etc.), 2 and above
126              prints warnings and info.
127
128       -V     Display version number and exit.
129
130       -w     Print out results in HTML tables. Default table is  two  columns
131              wide, with a white background.
132
133       -x <table>-attributes
134              String to use as attributes for <table>. Attributes are inserted
135              <table here >.
136
137       -X proxy[:port]
138              Use a proxy server for the requests.
139
140       -y <tr>-attributes
141              String to use as attributes for <tr>.
142
143       -z <td>-attributes
144              String to use as attributes for <td>.
145
146       -Z ciphersuite
147              Specify SSL/TLS cipher suite (See openssl ciphers).
148
149

BUGS

151       There are various statically declared buffers of fixed length. Combined
152       with the lazy parsing of the command line arguments, the response head‐
153       ers from the server and other external inputs, this might bite you.
154
155
156       It does not implement HTTP/1.x  fully;  only  accepts  some  'expected'
157       forms  of  responses. The rather heavy use of strstr(3) shows up top in
158       profile, which might indicate a performance problem;  i.e.,  you  would
159       measure the ab performance rather than the server's.
160
161
162
163
164Apache HTTP Server                2009-09-14                             AB(8)
Impressum