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

+13
View File
@@ -0,0 +1,13 @@
proxy,scenario,rep,gbit,rate,p50_ms,p90_ms,p99_ms,errors,timeouts,retrans,prx_cpu_s,prx_task_s,cpu_s_per_gb,cpu_us_per_req,peak_mb,cli_util,prx_util,srv_util,cli_thread,srv_thread,bound
3proxy-devel-s0,mix-connect-3k,0,1.0833090672,2984.7,40.96,126.976,507.904,0,0,0,10.49,3.4134260000000003,7.746635059273138,351.4591081180688,1356.38671875,0.7092015921329899,0.49481132075471695,0.24598677998111426,1.0228413218482582,0.29418743221806337,client
3proxy-devel-s,mix-connect-3k,0,1.084996412,2984.5,40.96,122.88,507.904,0,0,0,9.64,3.03341,7.107857606445247,323.00217791924945,1361.6484375,0.7052681537731371,0.4573055028462998,0.2541646834840552,1.0324029701744581,0.3039691427621107,client
"3proxy-devel-s0-g8000,2,5",mix-connect-3k,0,1.0845063936,2985.5,40.96,126.976,507.904,0,0,0,10.08,3.3130330000000003,7.435640810960729,337.63188745603753,1358.56640625,0.705270621602458,0.4763705103969754,0.2440305635148042,1.0190327482029051,0.29567378104061465,client
"3proxy-devel-s-g8000,2,5",mix-connect-3k,0,1.0827053152000001,2984.5,40.96,126.976,507.904,0,0,0,9.4,2.9779820000000004,6.945564868323277,314.96062992125985,1369.7578125,0.7084223013048636,0.44655581947743467,0.23424723424723426,1.0309091510574537,0.2898800177422385,client
3proxy-devel-s,mix-connect-3k,1,1.0793660167999999,2983.6,40.96,126.976,507.904,0,0,0,9.97,2.910027,7.389522993920518,334.1600750770881,1364.75,0.7185542168674699,0.48071359691417553,0.2453748782862707,1.0341719610882976,0.3025844264339619,client
"3proxy-devel-s0-g8000,2,5",mix-connect-3k,1,1.08644042,2985.4,40.96,126.976,507.904,0,0,0,9.6,2.9069730000000003,7.068956436653931,321.5649494205132,1358.70703125,0.7192598003408814,0.4680643588493418,0.23092072870507138,1.029042164689488,0.2788424858854484,client
"3proxy-devel-s-g8000,2,5",mix-connect-3k,1,1.079747428,2983.7,40.96,126.976,507.904,0,0,0,10.19,3.119586,7.549913793357978,341.5222710057982,1368.4609375,0.7161716171617162,0.48362600854295207,0.24462494027711418,1.027294864636595,0.30028820246596594,client
3proxy-devel-s0,mix-connect-3k,1,1.0821890424,2984,40.96,122.88,507.904,0,0,0,9.84,3.104513,7.274144989069611,329.7587131367292,1350.8671875,0.722448003825006,0.4733044733044733,0.25,1.0400936512304055,0.30273999837722054,client
"3proxy-devel-s0-g8000,2,5",mix-connect-3k,2,1.0854676855999998,2984.5,40.96,126.976,507.904,0,0,0,9.64,3.0625229999999997,7.104771613479343,323.00217791924945,1355.9609375,0.7131560028756291,0.46058289536550406,0.23949782713664897,0.9793776890400269,0.28664305959265485,client
"3proxy-devel-s-g8000,2,5",mix-connect-3k,2,1.0846176912,2984.3,40.96,126.976,507.904,0,0,0,9.68,2.9011819999999995,7.139842972164863,324.36417250276446,1369.375,0.7232613908872901,0.4656084656084656,0.23959341723136496,1.0444379140190048,0.29042166740903086,client
3proxy-devel-s0,mix-connect-3k,2,1.0819248935999999,2984.4,40.96,122.88,507.904,0,0,0,9.82,3.2234460000000005,7.261132493088244,329.04436402626993,1350.875,0.691814946619217,0.46386395843174305,0.2460582895365504,1.0237687152033708,0.30372538157979995,client
3proxy-devel-s,mix-connect-3k,2,1.0825509968,2984.5,40.96,126.976,507.904,0,0,0,9.45,2.92331,6.983504723885724,316.635952420841,1362.32421875,0.6979881656804734,0.44786729857819907,0.2350406893250359,1.0260921713430133,0.2851011848282969,client
1 proxy scenario rep gbit rate p50_ms p90_ms p99_ms errors timeouts retrans prx_cpu_s prx_task_s cpu_s_per_gb cpu_us_per_req peak_mb cli_util prx_util srv_util cli_thread srv_thread bound
2 3proxy-devel-s0 mix-connect-3k 0 1.0833090672 2984.7 40.96 126.976 507.904 0 0 0 10.49 3.4134260000000003 7.746635059273138 351.4591081180688 1356.38671875 0.7092015921329899 0.49481132075471695 0.24598677998111426 1.0228413218482582 0.29418743221806337 client
3 3proxy-devel-s mix-connect-3k 0 1.084996412 2984.5 40.96 122.88 507.904 0 0 0 9.64 3.03341 7.107857606445247 323.00217791924945 1361.6484375 0.7052681537731371 0.4573055028462998 0.2541646834840552 1.0324029701744581 0.3039691427621107 client
4 3proxy-devel-s0-g8000,2,5 mix-connect-3k 0 1.0845063936 2985.5 40.96 126.976 507.904 0 0 0 10.08 3.3130330000000003 7.435640810960729 337.63188745603753 1358.56640625 0.705270621602458 0.4763705103969754 0.2440305635148042 1.0190327482029051 0.29567378104061465 client
5 3proxy-devel-s-g8000,2,5 mix-connect-3k 0 1.0827053152000001 2984.5 40.96 126.976 507.904 0 0 0 9.4 2.9779820000000004 6.945564868323277 314.96062992125985 1369.7578125 0.7084223013048636 0.44655581947743467 0.23424723424723426 1.0309091510574537 0.2898800177422385 client
6 3proxy-devel-s mix-connect-3k 1 1.0793660167999999 2983.6 40.96 126.976 507.904 0 0 0 9.97 2.910027 7.389522993920518 334.1600750770881 1364.75 0.7185542168674699 0.48071359691417553 0.2453748782862707 1.0341719610882976 0.3025844264339619 client
7 3proxy-devel-s0-g8000,2,5 mix-connect-3k 1 1.08644042 2985.4 40.96 126.976 507.904 0 0 0 9.6 2.9069730000000003 7.068956436653931 321.5649494205132 1358.70703125 0.7192598003408814 0.4680643588493418 0.23092072870507138 1.029042164689488 0.2788424858854484 client
8 3proxy-devel-s-g8000,2,5 mix-connect-3k 1 1.079747428 2983.7 40.96 126.976 507.904 0 0 0 10.19 3.119586 7.549913793357978 341.5222710057982 1368.4609375 0.7161716171617162 0.48362600854295207 0.24462494027711418 1.027294864636595 0.30028820246596594 client
9 3proxy-devel-s0 mix-connect-3k 1 1.0821890424 2984 40.96 122.88 507.904 0 0 0 9.84 3.104513 7.274144989069611 329.7587131367292 1350.8671875 0.722448003825006 0.4733044733044733 0.25 1.0400936512304055 0.30273999837722054 client
10 3proxy-devel-s0-g8000,2,5 mix-connect-3k 2 1.0854676855999998 2984.5 40.96 126.976 507.904 0 0 0 9.64 3.0625229999999997 7.104771613479343 323.00217791924945 1355.9609375 0.7131560028756291 0.46058289536550406 0.23949782713664897 0.9793776890400269 0.28664305959265485 client
11 3proxy-devel-s-g8000,2,5 mix-connect-3k 2 1.0846176912 2984.3 40.96 126.976 507.904 0 0 0 9.68 2.9011819999999995 7.139842972164863 324.36417250276446 1369.375 0.7232613908872901 0.4656084656084656 0.23959341723136496 1.0444379140190048 0.29042166740903086 client
12 3proxy-devel-s0 mix-connect-3k 2 1.0819248935999999 2984.4 40.96 122.88 507.904 0 0 0 9.82 3.2234460000000005 7.261132493088244 329.04436402626993 1350.875 0.691814946619217 0.46386395843174305 0.2460582895365504 1.0237687152033708 0.30372538157979995 client
13 3proxy-devel-s mix-connect-3k 2 1.0825509968 2984.5 40.96 126.976 507.904 0 0 0 9.45 2.92331 6.983504723885724 316.635952420841 1362.32421875 0.6979881656804734 0.44786729857819907 0.2350406893250359 1.0260921713430133 0.2851011848282969 client