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.5026553528000001,2016.3,1769.472,3276.8,6029.312,0,0,0,9.07,5.4787170000000005,14.435338168749329,449.83385408917326,1624.10546875,0.7859016966940703,0.7752136752136752,0.26531552280055276,1.7160011364626462,0.3318112845458311,client
3proxy-devel-s,mix-connect-3k,0,0.5055435112,2018.2,1572.864,3276.8,6029.312,0,0,0,8.73,4.983674000000001,13.814834619125461,432.5636705975622,1643.046875,0.7853107344632768,0.7611159546643418,0.2474964234620887,1.682817359760398,0.3133705694787233,client
"3proxy-devel-s0-g8000,2,2",mix-connect-3k,0,0.5077507432,2027.1,1572.864,3145.728,6029.312,0,0,0,8.97,5.182219999999999,14.13291875217092,442.50406985348525,1628.4765625,0.7713158346200034,0.7614601018675722,0.2532169117647059,1.6409090179701302,0.3096839969383878,client
"3proxy-devel-s-g8000,2,2",mix-connect-3k,0,0.492786896,1972,1441.792,3145.728,6029.312,0,0,0,8.93,5.155992,14.49713873885153,452.8397565922921,1648.78125,0.7797196746842014,0.7587085811384877,0.25252989880404786,1.5377254742818998,0.31142995915036503,client
"3proxy-devel-s0-g6000,3,2",mix-connect-3k,0,0.5180710432,2059.2,1572.864,3014.656,5767.168,0,0,0,8.73,4.974272000000001,13.480776607126149,423.95104895104896,1624.7890625,0.7704663212435233,0.7480719794344473,0.2525533890436397,1.6337551510668915,0.30846803460564226,client
"3proxy-devel-s-g6000,3,2",mix-connect-3k,0,0.5005130736,2002.1,1638.4,3276.8,5767.168,0,0,0,8.56,4.808815000000001,13.68196029475303,427.5510713750562,1657.8359375,0.788545486292998,0.740484429065744,0.246485473289597,1.6741640196162766,0.3037022737184374,client
3proxy-devel-s,mix-connect-3k,1,0.501611408,2012.4,1572.864,3145.728,6029.312,0,0,0,8.7,5.0259730000000005,13.875282517498086,432.31961836613,1651.9296875,0.7911971830985915,0.759825327510917,0.25213270142180094,1.7217516572757408,0.3147178102317144,client
"3proxy-devel-s0-g8000,2,2",mix-connect-3k,1,0.4731266224,1935.9,2097.152,3670.016,6553.6,0,0,0,9.38,6.211530999999999,15.860447594208347,484.52915956402705,1624.125,0.7885977337110481,0.8235294117647058,0.27073403241182076,1.6967236704681563,0.3475210945286125,client
"3proxy-devel-s-g8000,2,2",mix-connect-3k,1,0.5073942288,2004.6,1638.4,3276.8,6029.312,0,0,0,9.1,5.489731,14.347817903284753,453.9559014267185,1652.72265625,0.7735391017860239,0.7811158798283262,0.2600373482726424,1.6689494274684802,0.3340759738875872,client
"3proxy-devel-s0-g6000,3,2",mix-connect-3k,1,0.4832782848,1941.3,1769.472,3407.872,6029.312,0,0,0,9.52,6.0416859999999994,15.75903623137507,490.3930355947046,1621.59375,0.7744945567651633,0.8115942028985508,0.2722634508348794,1.6804565953110593,0.34377127665015755,client
"3proxy-devel-s-g6000,3,2",mix-connect-3k,1,0.4924578528,1970,1703.936,3407.872,6291.456,0,0,0,9.16,5.66202,14.880461258429953,464.9746192893401,1654.5625,0.7813310285220397,0.7855917667238422,0.26139534883720933,1.6640131407202619,0.3442440271664262,client
3proxy-devel-s0,mix-connect-3k,1,0.4992314712,1970.7,1900.544,3538.944,6291.456,0,0,0,9.18,5.6932979999999995,14.710611056525076,465.8243263814888,1624.52734375,0.7835807860262008,0.7900172117039587,0.2626168224299065,1.7137227393703787,0.34112783016938886,client
"3proxy-devel-s0-g8000,2,2",mix-connect-3k,2,0.4930580888,1971.3,1703.936,3276.8,6029.312,0,0,0,9.45,6.154132,15.332878968479058,479.3790899406483,1626.4375,0.7757137942896457,0.8125537403267412,0.26891143911439114,1.751814076984423,0.3489944950977998,client
"3proxy-devel-s-g8000,2,2",mix-connect-3k,2,0.470694008,1898.1,1835.008,3538.944,6291.456,0,0,0,9.46,6.355941999999999,16.078386109389353,498.39312997207736,1648.43359375,0.791696113074205,0.8312829525483304,0.2665719696969697,1.6803208230109552,0.35431600310337713,client
"3proxy-devel-s0-g6000,3,2",mix-connect-3k,2,0.49970959119999997,2002.9,1572.864,3145.728,6029.312,0,0,0,9.28,5.6852670000000005,14.856628991594988,463.32817414748615,1624.421875,0.768188057652711,0.7851099830795262,0.26172953081876726,1.6541433623643533,0.3376026904937915,client
"3proxy-devel-s-g6000,3,2",mix-connect-3k,2,0.4930426048,1979.8,1638.4,3276.8,6029.312,0,0,0,8.65,5.057483999999999,14.03529823311529,436.91281947671484,1657.2578125,0.7802408797346831,0.7515204170286707,0.24506114769520226,1.6559641915334768,0.32044526316624616,client
3proxy-devel-s0,mix-connect-3k,2,0.508268592,2037.5,1572.864,3145.728,6029.312,0,0,0,9.02,5.386245000000001,14.197217993749256,442.6993865030675,1626.52734375,0.7777970511708586,0.7702818104184458,0.25405656003708854,1.6728295996411624,0.32472836537380906,client
3proxy-devel-s,mix-connect-3k,2,0.515330956,2053.4,1507.328,3145.728,5767.168,0,0,0,8.7,5.001646999999999,13.505883780053763,423.68754261225286,1650.703125,0.7894550601556971,0.7591623036649214,0.24846190250828207,1.5811331699083153,0.31776826337477704,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.5026553528000001 2016.3 1769.472 3276.8 6029.312 0 0 0 9.07 5.4787170000000005 14.435338168749329 449.83385408917326 1624.10546875 0.7859016966940703 0.7752136752136752 0.26531552280055276 1.7160011364626462 0.3318112845458311 client
3 3proxy-devel-s mix-connect-3k 0 0.5055435112 2018.2 1572.864 3276.8 6029.312 0 0 0 8.73 4.983674000000001 13.814834619125461 432.5636705975622 1643.046875 0.7853107344632768 0.7611159546643418 0.2474964234620887 1.682817359760398 0.3133705694787233 client
4 3proxy-devel-s0-g8000,2,2 mix-connect-3k 0 0.5077507432 2027.1 1572.864 3145.728 6029.312 0 0 0 8.97 5.182219999999999 14.13291875217092 442.50406985348525 1628.4765625 0.7713158346200034 0.7614601018675722 0.2532169117647059 1.6409090179701302 0.3096839969383878 client
5 3proxy-devel-s-g8000,2,2 mix-connect-3k 0 0.492786896 1972 1441.792 3145.728 6029.312 0 0 0 8.93 5.155992 14.49713873885153 452.8397565922921 1648.78125 0.7797196746842014 0.7587085811384877 0.25252989880404786 1.5377254742818998 0.31142995915036503 client
6 3proxy-devel-s0-g6000,3,2 mix-connect-3k 0 0.5180710432 2059.2 1572.864 3014.656 5767.168 0 0 0 8.73 4.974272000000001 13.480776607126149 423.95104895104896 1624.7890625 0.7704663212435233 0.7480719794344473 0.2525533890436397 1.6337551510668915 0.30846803460564226 client
7 3proxy-devel-s-g6000,3,2 mix-connect-3k 0 0.5005130736 2002.1 1638.4 3276.8 5767.168 0 0 0 8.56 4.808815000000001 13.68196029475303 427.5510713750562 1657.8359375 0.788545486292998 0.740484429065744 0.246485473289597 1.6741640196162766 0.3037022737184374 client
8 3proxy-devel-s mix-connect-3k 1 0.501611408 2012.4 1572.864 3145.728 6029.312 0 0 0 8.7 5.0259730000000005 13.875282517498086 432.31961836613 1651.9296875 0.7911971830985915 0.759825327510917 0.25213270142180094 1.7217516572757408 0.3147178102317144 client
9 3proxy-devel-s0-g8000,2,2 mix-connect-3k 1 0.4731266224 1935.9 2097.152 3670.016 6553.6 0 0 0 9.38 6.211530999999999 15.860447594208347 484.52915956402705 1624.125 0.7885977337110481 0.8235294117647058 0.27073403241182076 1.6967236704681563 0.3475210945286125 client
10 3proxy-devel-s-g8000,2,2 mix-connect-3k 1 0.5073942288 2004.6 1638.4 3276.8 6029.312 0 0 0 9.1 5.489731 14.347817903284753 453.9559014267185 1652.72265625 0.7735391017860239 0.7811158798283262 0.2600373482726424 1.6689494274684802 0.3340759738875872 client
11 3proxy-devel-s0-g6000,3,2 mix-connect-3k 1 0.4832782848 1941.3 1769.472 3407.872 6029.312 0 0 0 9.52 6.0416859999999994 15.75903623137507 490.3930355947046 1621.59375 0.7744945567651633 0.8115942028985508 0.2722634508348794 1.6804565953110593 0.34377127665015755 client
12 3proxy-devel-s-g6000,3,2 mix-connect-3k 1 0.4924578528 1970 1703.936 3407.872 6291.456 0 0 0 9.16 5.66202 14.880461258429953 464.9746192893401 1654.5625 0.7813310285220397 0.7855917667238422 0.26139534883720933 1.6640131407202619 0.3442440271664262 client
13 3proxy-devel-s0 mix-connect-3k 1 0.4992314712 1970.7 1900.544 3538.944 6291.456 0 0 0 9.18 5.6932979999999995 14.710611056525076 465.8243263814888 1624.52734375 0.7835807860262008 0.7900172117039587 0.2626168224299065 1.7137227393703787 0.34112783016938886 client
14 3proxy-devel-s0-g8000,2,2 mix-connect-3k 2 0.4930580888 1971.3 1703.936 3276.8 6029.312 0 0 0 9.45 6.154132 15.332878968479058 479.3790899406483 1626.4375 0.7757137942896457 0.8125537403267412 0.26891143911439114 1.751814076984423 0.3489944950977998 client
15 3proxy-devel-s-g8000,2,2 mix-connect-3k 2 0.470694008 1898.1 1835.008 3538.944 6291.456 0 0 0 9.46 6.355941999999999 16.078386109389353 498.39312997207736 1648.43359375 0.791696113074205 0.8312829525483304 0.2665719696969697 1.6803208230109552 0.35431600310337713 client
16 3proxy-devel-s0-g6000,3,2 mix-connect-3k 2 0.49970959119999997 2002.9 1572.864 3145.728 6029.312 0 0 0 9.28 5.6852670000000005 14.856628991594988 463.32817414748615 1624.421875 0.768188057652711 0.7851099830795262 0.26172953081876726 1.6541433623643533 0.3376026904937915 client
17 3proxy-devel-s-g6000,3,2 mix-connect-3k 2 0.4930426048 1979.8 1638.4 3276.8 6029.312 0 0 0 8.65 5.057483999999999 14.03529823311529 436.91281947671484 1657.2578125 0.7802408797346831 0.7515204170286707 0.24506114769520226 1.6559641915334768 0.32044526316624616 client
18 3proxy-devel-s0 mix-connect-3k 2 0.508268592 2037.5 1572.864 3145.728 6029.312 0 0 0 9.02 5.386245000000001 14.197217993749256 442.6993865030675 1626.52734375 0.7777970511708586 0.7702818104184458 0.25405656003708854 1.6728295996411624 0.32472836537380906 client
19 3proxy-devel-s mix-connect-3k 2 0.515330956 2053.4 1507.328 3145.728 5767.168 0 0 0 8.7 5.001646999999999 13.505883780053763 423.68754261225286 1650.703125 0.7894550601556971 0.7591623036649214 0.24846190250828207 1.5811331699083153 0.31776826337477704 client