h2load.1.rst 9.81 KB
Newer Older
1

Tatsuhiro Tsujikawa's avatar
Tatsuhiro Tsujikawa committed
2 3
.. GENERATED by help2rst.py.  DO NOT EDIT DIRECTLY.

Tatsuhiro Tsujikawa's avatar
Tatsuhiro Tsujikawa committed
4 5
.. program:: h2load

6 7 8 9 10
h2load(1)
=========

SYNOPSIS
--------
11

Tatsuhiro Tsujikawa's avatar
Tatsuhiro Tsujikawa committed
12
**h2load** [OPTIONS]... [URI]...
13 14 15

DESCRIPTION
-----------
16

17 18
benchmarking tool for HTTP/2 and SPDY server

19
.. describe:: <URI>
20

Tatsuhiro Tsujikawa's avatar
Tatsuhiro Tsujikawa committed
21 22 23 24 25
    Specify URI to access.   Multiple URIs can be specified.
    URIs are used  in this order for each  client.  All URIs
    are used, then  first URI is used and then  2nd URI, and
    so  on.  The  scheme, host  and port  in the  subsequent
    URIs, if present,  are ignored.  Those in  the first URI
Tatsuhiro Tsujikawa's avatar
Tatsuhiro Tsujikawa committed
26 27
    are used solely.  Definition of a base URI overrides all
    scheme, host or port values.
28

Tatsuhiro Tsujikawa's avatar
Tatsuhiro Tsujikawa committed
29 30
OPTIONS
-------
31 32 33

.. option:: -n, --requests=<N>

Tatsuhiro Tsujikawa's avatar
Tatsuhiro Tsujikawa committed
34 35 36 37
    Number of  requests across all  clients.  If it  is used
    with :option:`--timing-script-file` option,  this option specifies
    the number of requests  each client performs rather than
    the number of requests across all clients.
38 39

    Default: ``1``
40 41 42

.. option:: -c, --clients=<N>

Tatsuhiro Tsujikawa's avatar
Tatsuhiro Tsujikawa committed
43 44
    Number  of concurrent  clients.   With  :option:`-r` option,  this
    specifies the maximum number of connections to be made.
45 46

    Default: ``1``
47 48 49

.. option:: -t, --threads=<N>

50 51 52
    Number of native threads.

    Default: ``1``
53

Tatsuhiro Tsujikawa's avatar
Tatsuhiro Tsujikawa committed
54
.. option:: -i, --input-file=<PATH>
Tatsuhiro Tsujikawa's avatar
Tatsuhiro Tsujikawa committed
55

56
    Path of a file with multiple URIs are separated by EOLs.
Tatsuhiro Tsujikawa's avatar
Tatsuhiro Tsujikawa committed
57
    This option will disable URIs getting from command-line.
Tatsuhiro Tsujikawa's avatar
Tatsuhiro Tsujikawa committed
58
    If '-' is given as <PATH>, URIs will be read from stdin.
Tatsuhiro Tsujikawa's avatar
Tatsuhiro Tsujikawa committed
59 60 61 62
    URIs are used  in this order for each  client.  All URIs
    are used, then  first URI is used and then  2nd URI, and
    so  on.  The  scheme, host  and port  in the  subsequent
    URIs, if present,  are ignored.  Those in  the first URI
Tatsuhiro Tsujikawa's avatar
Tatsuhiro Tsujikawa committed
63 64
    are used solely.  Definition of a base URI overrides all
    scheme, host or port values.
Tatsuhiro Tsujikawa's avatar
Tatsuhiro Tsujikawa committed
65

66 67
.. option:: -m, --max-concurrent-streams=(auto|<N>)

Tatsuhiro Tsujikawa's avatar
Tatsuhiro Tsujikawa committed
68 69
    Max concurrent streams to  issue per session.  If "auto"
    is given, the number of given URIs is used.
70 71

    Default: ``auto``
72 73 74

.. option:: -w, --window-bits=<N>

Tatsuhiro Tsujikawa's avatar
Tatsuhiro Tsujikawa committed
75 76
    Sets the stream level initial window size to (2\*\*<N>)-1.
    For SPDY, 2**<N> is used instead.
77

Tatsuhiro Tsujikawa's avatar
Tatsuhiro Tsujikawa committed
78 79
    Default: ``30``

80 81
.. option:: -W, --connection-window-bits=<N>

Tatsuhiro Tsujikawa's avatar
Tatsuhiro Tsujikawa committed
82 83 84 85
    Sets  the  connection  level   initial  window  size  to
    (2**<N>)-1.  For SPDY, if <N>  is strictly less than 16,
    this option  is ignored.   Otherwise 2\*\*<N> is  used for
    SPDY.
86

Tatsuhiro Tsujikawa's avatar
Tatsuhiro Tsujikawa committed
87 88
    Default: ``30``

Tatsuhiro Tsujikawa's avatar
Tatsuhiro Tsujikawa committed
89 90 91 92
.. option:: -H, --header=<HEADER>

    Add/Override a header to the requests.

Tatsuhiro Tsujikawa's avatar
Tatsuhiro Tsujikawa committed
93 94 95 96 97
.. option:: --ciphers=<SUITE>

    Set allowed  cipher list.  The  format of the  string is
    described in OpenSSL ciphers(1).

98 99
.. option:: -p, --no-tls-proto=<PROTOID>

Tatsuhiro Tsujikawa's avatar
Tatsuhiro Tsujikawa committed
100 101
    Specify ALPN identifier of the  protocol to be used when
    accessing http URI without SSL/TLS.
Tatsuhiro Tsujikawa's avatar
Tatsuhiro Tsujikawa committed
102 103
    Available protocols: spdy/2, spdy/3, spdy/3.1, h2c and
    http/1.1
104

Tatsuhiro Tsujikawa's avatar
Tatsuhiro Tsujikawa committed
105
    Default: ``h2c``
106

Tatsuhiro Tsujikawa's avatar
Tatsuhiro Tsujikawa committed
107
.. option:: -d, --data=<PATH>
Tatsuhiro Tsujikawa's avatar
Tatsuhiro Tsujikawa committed
108 109 110 111

    Post FILE to  server.  The request method  is changed to
    POST.

Tatsuhiro Tsujikawa's avatar
Tatsuhiro Tsujikawa committed
112 113
.. option:: -r, --rate=<N>

Tatsuhiro Tsujikawa's avatar
Tatsuhiro Tsujikawa committed
114
    Specifies  the  fixed  rate  at  which  connections  are
Tatsuhiro Tsujikawa's avatar
Tatsuhiro Tsujikawa committed
115 116
    created.   The   rate  must   be  a   positive  integer,
    representing the  number of  connections to be  made per
Tatsuhiro Tsujikawa's avatar
Tatsuhiro Tsujikawa committed
117 118 119 120 121 122 123 124
    rate period.   The maximum  number of connections  to be
    made  is  given  in  :option:`-c`   option.   This  rate  will  be
    distributed among  threads as  evenly as  possible.  For
    example,  with   :option:`-t2`  and   :option:`\-r4`,  each  thread   gets  2
    connections per period.  When the rate is 0, the program
    will run  as it  normally does, creating  connections at
    whatever variable rate it  wants.  The default value for
    this option is 0.
Tatsuhiro Tsujikawa's avatar
Tatsuhiro Tsujikawa committed
125

Tatsuhiro Tsujikawa's avatar
Tatsuhiro Tsujikawa committed
126
.. option:: --rate-period=<DURATION>
Tatsuhiro Tsujikawa's avatar
Tatsuhiro Tsujikawa committed
127

Tatsuhiro Tsujikawa's avatar
Tatsuhiro Tsujikawa committed
128 129 130 131 132
    Specifies the time  period between creating connections.
    The period  must be a positive  number, representing the
    length of the period in time.  This option is ignored if
    the rate option is not used.  The default value for this
    option is 1s.
Tatsuhiro Tsujikawa's avatar
Tatsuhiro Tsujikawa committed
133

Tatsuhiro Tsujikawa's avatar
Tatsuhiro Tsujikawa committed
134
.. option:: -T, --connection-active-timeout=<DURATION>
Tatsuhiro Tsujikawa's avatar
Tatsuhiro Tsujikawa committed
135 136 137

    Specifies  the maximum  time that  h2load is  willing to
    keep a  connection open,  regardless of the  activity on
Tatsuhiro Tsujikawa's avatar
Tatsuhiro Tsujikawa committed
138 139 140 141
    said connection.  <DURATION> must be a positive integer,
    specifying the amount of time  to wait.  When no timeout
    value is  set (either  active or inactive),  h2load will
    keep  a  connection  open indefinitely,  waiting  for  a
Tatsuhiro Tsujikawa's avatar
Tatsuhiro Tsujikawa committed
142 143
    response.

Tatsuhiro Tsujikawa's avatar
Tatsuhiro Tsujikawa committed
144
.. option:: -N, --connection-inactivity-timeout=<DURATION>
Tatsuhiro Tsujikawa's avatar
Tatsuhiro Tsujikawa committed
145 146

    Specifies the amount  of time that h2load  is willing to
Tatsuhiro Tsujikawa's avatar
Tatsuhiro Tsujikawa committed
147 148 149 150
    wait to see activity  on a given connection.  <DURATION>
    must  be a  positive integer,  specifying the  amount of
    time  to wait.   When no  timeout value  is set  (either
    active or inactive), h2load  will keep a connection open
Tatsuhiro Tsujikawa's avatar
Tatsuhiro Tsujikawa committed
151 152 153 154
    indefinitely, waiting for a response.

.. option:: --timing-script-file=<PATH>

Tatsuhiro Tsujikawa's avatar
Tatsuhiro Tsujikawa committed
155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171
    Path of a file containing one or more lines separated by
    EOLs.  Each script line is composed of two tab-separated
    fields.  The first field represents the time offset from
    the start of execution, expressed as a positive value of
    milliseconds  with microsecond  resolution.  The  second
    field represents the URI.  This option will disable URIs
    getting from  command-line.  If '-' is  given as <PATH>,
    script lines will be read  from stdin.  Script lines are
    used in order for each client.   If :option:`-n` is given, it must
    be less  than or  equal to the  number of  script lines,
    larger values are clamped to the number of script lines.
    If :option:`-n` is not given,  the number of requests will default
    to the  number of  script lines.   The scheme,  host and
    port defined in  the first URI are  used solely.  Values
    contained  in  other  URIs,  if  present,  are  ignored.
    Definition of a  base URI overrides all  scheme, host or
    port values.
Tatsuhiro Tsujikawa's avatar
Tatsuhiro Tsujikawa committed
172 173 174 175 176 177 178 179

.. option:: -B, --base-uri=<URI>

    Specify URI from which the scheme, host and port will be
    used  for  all requests.   The  base  URI overrides  all
    values  defined either  at  the command  line or  inside
    input files.

Tatsuhiro Tsujikawa's avatar
Tatsuhiro Tsujikawa committed
180 181 182 183 184 185 186 187 188 189 190
.. option:: --npn-list=<LIST>

    Comma delimited list of  ALPN protocol identifier sorted
    in the  order of preference.  That  means most desirable
    protocol comes  first.  This  is used  in both  ALPN and
    NPN.  The parameter must be  delimited by a single comma
    only  and any  white spaces  are  treated as  a part  of
    protocol string.

    Default: ``h2,h2-16,h2-14,spdy/3.1,spdy/3,spdy/2,http/1.1``

191 192 193 194 195 196 197 198 199 200 201 202
.. option:: -v, --verbose

    Output debug information.

.. option:: --version

    Display version information and exit.

.. option:: -h, --help

    Display this help and exit.

Tatsuhiro Tsujikawa's avatar
Tatsuhiro Tsujikawa committed
203 204 205 206 207 208 209


The <DURATION> argument is an integer and an optional unit (e.g., 1s
is 1 second and 500ms is 500 milliseconds).  Units are h, m, s or ms
(hours, minutes, seconds and milliseconds, respectively).  If a unit
is omitted, a second is used as unit.

Tatsuhiro Tsujikawa's avatar
Tatsuhiro Tsujikawa committed
210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227
OUTPUT
------

requests
  total
    The number of requests h2load was instructed to make.
  started
    The number of requests h2load has started.
  done
    The number of requests completed.
  succeeded
    The number of requests completed successfully.  Only HTTP status
    code 2xx or3xx are considered as success.
  failed
    The number of requests failed, including HTTP level failures
    (non-successful HTTP status code).
  errored
    The number of requests failed, except for HTTP level failures.
Tatsuhiro Tsujikawa's avatar
Tatsuhiro Tsujikawa committed
228 229 230
    This is the subset of the number reported in ``failed`` and most
    likely the network level failures or stream was reset by
    RST_STREAM.
Tatsuhiro Tsujikawa's avatar
Tatsuhiro Tsujikawa committed
231 232 233 234
  timeout
    The number of requests whose connection timed out before they were
    completed.   This  is  the  subset   of  the  number  reported  in
    ``errored``.
Tatsuhiro Tsujikawa's avatar
Tatsuhiro Tsujikawa committed
235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259

status codes
  The number of status code h2load received.

traffic
  total
    The number of bytes received from the server "on the wire".  If
    requests were made via TLS, this value is the number of decrpyted
    bytes.
  headers
    The number of response header bytes from the server without
    decompression.  For HTTP/2, this is the sum of the payload of
    HEADERS frame.  For SPDY, this is the sum of the payload of
    SYN_REPLY frame.
  data
    The number of response body bytes received from the server.

time for request
  min
    The minimum time taken for request and response.
  max
    The maximum time taken for request and response.
  mean
    The mean time taken for request and response.
  sd
Tatsuhiro Tsujikawa's avatar
Tatsuhiro Tsujikawa committed
260
    The standard deviation of the time taken for request and response.
Tatsuhiro Tsujikawa's avatar
Tatsuhiro Tsujikawa committed
261 262 263 264
  +/- sd
    The fraction of the number of requests within standard deviation
    range (mean +/- sd) against total number of successful requests.

Tatsuhiro Tsujikawa's avatar
Tatsuhiro Tsujikawa committed
265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293
time for connect
  min
    The minimum time taken to connect to a server.
  max
    The maximum time taken to connect to a server.
  mean
    The mean time taken to connect to a server.
  sd
    The standard deviation of the time taken to connect to a server.
  +/- sd
    The  fraction  of  the   number  of  connections  within  standard
    deviation range (mean  +/- sd) against total  number of successful
    connections.

time for 1st byte (of (decrypted in case of TLS) application data)
  min
    The minimum time taken to get 1st byte from a server.
  max
    The maximum time taken to get 1st byte from a server.
  mean
    The mean time taken to get 1st byte from a server.
  sd
    The standard deviation of the time taken to get 1st byte from a
    server.
  +/- sd
    The fraction of the number of connections within standard
    deviation range (mean +/- sd) against total number of successful
    connections.

Tatsuhiro Tsujikawa's avatar
Tatsuhiro Tsujikawa committed
294 295 296 297 298 299 300 301 302
FLOW CONTROL
------------

h2load sets large flow control window by default, and effectively
disables flow control to avoid under utilization of server
performance.  To set smaller flow control window, use :option:`-w` and
:option:`-W` options.  For example, use ``-w16 -W16`` to set default
window size described in HTTP/2 and SPDY protocol specification.

303 304 305
SEE ALSO
--------

306
:manpage:`nghttp(1)`, :manpage:`nghttpd(1)`, :manpage:`nghttpx(1)`