mirror of
https://github.com/3proxy/3proxy.git
synced 2026-10-17 08:55:49 +08:00
bench: splice() heuristics in the mix, 8K against the default 16K
Splicing after two 8K reads instead of 16K is never better in the mix scenarios and costs 20% more CPU as an HTTP proxy on the 20 Mbit/s link: the default stays. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
parent
21ba6e9d0c
commit
cf3c491eec
@ -1188,6 +1188,26 @@ Intel only: 10 Mbit/s, 10 ms and 0.5% loss each way, two CPUs for the proxy
|
||||
the spread of the runs, as on the other links, and no setting moves the
|
||||
latency.
|
||||
|
||||
### splice() heuristics in the mix
|
||||
|
||||
Intel only, `-s` (the default, `-s:16384,2,4096`) against `-s:8192`, which
|
||||
splices after two reads of 8K rather than 16K: the mix scenarios, whose
|
||||
answers have a median of 12K, unshaped and over the 20 Mbit/s, 5 ms, 0.5%
|
||||
loss link with 5 client CPUs ([data/](data/) `skylake-mixsh-*.csv`); process
|
||||
CPU per exchange, three runs each.
|
||||
|
||||
| scenario | -s | -s:8192 |
|
||||
|---|---:|---:|
|
||||
| mix-relay, unshaped | 62-65 µs | 61-65 µs |
|
||||
| mix-http, unshaped | 96-100 µs | 93-104 µs |
|
||||
| mix-connect, unshaped | 61-62 µs | 61-64 µs |
|
||||
| mix-connect-3k, unshaped | 76-88 µs | 77-93 µs |
|
||||
| mix-http-3k, 20 Mbit/s | 122-143 µs, p99 0.8 s | 152-172 µs, p99 3.1 s |
|
||||
| mix-relay-3k, mix-connect-3k, 20 Mbit/s | 80-94 µs | 80-98 µs |
|
||||
|
||||
* Splicing the 8-16K exchanges too is never better and, as an HTTP proxy on
|
||||
the slow link, costs 20% more CPU and a longer tail: the default stays.
|
||||
|
||||
## Earlier sessions
|
||||
|
||||
The morning session of 13 October ([data/](data/) `*-16k-*.csv`, `*-mix.csv`)
|
||||
|
||||
19
bench/data/skylake-mixsh-20m.csv
Normal file
19
bench/data/skylake-mixsh-20m.csv
Normal 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-sh-s,mix-relay-3k,0,1.0868928072000001,2996.1,20.48,63.488,278.528,0,0,0,7.88,2.4070419999999997,5.80001998195209,263.00857781782986,1361.49609375,0.6216941356841702,0.7519083969465649,0.23062108810784784,1.2059099224963252,0.28206046577625227,client
|
||||
3proxy-sh-s:8192,mix-relay-3k,0,1.088213592,2996.8,20.48,63.488,278.528,0,0,0,7.82,2.4047960000000006,5.748871403547035,260.94500800854246,1362.94921875,0.6212894687086405,0.7391304347826086,0.23355576739752146,1.1985462344555244,0.2822466321265617,client
|
||||
3proxy-sh-s,mix-http-3k,0,1.0927358375999998,3007.8,24.576,155.648,524.288,0,0,0,8.79,3.669445,6.43522410269305,292.2401755435867,1612.15625,0.6152482269503546,0.8643067846607669,0.2624254473161034,1.1785202292368158,0.34013270242543037,client
|
||||
3proxy-sh-s:8192,mix-http-3k,0,1.1117411287999999,3046.3,61.44,720.896,3145.728,0,0,0,10.19,4.627662,7.332642275094356,334.5041525785379,1660.3984375,0.6463367855772919,0.9714013346043852,0.2975609756097561,1.1775785678335726,0.3716776953370653,client
|
||||
3proxy-sh-s,mix-connect-3k,0,1.0858432064,2995.3,20.48,63.488,262.144,0,0,0,8.13,2.594847,5.989815068755032,271.42523286482157,1394.23828125,0.6191376701966718,0.7698863636363636,0.24940277114190157,1.2225229265193875,0.30558926746008014,client
|
||||
3proxy-sh-s:8192,mix-connect-3k,0,1.0868987672000001,2995.1,20.48,65.536,278.528,0,0,0,8.08,2.5780289999999995,5.947195999358937,269.773964141431,1377.015625,0.6185157137447936,0.7608286252354048,0.2475059382422803,1.2045890058588973,0.30193818726355093,client
|
||||
3proxy-sh-s:8192,mix-relay-3k,1,1.0893551752000001,2996.5,20.48,63.488,278.528,0,0,0,8.48,2.711023,6.2275373123871125,282.99682963457366,1362.33203125,0.6141417981372362,0.8037914691943128,0.23852772466539196,1.2025079221619528,0.286031561291206,client
|
||||
3proxy-sh-s,mix-relay-3k,1,1.0895365255999998,2996.3,20.48,63.488,278.528,0,0,0,8.17,2.44202,5.998881034668086,272.6696258719087,1360.50390625,0.6363815530153725,0.8017664376840039,0.22985664854176965,1.2107020554558567,0.28061279735635053,client
|
||||
3proxy-sh-s:8192,mix-http-3k,1,1.1088017032000002,3039.1,131.072,819.2,3801.088,0,0,0,10.78,5.035107999999999,7.777765830545849,354.7102760685729,1675.7578125,0.6313909774436091,1.0,0.30224772835963654,1.175029867028751,0.3897666576608553,client
|
||||
3proxy-sh-s,mix-http-3k,1,1.1063305584,3034.1,34.816,311.296,819.2,0,0,0,9.85,4.3372090000000005,7.12264516257802,324.6432220427804,1641.703125,0.6217299980905099,0.9354226020892688,0.28351012536162007,1.1862353577762654,0.36212899795858183,client
|
||||
3proxy-sh-s:8192,mix-connect-3k,1,1.0894458295999998,2994.9,21.504,65.536,278.528,0,0,0,8.84,2.9274220000000004,6.491373694639365,295.16845303682925,1401.37890625,0.6352720450281426,0.832391713747646,0.25971563981042656,1.182538237761951,0.32192181008013654,client
|
||||
3proxy-sh-s,mix-connect-3k,1,1.0893657568,2995.7,20.48,63.488,262.144,0,0,0,8.5,2.7087090000000003,6.242164266274465,283.74002737256734,1380.2734375,0.6369414483821263,0.819672131147541,0.24574209245742093,1.2235031828467144,0.30134451262146134,client
|
||||
3proxy-sh-s,mix-relay-3k,2,1.0900888616,3006.5,20.48,65.536,360.448,0,0,0,8.4,2.568363,6.164635046482894,279.39464493597205,1316.36328125,0.6557344854673999,0.8284023668639053,0.23978065802592224,1.2153499814854443,0.298041717140706,client
|
||||
3proxy-sh-s:8192,mix-relay-3k,2,1.0886549935999998,2996.9,20.48,63.488,278.528,0,0,0,8.1,2.4334900000000004,5.9522989726724385,270.27928859821816,1359.11328125,0.6226304475278484,0.7841239109390126,0.23937469467513434,1.2052583652646176,0.29898476225608783,client
|
||||
3proxy-sh-s,mix-http-3k,2,1.1114570936,3050.5,38.912,409.6,1179.648,0,0,0,9.61,4.198173000000001,6.917046140844388,315.0303228978856,1617.0625,0.6482893450635386,0.9366471734892787,0.28881222276983737,1.1906254997989154,0.36765357394186343,client
|
||||
3proxy-sh-s:8192,mix-http-3k,2,1.0612606496,2927.4,294.912,950.272,2752.512,0,0,0,10.8,5.031034,8.141261058964643,368.92805902848943,1715.33984375,0.6397597146611601,1.0,0.30926365795724464,1.1735860272730978,0.38455440998260065,client
|
||||
3proxy-sh-s,mix-connect-3k,2,1.0869326312,2994.2,20.48,65.536,262.144,0,0,0,8.77,2.802797,6.454861873319753,292.8996059047492,1381.56640625,0.6383059900801221,0.8392344497607656,0.2619392185238784,1.215711388624567,0.3188046535289315,client
|
||||
3proxy-sh-s:8192,mix-connect-3k,2,1.088783196,2996.4,20.48,65.536,278.528,0,0,0,8.51,2.696486,6.252851830384054,284.0074756374316,1410.49609375,0.6457131872356786,0.8238141335914811,0.2615459406903257,1.2310235809022558,0.321034131923261,client
|
||||
|
37
bench/data/skylake-mixsh-plain.csv
Normal file
37
bench/data/skylake-mixsh-plain.csv
Normal file
@ -0,0 +1,37 @@
|
||||
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-sh-s,mix-relay,0,3.424348092,9394.6,2.048,10.752,3276.8,0,0,0,10.38,5.8231589999999995,2.424987114890538,110.48900432163157,1335.19140625,0.34067293419099454,1.0,0.3484897694056512,0.9268539797248242,0.6503351672652592,client
|
||||
3proxy-sh-s:8192,mix-relay,0,3.2531203424,8944.7,2.432,12.288,3276.8,0,0,0,10.46,5.820660999999999,2.5722995521974705,116.94075821436158,1335.36328125,0.317468105986261,1.0,0.32913029421273843,0.8759303314310098,0.6186968195662808,proxy
|
||||
3proxy-sh-s,mix-http,0,2.441231956,6693.6,4.608,77.824,4980.736,0,0,0,10.39,6.586788,3.4048382742045344,155.22289948607624,1848.5,0.26320939334637966,1.0,0.29838187702265373,0.6891376381379293,0.5589583155043164,proxy
|
||||
3proxy-sh-s:8192,mix-http,0,2.5707913504,7083.1,3.968,17.408,4718.592,0,0,0,10.39,6.555555999999999,3.2332456691620277,146.68718498962318,1809.24609375,0.27159590043923865,0.9990384615384615,0.3110531463971307,0.7071402647337953,0.5945864734919634,proxy
|
||||
3proxy-sh-s,mix-connect,0,3.4630978936,9286,3.072,229.376,3014.656,0,0,0,10.28,5.778161999999999,2.374752390106677,110.70428602196856,1455.8046875,0.3391261171797418,1.0,0.3322400787143326,0.9188355687660648,0.6235819599220246,client
|
||||
3proxy-sh-s:8192,mix-connect,0,3.5144356992,9440,3.072,180.224,3014.656,0,0,0,10.27,5.774535,2.3377864053310833,108.79237288135593,1453.64453125,0.34576186925180213,1.0,0.3384716300426369,0.9428432911102613,0.6362629157791103,client
|
||||
3proxy-sh-s,mix-relay-3k,0,1.0848418144,2991.5,1.152,5.12,16.384,0,0,0,4.91,2.3568909999999996,3.620804386280485,164.13170650175496,1370.7890625,0.13160469667318983,0.45128676470588236,0.14855305466237942,0.3525860734401656,0.26930113898260194,none
|
||||
3proxy-sh-s:8192,mix-relay-3k,0,1.0847960192000001,2991.1,1.152,5.376,17.408,0,0,0,4.97,2.345317,3.6652051903104916,166.15960683360638,1381.89453125,0.1357265797885419,0.4568014705882353,0.1494327390599676,0.36560083187830367,0.27068323112889,none
|
||||
3proxy-sh-s,mix-http-3k,0,1.0849601856,2991,1.344,5.632,18.432,0,0,0,6.11,3.5728859999999996,4.50523444535143,204.2795051822133,1607.21484375,0.13635244892936255,0.5791469194312796,0.18975515463917525,0.3616081999624421,0.3556968580783746,none
|
||||
3proxy-sh-s:8192,mix-http-3k,0,1.0849267128,2990.8,1.28,5.376,16.384,0,0,0,6.0,3.523791,4.42426197398354,200.6152200080246,1627.4296875,0.13840490797546012,0.5681818181818182,0.18014230271668824,0.364615486331191,0.33515272293572573,none
|
||||
3proxy-sh-s,mix-connect-3k,0,1.0846065128,2991.1,1.152,5.12,16.384,0,0,0,4.77,2.2772849999999996,3.5183266511545144,159.4731035405035,1411.0,0.13640873015873015,0.44372093023255815,0.15218811234487264,0.3645816654726457,0.28360661009802807,none
|
||||
3proxy-sh-s:8192,mix-connect-3k,0,1.0849767992000001,2991.4,1.152,5.376,17.408,0,0,0,4.83,2.3075289999999997,3.5613664760841828,161.4628601992378,1413.23828125,0.13777777777777778,0.44805194805194803,0.15066710055320534,0.3675894496972307,0.27683736071138676,none
|
||||
3proxy-sh-s:8192,mix-relay,1,3.4678028768,9501.8,2.048,10.752,3276.8,0,0,0,10.42,5.842821999999999,2.40382752311811,109.66343219179524,1328.14453125,0.3177224550160217,1.0,0.34392220421393843,0.8760287729746795,0.652565081151168,proxy
|
||||
3proxy-sh-s,mix-relay,1,3.373843192,9289.4,2.432,11.776,3276.8,0,0,0,10.42,5.833913000000001,2.470772802887278,112.17086141193188,1331.828125,0.3153241650294695,1.0,0.3392857142857143,0.8649879920305032,0.6489559188266143,proxy
|
||||
3proxy-sh-s:8192,mix-http,1,2.437132904,6677.9,5.12,147.456,4980.736,0,0,0,10.34,6.589945,3.3941521967978816,154.8390961230327,1851.69140625,0.26243229935992124,1.0,0.30456026058631924,0.6842371488200872,0.5735584347086636,proxy
|
||||
3proxy-sh-s,mix-http,1,2.5051433264000003,6875.8,4.608,28.672,4718.592,0,0,0,10.43,6.593859,3.3307475512751163,151.69143954158062,1841.83984375,0.26413255360623783,1.0,0.3014586709886548,0.6991872245905552,0.5813245875645829,proxy
|
||||
3proxy-sh-s:8192,mix-connect,1,3.3860714792,9135.7,3.2,204.8,3014.656,0,0,0,10.21,5.715549,2.4122349602406468,111.75936162527228,1461.44921875,0.3349246231155779,1.0,0.3245382585751979,0.9098284584192678,0.6137350792270438,client
|
||||
3proxy-sh-s,mix-connect,1,3.4565185456,9287.8,2.944,196.608,3145.728,0,0,0,10.18,5.706496,2.356127963024229,109.60615000323004,1460.45703125,0.33653117899520324,1.0,0.33542423241994057,0.9169224209791444,0.6317399240006513,client
|
||||
3proxy-sh-s:8192,mix-relay-3k,1,1.0839801352,2990.9,1.152,5.12,16.384,0,0,0,5.1,2.4369469999999995,3.7639066137011987,170.5172356146979,1376.484375,0.140682543579671,0.4709141274238227,0.16094559585492227,0.37260054502230944,0.30115648313558346,none
|
||||
3proxy-sh-s,mix-relay-3k,1,1.0838894968,2990.8,1.152,5.376,16.384,0,0,0,5.03,2.4079880000000005,3.712555580509063,168.1824261067273,1371.86328125,0.1419798575288627,0.4653098982423682,0.15665374677002583,0.3775631063508122,0.28117051119314074,none
|
||||
3proxy-sh-s:8192,mix-http-3k,1,1.084274328,2991,1.344,5.376,16.384,0,0,0,6.22,3.684364,4.589244503444519,207.95720494817786,1624.00390625,0.14575690877965272,0.591254752851711,0.19043000323310702,0.36956328785897635,0.35967542512085715,none
|
||||
3proxy-sh-s,mix-http-3k,1,1.0848380847999999,2991.2,1.344,5.376,16.384,0,0,0,6.23,3.6910169999999995,4.594233987387018,208.2776143353838,1626.5078125,0.14758144126357353,0.5961722488038278,0.19843851659076123,0.38155427611192094,0.3799076676488937,none
|
||||
3proxy-sh-s:8192,mix-connect-3k,1,1.084729816,2991.1,1.152,5.376,16.384,0,0,0,5.57,2.766779,4.1079353902446805,186.21911671291497,1395.4765625,0.14935375777884155,0.5036166365280289,0.1655085281111813,0.40716055022722386,0.3053737801960548,none
|
||||
3proxy-sh-s,mix-connect-3k,1,1.0853471207999998,2991.5,1.216,5.12,16.384,0,0,0,5.4,2.633571,3.9802934169261586,180.51144910579976,1414.2578125,0.1514187866927593,0.4972375690607735,0.16923570969813745,0.41149479283435336,0.3095688559202584,none
|
||||
3proxy-sh-s,mix-relay,2,3.2452045895999997,8909.5,2.048,11.264,3538.944,0,0,0,10.33,5.791067,2.5465266585915343,115.94365564846512,1317.24609375,0.3333333333333333,1.0,0.3516949152542373,0.8968637341982946,0.6572477117405597,proxy
|
||||
3proxy-sh-s:8192,mix-relay,2,3.4134187184,9369.7,2.048,10.752,3276.8,0,0,0,10.4,5.824141000000001,2.4374390270818878,110.99608311898993,1334.60546875,0.3255928853754941,1.0,0.34907796829505017,0.88193582410674,0.6524948544931729,proxy
|
||||
3proxy-sh-s,mix-http,2,2.4088099808,6617.9,4.864,147.456,4980.736,0,0,0,10.39,6.601566,3.45066653918441,156.99844361504404,1824.546875,0.26003917727717923,1.0,0.3005517689061993,0.6811557788370356,0.5738362621141581,proxy
|
||||
3proxy-sh-s:8192,mix-http,2,2.3165443496,6321.6,5.376,110.592,4980.736,0,0,0,10.35,6.55946,3.5742894373810348,163.7243735763098,1808.71875,0.2543751540547202,1.0,0.29788617886178864,0.6692030455559369,0.5661186364684783,proxy
|
||||
3proxy-sh-s,mix-connect,2,3.5107236256,9445.6,3.072,180.224,3014.656,0,0,0,10.24,5.744205,2.3334220729494044,108.41026509697637,1449.8515625,0.33933033483258374,1.0,0.33881038448899115,0.9128906374980623,0.6416589306813539,client
|
||||
3proxy-sh-s:8192,mix-connect,2,3.4202011016,9192.6,2.816,221.184,3145.728,0,0,0,10.37,5.849925000000001,2.4255883655844266,112.80812827709245,1443.828125,0.3276627218934911,1.0,0.32734986945169714,0.9029396932432339,0.6239035250329242,client
|
||||
3proxy-sh-s,mix-relay-3k,2,1.084063992,2991.1,1.152,5.12,16.384,0,0,0,5.02,2.41466,3.704578354817268,167.8312326568821,1375.17578125,0.13669590643274854,0.4597069597069597,0.1495176848874598,0.366585964433976,0.2750354511620409,none
|
||||
3proxy-sh-s:8192,mix-relay-3k,2,1.0851373744000001,2991.3,1.152,5.376,16.384,0,0,0,4.96,2.355716,3.6566798763096773,165.81419449737572,1375.70703125,0.14568880079286423,0.4626865671641791,0.15681149950996406,0.38556451098576927,0.2884624868806828,none
|
||||
3proxy-sh-s,mix-http-3k,2,1.0853770055999998,2991,1.344,5.632,17.408,0,0,0,6.18,3.6290869999999997,4.555099264579445,206.6198595787362,1626.34375,0.14335060449050085,0.588011417697431,0.19759506012349692,0.37156443119161536,0.3766791427436698,none
|
||||
3proxy-sh-s:8192,mix-http-3k,2,1.0848700856,2991.1,1.344,5.632,18.432,0,0,0,6.04,3.572885,4.453989527536476,201.93239945170674,1631.10546875,0.13953488372093023,0.5779904306220096,0.18282729350310153,0.3685714985850929,0.35215996230037383,none
|
||||
3proxy-sh-s,mix-connect-3k,2,1.0847077528,2991.1,1.152,5.12,16.384,0,0,0,4.91,2.3515219999999997,3.6212518900694635,164.1536558456755,1410.8671875,0.1394422310756972,0.4584500466853408,0.15301441677588468,0.3755513677291853,0.2859425736820309,none
|
||||
3proxy-sh-s:8192,mix-connect-3k,2,1.0851481295999998,2991.2,1.216,5.376,17.408,0,0,0,5.6,2.7662760000000004,4.128468618981436,187.21583311045734,1421.89453125,0.1531077513798896,0.5081669691470054,0.16914792524548622,0.423273600640857,0.3120381759286174,none
|
||||
|
Loading…
Reference in New Issue
Block a user