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  ]  [  -c  concurrency ] [ -C cookie-
11       name=value ] [ -d ] [ -e csv-file ] [ -g gnuplot-file ] [  -h  ]  [  -H
12       custom-header  ]  [  -i  ] [ -k ] [ -n requests ] [ -p POST-file ] [ -P
13       proxy-auth-username:password ] [ -q ] [ -s ] [ -S ] [ -t timelimit ]  [
14       -T content-type ] [ -v verbosity] [ -V ] [ -w ] [ -x <table>-attributes
15       ] [ -X proxy[:port] ] [ -y <tr>-attributes ]  [  -z  <td>-attributes  ]
16       [http://]hostname[:port]/path
17
18
19

SUMMARY

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

OPTIONS

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

BUGS

135       There are various statically declared buffers of fixed length. Combined
136       with the lazy parsing of the command line arguments, the response head‐
137       ers from the server and other external inputs, this might bite you.
138
139
140       It does not implement HTTP/1.x  fully;  only  accepts  some  'expected'
141       forms  of  responses. The rather heavy use of strstr(3) shows up top in
142       profile, which might indicate a performance problem;  i.e.,  you  would
143       measure the ab performance rather than the server's.
144
145
146
147
148Apache HTTP Server                2004-11-14                             AB(8)
Impressum