bench: grace delay and splice() over emulated client links

Results on both machines over per-connection emulated links: seven
grace delay settings with a fifth client CPU; the promising ones over
three link qualities (100 Mbit/s 2 ms 0.1%, 20 Mbit/s 5 ms 0.5%,
5 Mbit/s 25 ms 1%); copying against splice() with and without grace
delay, the CONNECT mix included; and the slow link with waits matched
to its rate (10 and 20 ms).

Grace delay saves 35-46% of 3proxy's CPU per gigabyte on streams at
20 Mbit/s and 21-29% at 5 Mbit/s with a 10 ms wait, does nothing on
fast links, and costs CPU with waits too short for the rate or once
the CPU is exhausted. Over these links splice() and copying cost about
the same in the mix scenarios. A caveat says that every scenario but
the mix ones is synthetic.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Vladimir DubrovinandClaude Opus 5.5 committed 2026-10-14 17:06:47 +03:00
1 parent 4ab9eb7c2b
commit 5a7399450b
19 files changed
+1272

No files matched your search

+19
View File
@@ -0,0 +1,19 @@
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.0891735736,2994.9,20.48,63.488,262.144,0,0,0,7.91,2.608539,5.8099095987835305,264.11566329426694,1394.265625,0.6063357156654433,0.7533333333333333,0.22641509433962265,1.2162010766926186,0.2733318003914116,client
3proxy-devel-s,mix-connect-3k,0,1.0862082104000002,2995.4,20.48,65.536,278.528,0,0,0,8.55,2.798914,6.297135240287998,285.43767109568006,1389.71875,0.6004152510381275,0.8020637898686679,0.23263558515699334,1.1958041318973958,0.2855510191775506,client
"3proxy-devel-s0-g8000,2,2",mix-connect-3k,0,1.0886691472,2995.3,20.48,65.536,278.528,0,0,0,9.01,3.1604059999999996,6.620927963779076,300.80459386371984,1377.05078125,0.6082673362951516,0.8671799807507219,0.206511175898931,1.2052105449658954,0.2490093789707616,client
"3proxy-devel-s-g8000,2,2",mix-connect-3k,0,1.0876640136,2995.4,20.48,65.536,278.528,0,0,0,7.82,2.4607849999999996,5.751776211932953,261.06696935300795,1405.39453125,0.6010120669521214,0.7540983606557377,0.22561863173216884,1.2100443073856029,0.2776905432334459,client
"3proxy-devel-s0-g6000,3,2",mix-connect-3k,0,1.0861627632000002,2994.6,20.48,63.488,278.528,0,0,0,7.66,2.5793799999999996,5.641880027212482,255.79376210512257,1381.515625,0.6009551098376313,0.7295238095238096,0.2334128878281623,1.2044517595506683,0.27418175072469186,client
"3proxy-devel-s-g6000,3,2",mix-connect-3k,0,1.0881551872000002,2995.8,20.48,63.488,278.528,0,0,0,7.45,2.2813960000000004,5.477159940151596,248.68148741571534,1403.6875,0.6096225308038333,0.7247081712062257,0.22211350293542073,1.212632560019261,0.27056687437991234,client
3proxy-devel-s,mix-connect-3k,1,1.0853630104,2995.9,20.48,63.488,262.144,0,0,0,7.53,2.285549,5.550216786713519,251.34350278714243,1372.13671875,0.6161302830554478,0.7226487523992322,0.2266990291262136,1.2172169963112742,0.277252026226107,client
"3proxy-devel-s0-g8000,2,2",mix-connect-3k,1,1.0859976055999998,2995.4,20.48,63.488,262.144,0,0,0,7.69,2.5436669999999997,5.664837535807546,256.7269813714362,1378.625,0.6117693522906793,0.753921568627451,0.21764997521070897,1.1987812436117748,0.26503288269175057,client
"3proxy-devel-s-g8000,2,2",mix-connect-3k,1,1.089052316,2996.2,20.48,65.536,262.144,0,0,0,8.07,2.63279,5.928089867814945,269.34116547626996,1402.78515625,0.5957970465732677,0.7591721542803387,0.23193916349809887,1.1970979941769477,0.28893728957590054,client
"3proxy-devel-s0-g6000,3,2",mix-connect-3k,1,1.087126004,2996.2,20.48,65.536,262.144,0,0,0,8.09,2.691823,5.953311737725667,270.0086776583673,1365.62109375,0.6350136772176631,0.7877312560856865,0.2399014778325123,1.218369975624251,0.29168228205078417,client
"3proxy-devel-s-g6000,3,2",mix-connect-3k,1,1.0870633208,2994.5,20.48,65.536,278.528,0,0,0,8.03,2.50894,5.90949936133656,268.15829019869756,1388.98828125,0.6331326471159449,0.7796116504854369,0.23595505617977527,1.2199366706034516,0.28985429148294767,client
3proxy-devel-s0,mix-connect-3k,1,1.0872166528,2994.6,20.48,63.488,278.528,0,0,0,7.51,2.4359900000000003,5.526037505521181,250.78474587590998,1378.01171875,0.6183235867446394,0.7298347910592808,0.23114593535749264,1.2151200320929867,0.2817198325953915,client
"3proxy-devel-s0-g8000,2,2",mix-connect-3k,2,1.0914809375999999,2995.8,20.48,63.488,278.528,0,0,0,7.51,2.4974829999999995,5.504447941354501,250.68429134121104,1388.51953125,0.6046694133804199,0.7284190106692532,0.22531769305962854,1.212743575670677,0.27956225989947514,client
"3proxy-devel-s-g8000,2,2",mix-connect-3k,2,1.088825528,2995.7,20.48,63.488,278.528,0,0,0,7.12,2.142234,5.231324811480724,237.67399939913878,1396.6484375,0.607325718786924,0.6966731898238747,0.2231527093596059,1.2110581740303068,0.2683119418425006,client
"3proxy-devel-s0-g6000,3,2",mix-connect-3k,2,1.0860821208,2992.7,20.48,65.536,262.144,0,0,0,8.25,2.773329,6.076888546087554,275.6707989440973,1388.43359375,0.6092219020172911,0.786463298379409,0.22420443587270975,1.2101382769686528,0.27021588781567235,client
"3proxy-devel-s-g6000,3,2",mix-connect-3k,2,1.0852826952,2995.2,20.48,63.488,278.528,0,0,0,7.38,2.226658,5.44005725523154,246.39423076923077,1399.62890625,0.6104402025710947,0.7144240077444337,0.22840409956076135,1.210798319667711,0.2792725547415226,client
3proxy-devel-s0,mix-connect-3k,2,1.0870129392,2994.7,20.48,63.488,262.144,0,0,0,8.56,2.953312,6.2998330130641005,285.83831435536115,1379.71484375,0.6213444739840486,0.8098391674550615,0.25131139723414403,1.207649766822901,0.29565894744929033,client
3proxy-devel-s,mix-connect-3k,2,1.0883850344000001,2994,20.48,63.488,262.144,0,0,0,8.62,2.7879410000000004,6.335993037428702,287.90915163660657,1399.5859375,0.626044039483675,0.818613485280152,0.24225083452551263,1.2106756863672339,0.29195643673725036,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.0891735736 2994.9 20.48 63.488 262.144 0 0 0 7.91 2.608539 5.8099095987835305 264.11566329426694 1394.265625 0.6063357156654433 0.7533333333333333 0.22641509433962265 1.2162010766926186 0.2733318003914116 client
3 3proxy-devel-s mix-connect-3k 0 1.0862082104000002 2995.4 20.48 65.536 278.528 0 0 0 8.55 2.798914 6.297135240287998 285.43767109568006 1389.71875 0.6004152510381275 0.8020637898686679 0.23263558515699334 1.1958041318973958 0.2855510191775506 client
4 3proxy-devel-s0-g8000,2,2 mix-connect-3k 0 1.0886691472 2995.3 20.48 65.536 278.528 0 0 0 9.01 3.1604059999999996 6.620927963779076 300.80459386371984 1377.05078125 0.6082673362951516 0.8671799807507219 0.206511175898931 1.2052105449658954 0.2490093789707616 client
5 3proxy-devel-s-g8000,2,2 mix-connect-3k 0 1.0876640136 2995.4 20.48 65.536 278.528 0 0 0 7.82 2.4607849999999996 5.751776211932953 261.06696935300795 1405.39453125 0.6010120669521214 0.7540983606557377 0.22561863173216884 1.2100443073856029 0.2776905432334459 client
6 3proxy-devel-s0-g6000,3,2 mix-connect-3k 0 1.0861627632000002 2994.6 20.48 63.488 278.528 0 0 0 7.66 2.5793799999999996 5.641880027212482 255.79376210512257 1381.515625 0.6009551098376313 0.7295238095238096 0.2334128878281623 1.2044517595506683 0.27418175072469186 client
7 3proxy-devel-s-g6000,3,2 mix-connect-3k 0 1.0881551872000002 2995.8 20.48 63.488 278.528 0 0 0 7.45 2.2813960000000004 5.477159940151596 248.68148741571534 1403.6875 0.6096225308038333 0.7247081712062257 0.22211350293542073 1.212632560019261 0.27056687437991234 client
8 3proxy-devel-s mix-connect-3k 1 1.0853630104 2995.9 20.48 63.488 262.144 0 0 0 7.53 2.285549 5.550216786713519 251.34350278714243 1372.13671875 0.6161302830554478 0.7226487523992322 0.2266990291262136 1.2172169963112742 0.277252026226107 client
9 3proxy-devel-s0-g8000,2,2 mix-connect-3k 1 1.0859976055999998 2995.4 20.48 63.488 262.144 0 0 0 7.69 2.5436669999999997 5.664837535807546 256.7269813714362 1378.625 0.6117693522906793 0.753921568627451 0.21764997521070897 1.1987812436117748 0.26503288269175057 client
10 3proxy-devel-s-g8000,2,2 mix-connect-3k 1 1.089052316 2996.2 20.48 65.536 262.144 0 0 0 8.07 2.63279 5.928089867814945 269.34116547626996 1402.78515625 0.5957970465732677 0.7591721542803387 0.23193916349809887 1.1970979941769477 0.28893728957590054 client
11 3proxy-devel-s0-g6000,3,2 mix-connect-3k 1 1.087126004 2996.2 20.48 65.536 262.144 0 0 0 8.09 2.691823 5.953311737725667 270.0086776583673 1365.62109375 0.6350136772176631 0.7877312560856865 0.2399014778325123 1.218369975624251 0.29168228205078417 client
12 3proxy-devel-s-g6000,3,2 mix-connect-3k 1 1.0870633208 2994.5 20.48 65.536 278.528 0 0 0 8.03 2.50894 5.90949936133656 268.15829019869756 1388.98828125 0.6331326471159449 0.7796116504854369 0.23595505617977527 1.2199366706034516 0.28985429148294767 client
13 3proxy-devel-s0 mix-connect-3k 1 1.0872166528 2994.6 20.48 63.488 278.528 0 0 0 7.51 2.4359900000000003 5.526037505521181 250.78474587590998 1378.01171875 0.6183235867446394 0.7298347910592808 0.23114593535749264 1.2151200320929867 0.2817198325953915 client
14 3proxy-devel-s0-g8000,2,2 mix-connect-3k 2 1.0914809375999999 2995.8 20.48 63.488 278.528 0 0 0 7.51 2.4974829999999995 5.504447941354501 250.68429134121104 1388.51953125 0.6046694133804199 0.7284190106692532 0.22531769305962854 1.212743575670677 0.27956225989947514 client
15 3proxy-devel-s-g8000,2,2 mix-connect-3k 2 1.088825528 2995.7 20.48 63.488 278.528 0 0 0 7.12 2.142234 5.231324811480724 237.67399939913878 1396.6484375 0.607325718786924 0.6966731898238747 0.2231527093596059 1.2110581740303068 0.2683119418425006 client
16 3proxy-devel-s0-g6000,3,2 mix-connect-3k 2 1.0860821208 2992.7 20.48 65.536 262.144 0 0 0 8.25 2.773329 6.076888546087554 275.6707989440973 1388.43359375 0.6092219020172911 0.786463298379409 0.22420443587270975 1.2101382769686528 0.27021588781567235 client
17 3proxy-devel-s-g6000,3,2 mix-connect-3k 2 1.0852826952 2995.2 20.48 63.488 278.528 0 0 0 7.38 2.226658 5.44005725523154 246.39423076923077 1399.62890625 0.6104402025710947 0.7144240077444337 0.22840409956076135 1.210798319667711 0.2792725547415226 client
18 3proxy-devel-s0 mix-connect-3k 2 1.0870129392 2994.7 20.48 63.488 262.144 0 0 0 8.56 2.953312 6.2998330130641005 285.83831435536115 1379.71484375 0.6213444739840486 0.8098391674550615 0.25131139723414403 1.207649766822901 0.29565894744929033 client
19 3proxy-devel-s mix-connect-3k 2 1.0883850344000001 2994 20.48 63.488 262.144 0 0 0 8.62 2.7879410000000004 6.335993037428702 287.90915163660657 1399.5859375 0.626044039483675 0.818613485280152 0.24225083452551263 1.2106756863672339 0.29195643673725036 client