mirror of
https://github.com/3proxy/3proxy.git
synced 2026-11-22 23:59:41 +08:00
Benchmarks: splice by direction, grace delay, tunnels, more proxies
bench.py: - 2000 clients posting 2 KB and getting 50 KB back, next to the GET one - haproxy with splice-response and splice-request, like -s1 and -s2 - CONNECT and SOCKSv5 scenarios: wrk and iperf3 run under proxychains-ng, so every connection asks the proxy for a tunnel; and the same loads through a TCP relay to a fixed destination - tinyproxy and squid (HTTP proxy, CONNECT), dante (SOCKS); each proxy takes part only in the scenarios it supports - 3proxy also gets its socks service and a tcppm to the web server report.py: one throughput table for several machines (--machine), each cell their medians and their average; bold for the best of a group, * for the best of the row; --split puts the splice proxies in a table of their own, --prefix picks scenarios. RESULTS.md: the comparison as one table for both machines, splice by direction (devel -s0/-s1/-s3 against haproxy's settings) and grace delay with splice, with their data. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
626aac16bc
commit
a146570533
8 files changed
+841
-116
No files matched your search
+80
-77
@@ -1,7 +1,8 @@
|
||||
# Benchmark results
|
||||
|
||||
3proxy 0.9.4, 1.0.1 and devel against nginx and haproxy, measured on two
|
||||
machines, 11 October 2026. How the benchmark works is in
|
||||
machines, 11 October 2026; then devel's splice() by direction and with grace
|
||||
delay. How the benchmark works is in
|
||||
[README.md](README.md); the measurements are in [data/](data/), and
|
||||
`bench/report.py` turns them into the tables below.
|
||||
|
||||
@@ -82,7 +83,7 @@ machines, 11 October 2026. How the benchmark works is in
|
||||
| nginx | `proxy_pass` to an upstream with `keepalive 1024`, `stream` for TCP, `reuseport` |
|
||||
| haproxy | `mode http` with `http-reuse always`, `mode tcp` for TCP |
|
||||
| 0.9.4 splice | 0.9.4, which splices by default, `-ocTCP_NODELAY -osTCP_NODELAY` |
|
||||
| devel splice | devel with `-s` |
|
||||
| devel splice | devel with `-s`, which in this build spliced both directions always (`-s3` since the automatic mode came) |
|
||||
| haproxy splice-auto | `option splice-auto`: splices a direction once reads fill the buffer three times in a row |
|
||||
| haproxy splice | `option splice-request` and `option splice-response`: splices always |
|
||||
|
||||
@@ -100,101 +101,103 @@ gcc 14 also needs `-fpermissive`). Logging is off everywhere.
|
||||
| http-ka-50k-2000 | 2000 kept-alive connections, 50 KB answers |
|
||||
| http-close-1k | 64 connections, a new one for every request |
|
||||
|
||||
## How to read the tables
|
||||
## How to read the table
|
||||
|
||||
* Each cell: the median on the M4 / on the Skylake host / their average. TCP
|
||||
streams and 1 MB HTTP answers in Gbit/s, the other HTTP scenarios in
|
||||
thousands of requests per second.
|
||||
* Columns: the client talking to the origin with no proxy (only the kernel
|
||||
forwarding, for reference), then the proxies copying through user space,
|
||||
then after the second ‖ the proxies using splice().
|
||||
* **Bold**: the best of its group in the row, and any other of the group whose
|
||||
three runs overlap the best one's - the measurement cannot tell them apart.
|
||||
* ‡: the client or the origin, not the proxy, set the pace in most runs, so the
|
||||
proxy can do at least that much. Single streams often end there with
|
||||
splice(): one iperf3 stream is one thread, and the proxy needs less of a CPU
|
||||
than it.
|
||||
* CPU is per gigabyte for the bulk scenarios and per request for the small
|
||||
ones.
|
||||
* **Bold**: the best average of its group (copying, splice) in the row, and
|
||||
any other of the group whose runs cannot be told apart from it: the range of
|
||||
its average (from the average of each machine's slowest run to that of the
|
||||
fastest) reaches the best one's.
|
||||
* \*: the best of the row, copying and splice together, by the same rule -
|
||||
whether copying or splice() wins the scenario.
|
||||
* A few results were limited by the client or the origin rather than by the
|
||||
proxy, which can then do more than shown: on the M4, devel splice with single
|
||||
and 16 streams (the receiving iperf3 thread at a full core), haproxy with 16
|
||||
streams, and several of the 1 MB HTTP runs. The per-run `bound` column in
|
||||
[data/](data/) has the detail; `bench/report.py` on one machine's files marks
|
||||
them.
|
||||
* CPU time per gigabyte or request is in the data, but adds little: every
|
||||
proxy ran at its CPU limit, so its CPU per unit of work is the inverse of its
|
||||
throughput. Peak memory is in the data as well, summed up above.
|
||||
* http-ka-50k-2000: every proxy but haproxy leaves some requests waiting longer
|
||||
than wrk's 2 second limit (counted as timeouts in the data, 140-540 a run);
|
||||
haproxy serves the 2000 connections more evenly, with none over 2 seconds but
|
||||
a median wait 2 to 3 times longer.
|
||||
|
||||
## M4 (Apple M4 Pro, virtual machine)
|
||||
## Throughput
|
||||
|
||||
#### Throughput, Gbit/s (thousands of requests per second for HTTP)
|
||||
|
||||
| scenario | no proxy | ‖ | 0.9.4 | 1.0.1 | devel | nginx | haproxy | ‖ | 0.9.4 splice | devel splice | haproxy splice-auto | haproxy splice |
|
||||
| scenario (M4 / Intel / average) | no proxy | ‖ | 0.9.4 | 1.0.1 | devel | nginx | haproxy | ‖ | 0.9.4 splice | devel splice | haproxy splice-auto | haproxy splice |
|
||||
|---|---:|:-:|---:|---:|---:|---:|---:|:-:|---:|---:|---:|---:|
|
||||
| stream1 | 62.0 | ‖ | 8.3 | **22.1** | **22.0** | 13.5 | 13.6 | ‖ | 25.1 | **45.7 ‡** | 29.5 | **44.7** |
|
||||
| stream16 | 141.2 | ‖ | 8.7 | **20.9** | **20.9** | 13.5 | 9.5 ‡ | ‖ | 24.5 | **37.8 ‡** | 15.9 ‡ | 22.1 ‡ |
|
||||
| stream1-down | 61.8 | ‖ | 8.8 | **22.4** | **22.1** | 13.6 | 13.6 | ‖ | **47.9 ‡** | **47.4 ‡** | 30.4 | **47.6 ‡** |
|
||||
| http-ka-1k | 1.24 (120.3k/s) | ‖ | 0.14 (14.1k/s) | 0.06 (6.0k/s) | 0.16 (15.8k/s) | 0.38 (37.0k/s) | **0.45 (44.3k/s)** | ‖ | 0.14 (13.4k/s) | 0.15 (14.9k/s) | **0.45 (44.1k/s)** | **0.45 (44.1k/s)** |
|
||||
| http-ka-1m | 71.55 (8.5k/s) | ‖ | 8.33 (1.0k/s) | 12.46 (1.5k/s) | **21.90 (2.6k/s) ‡** | 12.63 (1.5k/s) | 6.02 (0.7k/s) ‡ | ‖ | 32.99 (3.9k/s) ‡ | **35.30 (4.2k/s) ‡** | 5.91 (0.7k/s) ‡ | 28.00 (3.3k/s) ‡ |
|
||||
| http-ka-50k-2000 | 34.79 (84.5k/s) | ‖ | 3.12 (7.6k/s) | 3.69 (9.0k/s) | 4.27 (10.4k/s) | **4.55 (11.0k/s)** | 4.01 (9.6k/s) | ‖ | 3.73 (9.1k/s) | 4.07 (9.9k/s) | 4.00 (9.6k/s) | **4.92 (11.9k/s)** |
|
||||
| http-close-1k | 0.50 (48.7k/s) | ‖ | 0.05 (5.0k/s) | 0.05 (4.4k/s) | 0.05 (5.2k/s) | 0.14 (13.3k/s) | **0.17 (16.6k/s)** | ‖ | 0.05 (4.8k/s) | 0.05 (5.0k/s) | **0.17 (16.7k/s)** | **0.17 (16.8k/s)** |
|
||||
|
||||
#### Proxy CPU time per gigabyte or per request
|
||||
|
||||
| scenario | no proxy | ‖ | 0.9.4 | 1.0.1 | devel | nginx | haproxy | ‖ | 0.9.4 splice | devel splice | haproxy splice-auto | haproxy splice |
|
||||
|---|---:|:-:|---:|---:|---:|---:|---:|:-:|---:|---:|---:|---:|
|
||||
| stream1 | – | ‖ | 0.96 s/GB | **0.36 s/GB** | **0.36 s/GB** | 0.59 s/GB | 0.59 s/GB | ‖ | 0.32 s/GB | **0.17 s/GB** | 0.27 s/GB | **0.18 s/GB** |
|
||||
| stream16 | – | ‖ | 0.92 s/GB | **0.38 s/GB** | **0.38 s/GB** | 0.59 s/GB | 0.84 s/GB | ‖ | 0.33 s/GB | **0.21 s/GB** | 0.51 s/GB | 0.36 s/GB |
|
||||
| stream1-down | – | ‖ | 0.91 s/GB | **0.36 s/GB** | **0.36 s/GB** | 0.59 s/GB | 0.59 s/GB | ‖ | **0.17 s/GB** | **0.17 s/GB** | 0.26 s/GB | **0.17 s/GB** |
|
||||
| http-ka-1k | – | ‖ | 71 µs/req | 105 µs/req | 63 µs/req | 27 µs/req | **23 µs/req** | ‖ | 74 µs/req | 67 µs/req | **23 µs/req** | **23 µs/req** |
|
||||
| http-ka-1m | – | ‖ | 0.96 s/GB | 0.44 s/GB | **0.37 s/GB** | 0.64 s/GB | 1.34 s/GB | ‖ | 0.24 s/GB | **0.23 s/GB** | 1.37 s/GB | 0.29 s/GB |
|
||||
| http-ka-50k-2000 | – | ‖ | 2.67 s/GB | 2.27 s/GB | 1.95 s/GB | **1.79 s/GB** | 2.01 s/GB | ‖ | 2.23 s/GB | 2.04 s/GB | 2.02 s/GB | **1.65 s/GB** |
|
||||
| http-close-1k | – | ‖ | 201 µs/req | 227 µs/req | 194 µs/req | 75 µs/req | **60 µs/req** | ‖ | 208 µs/req | 200 µs/req | **60 µs/req** | **60 µs/req** |
|
||||
|
||||
#### Proxy peak memory, MB
|
||||
|
||||
| scenario | no proxy | ‖ | 0.9.4 | 1.0.1 | devel | nginx | haproxy | ‖ | 0.9.4 splice | devel splice | haproxy splice-auto | haproxy splice |
|
||||
|---|---:|:-:|---:|---:|---:|---:|---:|:-:|---:|---:|---:|---:|
|
||||
| stream1 | – | ‖ | **2** | 10 | 8 | 32 | 32 | ‖ | **5** | 11 | 44 | 45 |
|
||||
| stream16 | – | ‖ | **31** | 75 | 63 | 75 | 48 | ‖ | **61** | 85 | **60** | **56** |
|
||||
| stream1-down | – | ‖ | **2** | 6 | 10 | 34 | 31 | ‖ | **11** | 11 | 40 | 45 |
|
||||
| http-ka-1k | – | ‖ | **5** | 9 | 9 | 30 | 30 | ‖ | **5** | 9 | 36 | 36 |
|
||||
| http-ka-1m | – | ‖ | **11** | **10** | 16 | 45 | 39 | ‖ | **15** | **17** | 44 | 52 |
|
||||
| http-ka-50k-2000 | – | ‖ | 126 | 199 | 194 | **90** | 176 | ‖ | **97** | 187 | 182 | 136 |
|
||||
| http-close-1k | – | ‖ | **10** | 31 | 14 | 30 | 30 | ‖ | **10** | 12 | 36 | 36 |
|
||||
| stream1, Gbit/s | 62.0 / 44.4 / 53.2 | ‖ | 8.3 / 5.5 / 6.9 | 22.1 / 19.1 / 20.6 | **22.0 / 19.9 / 21.0** | 13.5 / 9.8 / 11.6 | 13.6 / 9.7 / 11.7 | ‖ | 25.1 / 29.2 / 27.1 | **45.7 / 31.4 / 38.6** * | 29.5 / 30.6 / 30.1 | **44.7 / 32.3 / 38.5** * |
|
||||
| stream16, Gbit/s | 141.2 / 150.5 / 145.9 | ‖ | 8.7 / 5.6 / 7.2 | **20.9 / 18.9 / 19.9** | **20.9 / 18.8 / 19.8** | 13.5 / 9.9 / 11.7 | 9.5 / 9.2 / 9.3 | ‖ | 24.5 / 28.3 / 26.4 | **37.8 / 31.2 / 34.5** * | 15.9 / 30.3 / 23.1 | 22.1 / 31.5 / 26.8 |
|
||||
| stream1-down, Gbit/s | 61.8 / 43.1 / 52.5 | ‖ | 8.8 / 5.6 / 7.2 | **22.4 / 18.8 / 20.6** | **22.1 / 19.4 / 20.8** | 13.6 / 9.7 / 11.7 | 13.6 / 9.3 / 11.5 | ‖ | **47.9 / 34.4 / 41.1** * | 47.4 / 32.0 / 39.7 | 30.4 / 31.0 / 30.7 | **47.6 / 33.7 / 40.6** * |
|
||||
| http-ka-1k, k req/s | 120.3 / 127.1 / 123.7 | ‖ | 14.1 / 19.2 / 16.7 | 6.0 / 6.1 / 6.1 | 15.8 / 18.1 / 17.0 | 37.0 / 36.5 / 36.8 | **44.3 / 37.3 / 40.8** * | ‖ | 13.4 / 14.6 / 14.0 | 14.9 / 13.8 / 14.4 | **44.1 / 37.2 / 40.7** * | **44.1 / 38.0 / 41.1** * |
|
||||
| http-ka-1m, Gbit/s | 71.6 / 67.5 / 69.5 | ‖ | 8.3 / 5.8 / 7.1 | 12.5 / 12.4 / 12.4 | **21.9 / 18.3 / 20.1** | 12.6 / 5.8 / 9.2 | 6.0 / 7.6 / 6.8 | ‖ | **33.0 / 26.6 / 29.8** * | **35.3 / 23.9 / 29.6** * | 5.9 / 24.2 / 15.1 | 28.0 / 26.7 / 27.4 |
|
||||
| http-ka-50k-2000, k req/s | 84.5 / 85.7 / 85.1 | ‖ | 7.6 / 7.0 / 7.3 | 9.0 / 10.3 / 9.6 | **10.4 / 10.5 / 10.5** * | 11.0 / 9.2 / 10.1 | 9.6 / 7.3 / 8.4 | ‖ | 9.1 / 9.4 / 9.3 | 9.9 / 9.0 / 9.4 | 9.6 / 7.7 / 8.6 | **11.9 / 9.0 / 10.4** * |
|
||||
| http-close-1k, k req/s | 48.7 / 52.1 / 50.4 | ‖ | 5.0 / 4.8 / 4.9 | 4.4 / 4.0 / 4.2 | 5.2 / 4.8 / 5.0 | 13.3 / 12.9 / 13.1 | **16.6 / 15.1 / 15.9** * | ‖ | 4.8 / 4.4 / 4.6 | 5.0 / 4.4 / 4.7 | **16.7 / 15.1 / 15.9** * | **16.8 / 15.5 / 16.1** * |
|
||||
|
||||
|
||||
## Skylake (Intel Xeon, OpenStack virtual machine)
|
||||
## Splice by direction
|
||||
|
||||
#### Throughput, Gbit/s (thousands of requests per second for HTTP)
|
||||
devel splices what the server sends with `-s1` (downloads), what the client
|
||||
sends with `-s2` (uploads), both with `-s3`; haproxy's matching settings are
|
||||
`option splice-response`, `option splice-request` and both. The 2000 client
|
||||
scenario here sends a 2 KB POST body with each request and gets 50 KB back
|
||||
(`http-ka-2k-50k-2000`). Same setup and markings as above; measured in a
|
||||
session of their own ([data/](data/) `*-splice-direction.csv`).
|
||||
|
||||
| scenario | no proxy | ‖ | 0.9.4 | 1.0.1 | devel | nginx | haproxy | ‖ | 0.9.4 splice | devel splice | haproxy splice-auto | haproxy splice |
|
||||
|---|---:|:-:|---:|---:|---:|---:|---:|:-:|---:|---:|---:|---:|
|
||||
| stream1 | 44.4 | ‖ | 5.5 | 19.1 | **19.9** | 9.8 | 9.7 | ‖ | **29.2** | **31.4** | **30.6** | **32.3** |
|
||||
| stream16 | 150.5 | ‖ | 5.6 | **18.9** | **18.8** | 9.9 | 9.2 | ‖ | 28.3 | **31.2** | **30.3 ‡** | **31.5 ‡** |
|
||||
| stream1-down | 43.1 | ‖ | 5.6 | **18.8** | **19.4** | 9.7 | 9.3 | ‖ | **34.4** | 32.0 | 31.0 | **33.7** |
|
||||
| http-ka-1k | 1.30 (127.1k/s) | ‖ | 0.19 (19.2k/s) | 0.06 (6.1k/s) | 0.18 (18.1k/s) | **0.37 (36.5k/s)** | **0.37 (37.3k/s)** | ‖ | 0.15 (14.6k/s) | 0.14 (13.8k/s) | **0.37 (37.2k/s)** | **0.38 (38.0k/s)** |
|
||||
| http-ka-1m | 67.52 (8.0k/s) | ‖ | 5.84 (0.7k/s) | 12.37 (1.5k/s) | **18.30 (2.2k/s) ‡** | 5.77 (0.7k/s) | 7.56 (0.9k/s) | ‖ | **26.63 (3.2k/s) ‡** | 23.88 (2.8k/s) ‡ | 24.22 (2.9k/s) ‡ | **26.71 (3.2k/s) ‡** |
|
||||
| http-ka-50k-2000 | 35.30 (85.7k/s) | ‖ | 2.89 (7.0k/s) | 4.24 (10.3k/s) | **4.33 (10.5k/s)** | 3.77 (9.2k/s) | 3.01 (7.3k/s) | ‖ | **3.89 (9.4k/s)** | 3.71 (9.0k/s) | 3.19 (7.7k/s) | **3.72 (9.0k/s)** |
|
||||
| http-close-1k | 0.53 (52.1k/s) | ‖ | 0.05 (4.8k/s) | 0.04 (4.0k/s) | 0.05 (4.8k/s) | 0.13 (12.9k/s) | **0.15 (15.1k/s)** | ‖ | 0.04 (4.4k/s) | 0.04 (4.4k/s) | **0.15 (15.1k/s)** | **0.16 (15.5k/s)** |
|
||||
| scenario (M4 / Intel / average) | no proxy | ‖ | devel -s0 | haproxy | ‖ | devel -s1 | devel -s3 | haproxy splice-response | haproxy splice |
|
||||
|---|---:|:-:|---:|---:|:-:|---:|---:|---:|---:|
|
||||
| stream1, Gbit/s | 61.6 / 45.5 / 53.6 | ‖ | **22.4 / 19.0 / 20.7** | 13.1 / 9.5 / 11.3 | ‖ | 22.4 / 19.5 / 21.0 | **44.1 / 31.9 / 38.0** * | 13.6 / 9.7 / 11.7 | **46.3 / 30.7 / 38.5** * |
|
||||
| stream16, Gbit/s | 140.6 / 147.1 / 143.8 | ‖ | **21.1 / 19.2 / 20.2** | 9.0 / 8.9 / 8.9 | ‖ | 20.9 / 18.7 / 19.8 | **38.2 / 32.3 / 35.2** * | 9.2 / 9.1 / 9.2 | 23.2 / 33.3 / 28.3 |
|
||||
| stream1-down, Gbit/s | 63.7 / 47.0 / 55.3 | ‖ | **22.3 / 19.5 / 20.9** | 13.8 / 9.5 / 11.7 | ‖ | **47.9 / 33.0 / 40.5** * | **46.3 / 30.7 / 38.5** * | **46.9 / 32.3 / 39.6** * | **47.4 / 32.6 / 40.0** * |
|
||||
| http-ka-1k, k req/s | 120.0 / 127.6 / 123.8 | ‖ | 15.9 / 19.5 / 17.7 | **44.2 / 37.1 / 40.7** * | ‖ | 15.3 / 17.0 / 16.1 | 15.0 / 14.9 / 14.9 | **44.0 / 37.0 / 40.5** * | **44.1 / 35.0 / 39.5** * |
|
||||
| http-ka-1m, Gbit/s | 71.0 / 67.2 / 69.1 | ‖ | **22.3 / 17.5 / 19.9** | 5.8 / 7.7 / 6.8 | ‖ | **35.6 / 24.7 / 30.2** * | **34.6 / 24.5 / 29.5** * | 26.4 / 27.7 / 27.1 | 26.5 / 25.9 / 26.2 |
|
||||
| http-ka-2k-50k-2000, k req/s | 73.7 / 64.7 / 69.2 | ‖ | **9.5 / 9.7 / 9.6** | 8.8 / 7.2 / 8.0 | ‖ | 9.0 / 8.4 / 8.7 | 8.7 / 7.6 / 8.1 | **11.2 / 8.7 / 10.0** * | **11.2 / 9.0 / 10.1** * |
|
||||
| http-close-1k, k req/s | 49.0 / 43.4 / 46.2 | ‖ | 5.1 / 4.9 / 5.0 | **16.5 / 15.9 / 16.2** * | ‖ | 5.0 / 4.7 / 4.9 | 5.0 / 4.2 / 4.6 | **16.7 / 15.0 / 15.8** * | **16.8 / 15.5 / 16.2** * |
|
||||
|
||||
#### Proxy CPU time per gigabyte or per request
|
||||
|
||||
| scenario | no proxy | ‖ | 0.9.4 | 1.0.1 | devel | nginx | haproxy | ‖ | 0.9.4 splice | devel splice | haproxy splice-auto | haproxy splice |
|
||||
|---|---:|:-:|---:|---:|---:|---:|---:|:-:|---:|---:|---:|---:|
|
||||
| stream1 | – | ‖ | 1.45 s/GB | 0.42 s/GB | **0.40 s/GB** | 0.82 s/GB | 0.82 s/GB | ‖ | **0.27 s/GB** | **0.25 s/GB** | **0.26 s/GB** | **0.25 s/GB** |
|
||||
| stream16 | – | ‖ | 1.43 s/GB | **0.42 s/GB** | **0.43 s/GB** | 0.81 s/GB | 0.87 s/GB | ‖ | 0.28 s/GB | **0.26 s/GB** | **0.26 s/GB** | **0.25 s/GB** |
|
||||
| stream1-down | – | ‖ | 1.43 s/GB | **0.43 s/GB** | **0.41 s/GB** | 0.82 s/GB | 0.86 s/GB | ‖ | **0.23 s/GB** | 0.25 s/GB | 0.26 s/GB | **0.24 s/GB** |
|
||||
| http-ka-1k | – | ‖ | 52 µs/req | 72 µs/req | 55 µs/req | **27 µs/req** | **27 µs/req** | ‖ | 68 µs/req | 72 µs/req | **27 µs/req** | **26 µs/req** |
|
||||
| http-ka-1m | – | ‖ | 1.37 s/GB | 0.53 s/GB | **0.44 s/GB** | 1.39 s/GB | 1.07 s/GB | ‖ | **0.30 s/GB** | 0.34 s/GB | 0.33 s/GB | **0.30 s/GB** |
|
||||
| http-ka-50k-2000 | – | ‖ | 2.88 s/GB | 1.98 s/GB | **1.93 s/GB** | 2.15 s/GB | 2.70 s/GB | ‖ | **2.15 s/GB** | 2.26 s/GB | 2.55 s/GB | **2.18 s/GB** |
|
||||
| http-close-1k | – | ‖ | 211 µs/req | 250 µs/req | 210 µs/req | 77 µs/req | **66 µs/req** | ‖ | 229 µs/req | 230 µs/req | **66 µs/req** | **65 µs/req** |
|
||||
* Each option splices the direction it names: with `-s1` an upload stream
|
||||
goes at the copying speed and a download stream at the splicing one, as with
|
||||
haproxy's `splice-response`.
|
||||
* For bulk downloads `-s1` gets all of splice()'s gain; `-s3` is needed only
|
||||
for bulk uploads (stream1, stream16).
|
||||
* Small requests and 50 KB answers gain nothing from splicing in 3proxy, in
|
||||
either direction: devel `-s0` stays ahead of `-s1` and `-s3`. haproxy gains
|
||||
25% with 2000 clients from splicing the answers; there it is ahead of devel by
|
||||
4-5%.
|
||||
|
||||
#### Proxy peak memory, MB
|
||||
## Grace delay with splice
|
||||
|
||||
| scenario | no proxy | ‖ | 0.9.4 | 1.0.1 | devel | nginx | haproxy | ‖ | 0.9.4 splice | devel splice | haproxy splice-auto | haproxy splice |
|
||||
|---|---:|:-:|---:|---:|---:|---:|---:|:-:|---:|---:|---:|---:|
|
||||
| stream1 | – | ‖ | **2** | 5 | 8 | 34 | 30 | ‖ | 10 | **8** | 44 | 42 |
|
||||
| stream16 | – | ‖ | 93 | 96 | 91 | 107 | **59** | ‖ | 79 | 88 | 107 | **62** |
|
||||
| stream1-down | – | ‖ | **3** | 8 | 8 | 32 | 31 | ‖ | **9** | 11 | 43 | 46 |
|
||||
| http-ka-1k | – | ‖ | **5** | 10 | 10 | 32 | 32 | ‖ | **5** | 10 | 37 | 40 |
|
||||
| http-ka-1m | – | ‖ | **14** | **14** | 17 | 45 | 45 | ‖ | **15** | **18** | 54 | 53 |
|
||||
| http-ka-50k-2000 | – | ‖ | 185 | 137 | **153** | **113** | 178 | ‖ | **91** | 160 | 185 | 195 |
|
||||
| http-close-1k | – | ‖ | **16** | 23 | 57 | 31 | 29 | ‖ | **22** | 42 | 40 | 38 |
|
||||
`-s1` without grace delay, with the setting suggested in the documentation
|
||||
(`-g8000,3,10`: wait 10 ms before reading once 3 reads in a row averaged 8 KB or
|
||||
less), and with one meant to wait on answers only (`-g65536,2,10`: any 2 reads
|
||||
in a row; an HTTP request body is read at once, an answer of 50 KB or more is
|
||||
not). Measured in a session of their own ([data/](data/) `*-grace.csv`).
|
||||
|
||||
| scenario (M4 / Intel / average) | -s1, no grace delay | -s1 -g8000,3,10 | -s1 -g65536,2,10 |
|
||||
|---|---:|---:|---:|
|
||||
| stream1, Gbit/s | **22.0 / 20.0 / 21.0** * | **22.1 / 19.7 / 20.9** * | **22.4 / 20.1 / 21.3** * |
|
||||
| stream16, Gbit/s | **20.8 / 19.5 / 20.2** * | **20.9 / 18.4 / 19.7** * | **20.7 / 19.1 / 19.9** * |
|
||||
| stream1-down, Gbit/s | **48.1 / 32.7 / 40.4** * | 28.6 / 33.0 / 30.8 | 18.3 / 32.5 / 25.4 |
|
||||
| http-ka-1k, k req/s | 15.4 / 15.4 / 15.4 | **15.5 / 16.4 / 16.0** * | **15.5 / 16.6 / 16.0** * |
|
||||
| http-ka-1m, Gbit/s | **35.6 / 25.5 / 30.5** * | **35.5 / 25.2 / 30.3** * | **36.1 / 25.4 / 30.8** * |
|
||||
| http-ka-2k-50k-2000, k req/s | **9.0 / 8.3 / 8.6** * | **9.0 / 8.3 / 8.7** * | **9.1 / 8.5 / 8.8** * |
|
||||
| http-close-1k, k req/s | **5.1 / 4.5 / 4.8** * | **5.1 / 4.6 / 4.8** * | **5.1 / 4.7 / 4.9** * |
|
||||
|
||||
|
||||
* Grace delay makes little difference here: 4% more 1 KB requests over
|
||||
kept-alive connections, nothing elsewhere - except on the M4 with a single
|
||||
download stream, where it costs 40% (`-g8000,3,10`) to 60% (`-g65536,2,10`)
|
||||
of the throughput. These links are fast and local: reads are rarely small,
|
||||
so the delay seldom applies, and when it does it mostly adds waiting. It is
|
||||
meant for slow links carrying small packets, which this benchmark does not
|
||||
have.
|
||||
|
||||
## Caveats
|
||||
|
||||
|
||||
Reference in new issue
Block a user