1H2LOAD(1)                           nghttp2                          H2LOAD(1)
2
3
4

NAME

6       h2load - HTTP/2 benchmarking tool
7

SYNOPSIS

9       h2load [OPTIONS]... [URI]...
10

DESCRIPTION

12       benchmarking tool for HTTP/2 server
13
14       <URI>  Specify  URI  to access.   Multiple URIs can be specified.  URIs
15              are used  in this order for each  client.  All  URIs  are  used,
16              then   first  URI  is  used  and then  2nd URI, and so  on.  The
17              scheme, host  and port  in the   subsequent  URIs,  if  present,
18              are  ignored.  Those in  the first URI are used solely.  Defini‐
19              tion of a base URI overrides all scheme, host or port values.
20

OPTIONS

22       -n, --requests=<N>
23              Number of  requests across all  clients.  If it   is  used  with
24              --timing-script-file  option,   this option specifies the number
25              of requests  each client performs  rather  than  the  number  of
26              requests   across  all  clients.  This option is ignored if tim‐
27              ing-based  benchmarking is enabled (see --duration option).
28
29              Default: 1
30
31       -c, --clients=<N>
32              Number  of concurrent  clients.   With  -r option,  this  speci‐
33              fies the maximum number of connections to be made.
34
35              Default: 1
36
37       -t, --threads=<N>
38              Number of native threads.
39
40              Default: 1
41
42       -i, --input-file=<PATH>
43              Path  of  a file with multiple URIs are separated by EOLs.  This
44              option will disable URIs getting from command-line.  If  '-'  is
45              given  as  <PATH>,  URIs will be read from stdin.  URIs are used
46              in this order for each  client.  All URIs are used, then   first
47              URI  is  used  and then  2nd URI, and so  on.  The  scheme, host
48              and port  in the  subsequent URIs,  if  present,   are  ignored.
49              Those  in   the first URI are used solely.  Definition of a base
50              URI overrides all scheme, host or port values.
51
52       -m, --max-concurrent-streams=<N>
53              Max   concurrent   streams   to  issue   per   session.     When
54              http/1.1   is  used,  this  specifies the  number of  HTTP pipe‐
55              lining requests in-flight.
56
57              Default: 1
58
59       -w, --window-bits=<N>
60              Sets the stream level initial window size to (2**<N>)-1.
61
62              Default: 30
63
64       -W, --connection-window-bits=<N>
65              Sets   the   connection   level    initial   window   size    to
66              (2**<N>)-1.
67
68              Default: 30
69
70       -H, --header=<HEADER>
71              Add/Override a header to the requests.
72
73       --ciphers=<SUITE>
74              Set  allowed   cipher  list.   The   format  of  the   string is
75              described in OpenSSL ciphers(1).
76
77              Default:
78              ECDHE-ECDSA-AES256-GCM-SHA384:ECDHE-RSA-AES256-GCM-SHA384:ECDHE-ECDSA-CHACHA20-POLY1305:ECDHE-RSA-CHACHA20-POLY1305:ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES128-GCM-SHA256:ECDHE-ECDSA-AES256-SHA384:ECDHE-RSA-AES256-SHA384:ECDHE-ECDSA-AES128-SHA256:ECDHE-RSA-AES128-SHA256
79
80       -p, --no-tls-proto=<PROTOID>
81              Specify ALPN identifier of the  protocol to be used when access‐
82              ing  http  URI  without  SSL/TLS.   Available protocols: h2c and
83              http/1.1
84
85              Default: h2c
86
87       -d, --data=<PATH>
88              Post FILE to  server.  The request method  is changed  to  POST.
89              For   http/1.1 connection,  if  -d  is used,  the maximum number
90              of in-flight pipelined requests is set to 1.
91
92       -r, --rate=<N>
93              Specifies  the  fixed  rate  at  which   connections   are  cre‐
94              ated.   The   rate  must   be  a   positive  integer, represent‐
95              ing the  number of  connections to be   made  per  rate  period.
96              The  maximum   number  of connections  to be made  is  given  in
97              -c   option.   This  rate  will  be distributed  among   threads
98              as   evenly  as  possible.  For example,  with   -t2  and   -r4,
99              each  thread   gets  2 connections per period.  When the rate is
100              0, the program will run  as it  normally does, creating  connec‐
101              tions at whatever variable rate it  wants.   The  default  value
102              for this option is 0.  -r and -D are mutually exclusive.
103
104       --rate-period=<DURATION>
105              Specifies  the  time   period between creating connections.  The
106              period  must be a positive  number, representing the  length  of
107              the  period  in time.  This option is ignored if the rate option
108              is not used.  The default value for this option is 1s.
109
110       -D, --duration=<N>
111              Specifies the main duration for the measurements in case of tim‐
112              ing-based  benchmarking.  -D  and -r  are mutually exclusive.
113
114       --warm-up-time=<DURATION>
115              Specifies  the   time   period  before  starting the actual mea‐
116              surements, in  case  of  timing-based  benchmarking.   Needs  to
117              provided along with -D option.
118
119       -T, --connection-active-timeout=<DURATION>
120              Specifies   the maximum  time that  h2load is  willing to keep a
121              connection open,  regardless of the  activity  on  said  connec‐
122              tion.   <DURATION>  must  be  a positive integer, specifying the
123              amount of time  to wait.  When no timeout value is  set  (either
124              active  or  inactive),   h2load  will  keep  a  connection  open
125              indefinitely,  waiting  for  a response.
126
127       -N, --connection-inactivity-timeout=<DURATION>
128              Specifies the amount  of time that h2load  is willing to wait to
129              see  activity   on  a  given  connection.  <DURATION> must  be a
130              positive integer,  specifying the   amount  of  time   to  wait.
131              When  no   timeout  value   is set  (either active or inactive),
132              h2load  will keep a connection open indefinitely, waiting for  a
133              response.
134
135       --timing-script-file=<PATH>
136              Path  of  a file containing one or more lines separated by EOLs.
137              Each script line is composed of two tab-separated  fields.   The
138              first  field represents the time offset from the start of execu‐
139              tion, expressed  as  a  positive  value  of  milliseconds   with
140              microsecond   resolution.  The  second field represents the URI.
141              This option will disable URIs getting  from   command-line.   If
142              '-'  is  given as <PATH>, script lines will be read  from stdin.
143              Script lines are used in order  for  each  client.    If  -n  is
144              given, it must be less  than or  equal to the  number of  script
145              lines, larger values are clamped to the number of script  lines.
146              If  -n is not given,  the number of requests will default to the
147              number of  script lines.   The scheme,  host and port defined in
148              the  first  URI  are   used solely.  Values contained  in  other
149              URIs,  if  present,  are  ignored.  Definition of  a   base  URI
150              overrides all  scheme, host or port values.
151
152       -B, --base-uri=(<URI>|unix:<PATH>)
153              Specify  URI  from  which the scheme, host and port will be used
154              for  all  requests.    The   base   URI  overrides   all  values
155              defined  either   at   the command  line or  inside input files.
156              If argument  starts with "unix:", then the rest  of  the   argu‐
157              ment  will   be treated  as UNIX  domain socket path.   The con‐
158              nection is made  through that path instead  of  TCP.    In  this
159              case,  scheme   is inferred from the first  URI appeared  in the
160              command line  or inside input files as usual.
161
162       --npn-list=<LIST>
163              Comma delimited list of  ALPN protocol identifier sorted in  the
164              order  of preference.  That  means most desirable protocol comes
165              first.  This  is used  in both  ALPN  and  NPN.   The  parameter
166              must be  delimited by a single comma only  and any  white spaces
167              are  treated as  a part  of protocol string.
168
169              Default: h2,h2-16,h2-14,http/1.1
170
171       --h1   Short          hand            for           --npn-list=http/1.1
172              --no-tls-proto=http/1.1,       which      effectively      force
173              http/1.1 for both http and https URI.
174
175       --header-table-size=<SIZE>
176              Specify decoder header table size.
177
178              Default: 4K
179
180       --encoder-header-table-size=<SIZE>
181              Specify encoder header table size.  The decoder (server)  speci‐
182              fies   the  maximum   dynamic table  size it  accepts.  Then the
183              negotiated dynamic table size is  the  minimum  of  this  option
184              value and the value which server specified.
185
186              Default: 4K
187
188       -v, --verbose
189              Output debug information.
190
191       --version
192              Display version information and exit.
193
194       -h, --help
195              Display this help and exit.
196
197       The <SIZE> argument is an integer and an optional unit (e.g., 10K is 10
198       * 1024).  Units are K, M and G (powers of 1024).
199
200       The <DURATION> argument is an integer and an optional unit (e.g., 1s is
201       1  second  and  500ms  is  500  milliseconds).  Units are h, m, s or ms
202       (hours, minutes, seconds and milliseconds, respectively).  If a unit is
203       omitted, a second is used as unit.
204

OUTPUT

206       requests
207
208              total  The number of requests h2load was instructed to make.
209
210              started
211                     The number of requests h2load has started.
212
213              done   The number of requests completed.
214
215              succeeded
216                     The number of requests completed successfully.  Only HTTP
217                     status code 2xx or3xx are considered as success.
218
219              failed The number of requests failed, including HTTP level fail‐
220                     ures (non-successful HTTP status code).
221
222              errored
223                     The  number  of  requests  failed,  except for HTTP level
224                     failures.  This is the subset of the number  reported  in
225                     failed  and  most  likely  the  network level failures or
226                     stream was reset by RST_STREAM.
227
228              timeout
229                     The number of requests whose connection timed out  before
230                     they  were  completed.    This  is  the  subset   of  the
231                     number  reported  in errored.
232
233       status codes
234              The number of status code h2load received.
235
236       traffic
237
238              total  The number of bytes received  from  the  server  "on  the
239                     wire".   If requests were made via TLS, this value is the
240                     number of decrypted bytes.
241
242              headers
243                     The  number  of response  header  bytes  from the  server
244                     without  decompression.   The   space savings shows effi‐
245                     ciency  of header compression.  Let decompressed(headers)
246                     to  the  number  of  bytes  used  for header fields after
247                     decompression.  The space savings is calculated  by (1  -
248                     headers   /  decompressed(headers)) * 100.  For HTTP/1.1,
249                     this is usually  0.00%, since it  does  not  have  header
250                     compression.   For  HTTP/2, it shows some insightful num‐
251                     bers.
252
253              data   The number of  response  body  bytes  received  from  the
254                     server.
255
256       time for request
257
258              min    The minimum time taken for request and response.
259
260              max    The maximum time taken for request and response.
261
262              mean   The mean time taken for request and response.
263
264              sd     The  standard deviation of the time taken for request and
265                     response.
266
267              +/- sd The fraction of the number of  requests  within  standard
268                     deviation  range  (mean  +/-  sd) against total number of
269                     successful requests.
270
271       time for connect
272
273              min    The minimum time taken to connect to a server.
274
275              max    The maximum time taken to connect to a server.
276
277              mean   The mean time taken to connect to a server.
278
279              sd     The standard deviation of the time taken to connect to  a
280                     server.
281
282              +/- sd The   fraction  of  the   number  of  connections  within
283                     standard deviation range (mean   +/-  sd)  against  total
284                     number of successful connections.
285
286       time for 1st byte (of (decrypted in case of TLS) application data)
287
288              min    The minimum time taken to get 1st byte from a server.
289
290              max    The maximum time taken to get 1st byte from a server.
291
292              mean   The mean time taken to get 1st byte from a server.
293
294              sd     The  standard deviation of the time taken to get 1st byte
295                     from a server.
296
297              +/- sd The fraction of the number of connections within standard
298                     deviation  range  (mean  +/-  sd) against total number of
299                     successful connections.
300
301       req/s
302
303              min    The minimum request per second among all clients.
304
305              max    The maximum request per second among all clients.
306
307              mean   The mean request per second among all clients.
308
309              sd     The standard deviation of request per  second  among  all
310                     clients.  server.
311
312              +/- sd The fraction of the number of connections within standard
313                     deviation range (mean +/- sd)  against  total  number  of
314                     successful connections.
315

FLOW CONTROL

317       h2load  sets large flow control window by default, and effectively dis‐
318       ables flow control to avoid under utilization  of  server  performance.
319       To  set  smaller flow control window, use -w and -W options.  For exam‐
320       ple, use -w16 -W16 to set default window size described in HTTP/2  pro‐
321       tocol specification.
322

SEE ALSO

324       nghttp(1), nghttpd(1), nghttpx(1)
325

AUTHOR

327       Tatsuhiro Tsujikawa
328
330       2012, 2015, 2016, Tatsuhiro Tsujikawa
331
332
333
334
3351.34.0                           Oct 04, 2018                        H2LOAD(1)
Impressum