bench: kernel TLS, with and without splice(), and CONNECT at 10 Mbit/s

bench.py takes ktls among 3proxy's options (ssl_ktls before the TLS
services) and for nginx (nginx::ktls, nginx::halfclose+ktls: Options
KTLS on both sides).

On Intel, whose OpenSSL and nginx have kernel TLS: 3proxy splicing over
it moves bulk data 6-17% faster at 5-34% less CPU per gigabyte, with 1K
requests 0-11% slower; before splice() over kernel TLS, and for nginx,
which relays through user space either way, kernel TLS was slower.

CONNECT at 10 Mbit/s, 10 ms, 0.5% loss: -s takes about 9% off the CPU
per exchange, grace delay matched to the rate changes nothing.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Vladimir DubrovinandClaude Opus 5.5 committed 2026-10-14 19:14:46 +03:00
1 parent 61041ebe7d
commit f834e0134b
6 files changed
+351 -5

No files matched your search

+6
View File
@@ -230,6 +230,12 @@ variant; `nginx::halfclose` turns on `proxy_half_close` in its relays, which
nginx leaves off: then a client shutting down its sending side still gets the
answer, as through 3proxy and haproxy.
`ktls` asks for kernel TLS in the `tls-*` scenarios: among 3proxy's options
(`3proxy:bench/bin/3proxy:ktls`) it adds `ssl_ktls` before the TLS services,
for nginx (`nginx::ktls`, or `nginx::halfclose+ktls`) it adds `Options KTLS`
to both sides' OpenSSL configuration. Either takes effect only where the
proxy's OpenSSL is built with kernel TLS and the tls module is loaded.
`--proxy stunnel` measures stunnel in the `tls-*` scenarios. `--proxy envoy`
measures envoy where nginx and haproxy are measured: as an HTTP proxy for the
origin (its connections there pooled), as a TCP relay (`tcp_proxy`) and in