1 h2load - HTTP/2 benchmarking tool - HOW-TO
2 ==========================================
4 h2load is benchmarking tool for HTTP/2. If built with
5 spdylay (http://tatsuhiro-t.github.io/spdylay/) library, it also
6 supports SPDY protocol. It supports SSL/TLS and clear text for both
12 In order to set benchmark settings, specify following 3 options.
15 The number of total requests. Default: 1
18 The number of concurrent clients. Default: 1
21 The max concurrent streams to issue per client.
22 If ``auto`` is given, the number of given URIs is used.
25 Here is a command-line to perform benchmark to URI \https://localhost
26 using total 100000 requests, 100 concurrent clients and 10 max
29 $ h2load -n100000 -c100 -m10 https://localhost
31 The benchmarking result looks like this::
33 finished in 0 sec, 385 millisec and 851 microsec, 2591 req/s, 1689 kbytes/s
34 requests: 1000 total, 1000 started, 1000 done, 1000 succeeded, 0 failed, 0 errored
35 status codes: 1000 2xx, 0 3xx, 0 4xx, 0 5xx
36 traffic: 667500 bytes total, 28700 bytes headers, 612000 bytes data
38 The number of ``failed`` is the number of requests returned with non
39 2xx status. The number of ``error`` is the number of ``failed`` plus
40 the number of requests which failed with connection error.
42 The number of ``total`` in ``traffic`` is the received application
43 data. If SSL/TLS is used, this number is calculated after decryption.
44 The number of ``headers`` is the sum of payload size of response
45 HEADERS (or SYN_REPLY for SPDY). This number comes before
46 decompressing header block. The number of ``data`` is the sum of
52 HTTP/2 and SPDY/3 or later employ flow control and it may affect
53 benchmarking results. To adjust receiver flow control window size,
54 there is following options:
57 Sets the stream level initial window size to
58 (2**<N>)-1. For SPDY, 2**<N> is used instead.
61 Sets the connection level initial window size to
62 (2**<N>)-1. For SPDY, if <N> is strictly less
63 than 16, this option is ignored. Otherwise
64 2**<N> is used for SPDY.
69 Sometimes benchmarking client itself becomes a bottleneck. To remedy
70 this situation, use ``-t`` option to specify the number of native
74 The number of native threads. Default: 1
76 Selecting protocol for clear text
77 ---------------------------------
79 By default, if \http:// URI is given, HTTP/2 protocol is used. To
80 change the protocol to use for clear text, use ``-p`` option.
85 If multiple URIs are specified, they are used in round robin manner.
89 Please note that h2load uses sheme, host and port in the first URI
90 and ignores those parts in the rest of the URIs.