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,0.4794767624,1905.7,1900.544,3670.016,6553.6,0,0,0,8.66,5.129937999999999,14.449083966701949,454.4261950989138,1605.56640625,0.7946460021134202,0.7629955947136564,0.24129821260583256,1.6250866846119945,0.30961445791106207,client
3proxy-devel-s,mix-connect-3k,0,0.4710143808,1879.1,2031.616,3801.088,6553.6,0,0,0,9.06,5.6060669999999995,15.388065195991572,482.1457080517269,1647.8046875,0.7860096485182633,0.7770154373927959,0.25965073529411764,1.7150413347805415,0.3432136488132463,client
"3proxy-devel-s0-g8000,2,2",mix-connect-3k,0,0.4711931848,1864.5,2097.152,3932.16,6815.744,0,0,0,9.09,5.775452,15.433160399139966,487.5301689460982,1609.7421875,0.7915011228191398,0.7890625,0.2569573283858998,1.703749811296275,0.33326356189318557,client
"3proxy-devel-s-g8000,2,2",mix-connect-3k,0,0.4811352832,1903.8,1966.08,3670.016,6553.6,0,0,0,9.01,5.485297,14.981233452803654,473.2639983191512,1639.08203125,0.7802927161334241,0.7616229923922232,0.2526267702147099,1.6662042541145101,0.33016843014714964,client
"3proxy-devel-s0-g6000,3,2",mix-connect-3k,0,0.4906030192,1931.5,1900.544,3538.944,6291.456,0,0,0,8.79,5.137755,14.333381012344164,455.08672016567436,1605.71875,0.773980713923194,0.7442845046570703,0.2546612096407458,1.6552773247908623,0.3159788026351604,client
"3proxy-devel-s-g6000,3,2",mix-connect-3k,0,0.4908613904,1947.5,1966.08,3538.944,6291.456,0,0,0,8.55,4.8916900000000005,13.934687334903495,439.0243902439024,1646.83984375,0.7883846287602156,0.7402597402597403,0.24906542056074765,1.6815203469488078,0.31941275455895113,client
3proxy-devel-s,mix-connect-3k,1,0.49872257119999996,1963.9,1900.544,3538.944,6291.456,0,0,0,8.71,5.0497700000000005,13.97169569292596,443.50527012577015,1650.0625,0.7815384615384615,0.7375105842506351,0.2505705157462346,1.640751924021913,0.31125269197193023,client
"3proxy-devel-s0-g8000,2,2",mix-connect-3k,1,0.48395568,1923.5,1966.08,3670.016,6553.6,0,0,0,8.29,4.615622,13.703734193180662,430.9851832596828,1621.0546875,0.8042045252093355,0.7336283185840708,0.23944337811900193,1.7228764386085247,0.300384762058248,client
"3proxy-devel-s-g8000,2,2",mix-connect-3k,1,0.4940785384,1955.4,1900.544,3538.944,6291.456,0,0,0,8.48,4.790706999999999,13.730610566427309,433.6708601820599,1648.62109375,0.7886687521724018,0.7348353552859619,0.24285044538209094,1.6553920591923406,0.3097642273770273,client
"3proxy-devel-s0-g6000,3,2",mix-connect-3k,1,0.49695796,1968.9,1769.472,3407.872,6291.456,0,0,0,8.54,4.875425999999999,13.747641752231917,433.7447305602113,1613.1953125,0.7903869512406733,0.7381158167675022,0.25257249766136575,1.6753204707711276,0.31183905764543685,client
"3proxy-devel-s-g6000,3,2",mix-connect-3k,1,0.46450853039999995,1859.5,1966.08,3801.088,6553.6,0,0,0,8.83,5.294264,15.20747098856723,474.85883301962895,1645.984375,0.7939052316364277,0.7684943429068756,0.2526115859449193,1.7485641215831838,0.32571345247838934,client
3proxy-devel-s0,mix-connect-3k,1,0.4922644432,1943.4,1900.544,3538.944,6291.456,0,0,0,8.67,5.008548,14.089987801905899,446.12534732942265,1614.60546875,0.7810988251554941,0.7416595380667237,0.25487465181058494,1.6704984373871048,0.3232962653223888,client
"3proxy-devel-s0-g8000,2,2",mix-connect-3k,2,0.4822789392,1918.1,1900.544,3538.944,6553.6,0,0,0,8.67,5.109071999999999,14.381718620152427,452.00980136593506,1621.203125,0.7868169991326973,0.7552264808362369,0.2535344015080113,1.6344678774849317,0.3122190848334563,client
"3proxy-devel-s-g8000,2,2",mix-connect-3k,2,0.4906369752,1947.3,1835.008,3538.944,6291.456,0,0,0,8.55,4.813545000000001,13.941060999758097,439.0694808195964,1649.953125,0.7799556843361173,0.7289002557544757,0.23966558290757084,1.6368612681413328,0.3040565861846921,client
"3proxy-devel-s0-g6000,3,2",mix-connect-3k,2,0.48119724480000003,1912.6,1835.008,3670.016,6291.456,0,0,0,8.75,5.216499000000001,14.547049210369877,457.49241869706157,1617.37890625,0.7912983185994107,0.7569204152249135,0.2541176470588235,1.7117324988427898,0.32557697215395937,client
"3proxy-devel-s-g6000,3,2",mix-connect-3k,2,0.4810694672,1905.9,2031.616,3670.016,6553.6,0,0,0,8.8,5.252882,14.634061149162866,461.7241198383966,1647.13671875,0.7861461392295733,0.7540702656383891,0.2578268876611418,1.6766456625979065,0.32659590490384155,client
3proxy-devel-s0,mix-connect-3k,2,0.48662076239999996,1917.3,1966.08,3670.016,6291.456,0,0,0,8.79,5.267924999999999,14.450678111879919,458.45720544515723,1605.9296875,0.780416951469583,0.7474489795918368,0.25779816513761467,1.6366820580134742,0.3192198122199228,client
3proxy-devel-s,mix-connect-3k,2,0.4972584632,1959.4,1835.008,3407.872,6291.456,0,0,0,8.38,4.6915379999999995,13.481922372638666,427.68194345207723,1649.62890625,0.7936259143155695,0.7255411255411255,0.25350795135640786,1.6871873567176605,0.316210720887634,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 0.4794767624 1905.7 1900.544 3670.016 6553.6 0 0 0 8.66 5.129937999999999 14.449083966701949 454.4261950989138 1605.56640625 0.7946460021134202 0.7629955947136564 0.24129821260583256 1.6250866846119945 0.30961445791106207 client
3 3proxy-devel-s mix-connect-3k 0 0.4710143808 1879.1 2031.616 3801.088 6553.6 0 0 0 9.06 5.6060669999999995 15.388065195991572 482.1457080517269 1647.8046875 0.7860096485182633 0.7770154373927959 0.25965073529411764 1.7150413347805415 0.3432136488132463 client
4 3proxy-devel-s0-g8000,2,2 mix-connect-3k 0 0.4711931848 1864.5 2097.152 3932.16 6815.744 0 0 0 9.09 5.775452 15.433160399139966 487.5301689460982 1609.7421875 0.7915011228191398 0.7890625 0.2569573283858998 1.703749811296275 0.33326356189318557 client
5 3proxy-devel-s-g8000,2,2 mix-connect-3k 0 0.4811352832 1903.8 1966.08 3670.016 6553.6 0 0 0 9.01 5.485297 14.981233452803654 473.2639983191512 1639.08203125 0.7802927161334241 0.7616229923922232 0.2526267702147099 1.6662042541145101 0.33016843014714964 client
6 3proxy-devel-s0-g6000,3,2 mix-connect-3k 0 0.4906030192 1931.5 1900.544 3538.944 6291.456 0 0 0 8.79 5.137755 14.333381012344164 455.08672016567436 1605.71875 0.773980713923194 0.7442845046570703 0.2546612096407458 1.6552773247908623 0.3159788026351604 client
7 3proxy-devel-s-g6000,3,2 mix-connect-3k 0 0.4908613904 1947.5 1966.08 3538.944 6291.456 0 0 0 8.55 4.8916900000000005 13.934687334903495 439.0243902439024 1646.83984375 0.7883846287602156 0.7402597402597403 0.24906542056074765 1.6815203469488078 0.31941275455895113 client
8 3proxy-devel-s mix-connect-3k 1 0.49872257119999996 1963.9 1900.544 3538.944 6291.456 0 0 0 8.71 5.0497700000000005 13.97169569292596 443.50527012577015 1650.0625 0.7815384615384615 0.7375105842506351 0.2505705157462346 1.640751924021913 0.31125269197193023 client
9 3proxy-devel-s0-g8000,2,2 mix-connect-3k 1 0.48395568 1923.5 1966.08 3670.016 6553.6 0 0 0 8.29 4.615622 13.703734193180662 430.9851832596828 1621.0546875 0.8042045252093355 0.7336283185840708 0.23944337811900193 1.7228764386085247 0.300384762058248 client
10 3proxy-devel-s-g8000,2,2 mix-connect-3k 1 0.4940785384 1955.4 1900.544 3538.944 6291.456 0 0 0 8.48 4.790706999999999 13.730610566427309 433.6708601820599 1648.62109375 0.7886687521724018 0.7348353552859619 0.24285044538209094 1.6553920591923406 0.3097642273770273 client
11 3proxy-devel-s0-g6000,3,2 mix-connect-3k 1 0.49695796 1968.9 1769.472 3407.872 6291.456 0 0 0 8.54 4.875425999999999 13.747641752231917 433.7447305602113 1613.1953125 0.7903869512406733 0.7381158167675022 0.25257249766136575 1.6753204707711276 0.31183905764543685 client
12 3proxy-devel-s-g6000,3,2 mix-connect-3k 1 0.46450853039999995 1859.5 1966.08 3801.088 6553.6 0 0 0 8.83 5.294264 15.20747098856723 474.85883301962895 1645.984375 0.7939052316364277 0.7684943429068756 0.2526115859449193 1.7485641215831838 0.32571345247838934 client
13 3proxy-devel-s0 mix-connect-3k 1 0.4922644432 1943.4 1900.544 3538.944 6291.456 0 0 0 8.67 5.008548 14.089987801905899 446.12534732942265 1614.60546875 0.7810988251554941 0.7416595380667237 0.25487465181058494 1.6704984373871048 0.3232962653223888 client
14 3proxy-devel-s0-g8000,2,2 mix-connect-3k 2 0.4822789392 1918.1 1900.544 3538.944 6553.6 0 0 0 8.67 5.109071999999999 14.381718620152427 452.00980136593506 1621.203125 0.7868169991326973 0.7552264808362369 0.2535344015080113 1.6344678774849317 0.3122190848334563 client
15 3proxy-devel-s-g8000,2,2 mix-connect-3k 2 0.4906369752 1947.3 1835.008 3538.944 6291.456 0 0 0 8.55 4.813545000000001 13.941060999758097 439.0694808195964 1649.953125 0.7799556843361173 0.7289002557544757 0.23966558290757084 1.6368612681413328 0.3040565861846921 client
16 3proxy-devel-s0-g6000,3,2 mix-connect-3k 2 0.48119724480000003 1912.6 1835.008 3670.016 6291.456 0 0 0 8.75 5.216499000000001 14.547049210369877 457.49241869706157 1617.37890625 0.7912983185994107 0.7569204152249135 0.2541176470588235 1.7117324988427898 0.32557697215395937 client
17 3proxy-devel-s-g6000,3,2 mix-connect-3k 2 0.4810694672 1905.9 2031.616 3670.016 6553.6 0 0 0 8.8 5.252882 14.634061149162866 461.7241198383966 1647.13671875 0.7861461392295733 0.7540702656383891 0.2578268876611418 1.6766456625979065 0.32659590490384155 client
18 3proxy-devel-s0 mix-connect-3k 2 0.48662076239999996 1917.3 1966.08 3670.016 6291.456 0 0 0 8.79 5.267924999999999 14.450678111879919 458.45720544515723 1605.9296875 0.780416951469583 0.7474489795918368 0.25779816513761467 1.6366820580134742 0.3192198122199228 client
19 3proxy-devel-s mix-connect-3k 2 0.4972584632 1959.4 1835.008 3407.872 6291.456 0 0 0 8.38 4.6915379999999995 13.481922372638666 427.68194345207723 1649.62890625 0.7936259143155695 0.7255411255411255 0.25350795135640786 1.6871873567176605 0.316210720887634 client