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.09057256,2997.8,8.192,20.48,63.488,0,0,0,6.02,2.3004629999999997,4.416028952718194,200.81393021549135,1375.92578125,0.532912889239259,0.5788461538461539,0.2175609756097561,1.0796907002277987,0.25960126569539915,client
3proxy-devel-s,mix-connect-3k,0,1.084848664,2998,8.192,20.48,65.536,0,0,0,6.1,2.1585799999999997,4.49832327949477,203.46897931954638,1392.171875,0.5305313243457573,0.5876685934489403,0.22818137493905413,1.086275992060578,0.27561390060532903,client
"3proxy-devel-s0-g8000,2,2",mix-connect-3k,0,1.08490678,2997.9,8.704,21.504,69.632,0,0,0,7.16,2.854164,5.279716290463223,238.83385036192,1369.296875,0.5430740037950664,0.6685340802987861,0.2453095684803002,1.0918605745931909,0.28814814422478635,client
"3proxy-devel-s-g8000,2,2",mix-connect-3k,0,1.0857003928,2997.7,8.704,21.504,63.488,0,0,0,5.93,2.0629370000000002,4.369529597171202,197.81832738432797,1394.9453125,0.5377679823682628,0.576287657920311,0.2249015748031496,1.0876212796486375,0.269239202915807,client
"3proxy-devel-s0-g6000,3,2",mix-connect-3k,0,1.084571192,2995.4,8.192,21.504,65.536,0,0,0,6.57,2.5594940000000004,4.846154903218193,219.33631568404888,1365.37890625,0.5122185876467192,0.6151685393258427,0.2225392296718973,1.0228580129089764,0.2686912891896779,client
"3proxy-devel-s-g6000,3,2",mix-connect-3k,0,1.0849829784,2997.1,8.192,20.48,61.44,0,0,0,6.07,2.142825,4.475646251299752,202.52911147442526,1386.18359375,0.5381076215243049,0.5916179337231969,0.23080708661417323,1.0913405748248093,0.2822375757385628,client
3proxy-devel-s,mix-connect-3k,1,1.1006223696,2998.3,8.192,20.48,65.536,0,0,0,5.95,2.065274,4.324825781734684,198.44578594536904,1374.83984375,0.5279761904761905,0.5710172744721689,0.22773722627737225,1.0751445744102113,0.2710467044624077,client
"3proxy-devel-s0-g8000,2,2",mix-connect-3k,1,1.0853468335999998,2997.7,8.704,21.504,65.536,0,0,0,6.28,2.3797079999999995,4.628935050499787,209.49394535810788,1374.6640625,0.5191020086648287,0.596958174904943,0.2238372093023256,1.0773453390741867,0.2704894879470544,client
"3proxy-devel-s-g8000,2,2",mix-connect-3k,1,1.0869423327999999,2997.4,8.704,21.504,65.536,0,0,0,6.96,2.633427,5.122626869869577,232.20124107559886,1386.875,0.513723263297369,0.6426592797783933,0.23446987389070528,1.077469368174608,0.28794917818745824,client
"3proxy-devel-s0-g6000,3,2",mix-connect-3k,1,1.0852738,2998.1,8.192,21.504,65.536,0,0,0,6.3,2.362376,4.643989378532864,210.13308428671493,1382.8828125,0.5331086439333862,0.6063522617901829,0.22975609756097562,1.0868367970111827,0.2685501404340731,client
"3proxy-devel-s-g6000,3,2",mix-connect-3k,1,1.0887815688,2997.4,8.192,21.504,63.488,0,0,0,6.39,2.3711580000000003,4.695156628738846,213.18476012544204,1387.34765625,0.5091539795721719,0.597196261682243,0.22714285714285715,1.0737215311385802,0.2780352162949828,client
3proxy-devel-s0,mix-connect-3k,1,1.0899739464,2997.6,8.192,20.48,63.488,0,0,0,6.01,2.257255,4.411114610473041,200.49372831598612,1365.37890625,0.5386142545165773,0.5818005808325266,0.22266009852216748,1.083677960649551,0.27036867692999966,client
"3proxy-devel-s0-g8000,2,2",mix-connect-3k,2,1.0977020288,2997.9,8.704,21.504,65.536,0,0,0,6.63,2.569765,4.831912359493673,221.1548083658561,1390.73828125,0.5225983173547251,0.6320305052430887,0.22393080249879865,1.0812185933377123,0.26165715118969096,client
"3proxy-devel-s-g8000,2,2",mix-connect-3k,2,1.0840546376,2997.3,8.704,21.504,65.536,0,0,0,6.51,2.4356719999999994,4.804185895583681,217.1954759283355,1382.1328125,0.5221289584128196,0.6078431372549019,0.24045261669024046,1.0866627941332638,0.2963291754991677,client
"3proxy-devel-s0-g6000,3,2",mix-connect-3k,2,1.0904912975999999,2998.1,8.192,21.504,65.536,0,0,0,6.34,2.464593,4.651114604181322,211.46726259964643,1369.23046875,0.5217642526964561,0.590316573556797,0.2328767123287671,1.0831140488530273,0.27621035156444457,client
"3proxy-devel-s-g6000,3,2",mix-connect-3k,2,1.0862548424,2996.9,8.192,21.504,65.536,0,0,0,6.49,2.3606550000000004,4.779725527877656,216.5571090126464,1391.4453125,0.5307468477206596,0.6116870876531574,0.22874880611270296,1.0955294458224296,0.27369798340973905,client
3proxy-devel-s0,mix-connect-3k,2,1.0905377472,2998.3,8.192,20.48,65.536,0,0,0,6.57,2.550913,4.819640597948117,219.12417036320582,1365.5078125,0.5221922037823234,0.6140186915887851,0.2376425855513308,1.0836879408191835,0.2813898775819122,client
3proxy-devel-s,mix-connect-3k,2,1.0851604207999999,2997.5,8.192,20.48,65.536,0,0,0,6.25,2.1970289999999997,4.607613680117368,208.5070892410342,1385.2578125,0.5342136854741897,0.6073858114674441,0.22698178237321517,1.092983209073947,0.275940522075071,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.09057256 2997.8 8.192 20.48 63.488 0 0 0 6.02 2.3004629999999997 4.416028952718194 200.81393021549135 1375.92578125 0.532912889239259 0.5788461538461539 0.2175609756097561 1.0796907002277987 0.25960126569539915 client
3 3proxy-devel-s mix-connect-3k 0 1.084848664 2998 8.192 20.48 65.536 0 0 0 6.1 2.1585799999999997 4.49832327949477 203.46897931954638 1392.171875 0.5305313243457573 0.5876685934489403 0.22818137493905413 1.086275992060578 0.27561390060532903 client
4 3proxy-devel-s0-g8000,2,2 mix-connect-3k 0 1.08490678 2997.9 8.704 21.504 69.632 0 0 0 7.16 2.854164 5.279716290463223 238.83385036192 1369.296875 0.5430740037950664 0.6685340802987861 0.2453095684803002 1.0918605745931909 0.28814814422478635 client
5 3proxy-devel-s-g8000,2,2 mix-connect-3k 0 1.0857003928 2997.7 8.704 21.504 63.488 0 0 0 5.93 2.0629370000000002 4.369529597171202 197.81832738432797 1394.9453125 0.5377679823682628 0.576287657920311 0.2249015748031496 1.0876212796486375 0.269239202915807 client
6 3proxy-devel-s0-g6000,3,2 mix-connect-3k 0 1.084571192 2995.4 8.192 21.504 65.536 0 0 0 6.57 2.5594940000000004 4.846154903218193 219.33631568404888 1365.37890625 0.5122185876467192 0.6151685393258427 0.2225392296718973 1.0228580129089764 0.2686912891896779 client
7 3proxy-devel-s-g6000,3,2 mix-connect-3k 0 1.0849829784 2997.1 8.192 20.48 61.44 0 0 0 6.07 2.142825 4.475646251299752 202.52911147442526 1386.18359375 0.5381076215243049 0.5916179337231969 0.23080708661417323 1.0913405748248093 0.2822375757385628 client
8 3proxy-devel-s mix-connect-3k 1 1.1006223696 2998.3 8.192 20.48 65.536 0 0 0 5.95 2.065274 4.324825781734684 198.44578594536904 1374.83984375 0.5279761904761905 0.5710172744721689 0.22773722627737225 1.0751445744102113 0.2710467044624077 client
9 3proxy-devel-s0-g8000,2,2 mix-connect-3k 1 1.0853468335999998 2997.7 8.704 21.504 65.536 0 0 0 6.28 2.3797079999999995 4.628935050499787 209.49394535810788 1374.6640625 0.5191020086648287 0.596958174904943 0.2238372093023256 1.0773453390741867 0.2704894879470544 client
10 3proxy-devel-s-g8000,2,2 mix-connect-3k 1 1.0869423327999999 2997.4 8.704 21.504 65.536 0 0 0 6.96 2.633427 5.122626869869577 232.20124107559886 1386.875 0.513723263297369 0.6426592797783933 0.23446987389070528 1.077469368174608 0.28794917818745824 client
11 3proxy-devel-s0-g6000,3,2 mix-connect-3k 1 1.0852738 2998.1 8.192 21.504 65.536 0 0 0 6.3 2.362376 4.643989378532864 210.13308428671493 1382.8828125 0.5331086439333862 0.6063522617901829 0.22975609756097562 1.0868367970111827 0.2685501404340731 client
12 3proxy-devel-s-g6000,3,2 mix-connect-3k 1 1.0887815688 2997.4 8.192 21.504 63.488 0 0 0 6.39 2.3711580000000003 4.695156628738846 213.18476012544204 1387.34765625 0.5091539795721719 0.597196261682243 0.22714285714285715 1.0737215311385802 0.2780352162949828 client
13 3proxy-devel-s0 mix-connect-3k 1 1.0899739464 2997.6 8.192 20.48 63.488 0 0 0 6.01 2.257255 4.411114610473041 200.49372831598612 1365.37890625 0.5386142545165773 0.5818005808325266 0.22266009852216748 1.083677960649551 0.27036867692999966 client
14 3proxy-devel-s0-g8000,2,2 mix-connect-3k 2 1.0977020288 2997.9 8.704 21.504 65.536 0 0 0 6.63 2.569765 4.831912359493673 221.1548083658561 1390.73828125 0.5225983173547251 0.6320305052430887 0.22393080249879865 1.0812185933377123 0.26165715118969096 client
15 3proxy-devel-s-g8000,2,2 mix-connect-3k 2 1.0840546376 2997.3 8.704 21.504 65.536 0 0 0 6.51 2.4356719999999994 4.804185895583681 217.1954759283355 1382.1328125 0.5221289584128196 0.6078431372549019 0.24045261669024046 1.0866627941332638 0.2963291754991677 client
16 3proxy-devel-s0-g6000,3,2 mix-connect-3k 2 1.0904912975999999 2998.1 8.192 21.504 65.536 0 0 0 6.34 2.464593 4.651114604181322 211.46726259964643 1369.23046875 0.5217642526964561 0.590316573556797 0.2328767123287671 1.0831140488530273 0.27621035156444457 client
17 3proxy-devel-s-g6000,3,2 mix-connect-3k 2 1.0862548424 2996.9 8.192 21.504 65.536 0 0 0 6.49 2.3606550000000004 4.779725527877656 216.5571090126464 1391.4453125 0.5307468477206596 0.6116870876531574 0.22874880611270296 1.0955294458224296 0.27369798340973905 client
18 3proxy-devel-s0 mix-connect-3k 2 1.0905377472 2998.3 8.192 20.48 65.536 0 0 0 6.57 2.550913 4.819640597948117 219.12417036320582 1365.5078125 0.5221922037823234 0.6140186915887851 0.2376425855513308 1.0836879408191835 0.2813898775819122 client
19 3proxy-devel-s mix-connect-3k 2 1.0851604207999999 2997.5 8.192 20.48 65.536 0 0 0 6.25 2.1970289999999997 4.607613680117368 208.5070892410342 1385.2578125 0.5342136854741897 0.6073858114674441 0.22698178237321517 1.092983209073947 0.275940522075071 client