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       --log-file=<PATH>
189              Write  per-request  information  to a file as tab-separated col‐
190              umns: start  time as  microseconds  since   epoch;  HTTP  status
191              code;  microseconds until end of  response.  More columns may be
192              added later.  Rows are ordered by end-of-  response   time  when
193              using   one  worker   thread,  but   may appear slightly  out of
194              order with  multiple threads due to buffering.  Status  code  is
195              -1 for failed streams.
196
197       -v, --verbose
198              Output debug information.
199
200       --version
201              Display version information and exit.
202
203       -h, --help
204              Display this help and exit.
205
206       The <SIZE> argument is an integer and an optional unit (e.g., 10K is 10
207       * 1024).  Units are K, M and G (powers of 1024).
208
209       The <DURATION> argument is an integer and an optional unit (e.g., 1s is
210       1  second  and  500ms  is  500  milliseconds).  Units are h, m, s or ms
211       (hours, minutes, seconds and milliseconds, respectively).  If a unit is
212       omitted, a second is used as unit.
213

OUTPUT

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

FLOW CONTROL

329       h2load sets large flow control window by default, and effectively  dis‐
330       ables  flow  control  to avoid under utilization of server performance.
331       To set smaller flow control window, use -w and -W options.   For  exam‐
332       ple,  use -w16 -W16 to set default window size described in HTTP/2 pro‐
333       tocol specification.
334

SEE ALSO

336       nghttp(1), nghttpd(1), nghttpx(1)
337

AUTHOR

339       Tatsuhiro Tsujikawa
340
342       2012, 2015, 2016, Tatsuhiro Tsujikawa
343
344
345
346
3471.40.0                           Nov 15, 2019                        H2LOAD(1)
Impressum