首页 > 编程语言 >分析基于ASP.NET Core Kernel的gRPC服务在不同.NET版本的不同部署方式的不同线程池下的性能表现

分析基于ASP.NET Core Kernel的gRPC服务在不同.NET版本的不同部署方式的不同线程池下的性能表现

时间:2025-01-12 20:04:11浏览次数:3  
标签:__ Core 不同 Server GC Async NET 平均

分析基于ASP.NET Core Kernel的gRPC服务在不同.NET版本的不同部署方式的不同线程池下的性能表现

使用默认的 gRPC 项目模板创建,垃圾回收器类型为 ServerGC(Server garbage collection)。

使用 ghz 工具在不同的请求总数、连接数、并发数的参数下,进行压力测试,接口为 /greet.Greeter/SayHello

ghz工具和gRPC服务都是在同一台电脑上运行。

操作系统:Windows 11 24H2

电脑硬件配置

  • 主板:ASUS TUF-GAMING-B660M-PLUS-D4
  • 处理器:Intel i7-12700K
  • 内存条:Kingston Fury DDR4 3200MHz 64GB(32GBx2套条)
  • 固态硬盘:Samsung SSD 980 PRO 2TB

由于 9 份实验数据篇幅较长,因此放在最后,先写分析和总结。

实验数据列表

PS:.NET 7.0 不是LTS,且生命周期已结束,因此不在本文的实验范围。

而 .NET 6.0 虽然生命周期也刚结束不久,但用户较多,因此纳入实验范围。

由于时间关系,本次实验仅在 Windows 平台进行,如各位看官需要 Linux 平台的实验数据,请留言,我将根据留言人数多少决定是否抽空继续实验。

需要注意的是,WindowsThreadPool 仅限于 Windows 平台。


免责声明

  • 本文所有测试均基于当前特定环境、硬件、系统、网络等条件下所得,结果仅能代表在这些条件下的相对表现。
  • 实验数据会存在不可避免的测试误差(包括但不限于系统负载、网络波动、工具采样、环境差异等)。在不同的环境、不同硬件上,性能数据可能会有较大差异。
  • 本文结论仅供参考,不构成对任一产品或技术的绝对保证。实际生产环境中的选择应结合自身业务场景和更多实测数据来综合评估。

目录

一、性能探查器-异步活动 关于greet.Greeter/SayHello接口执行耗时计数汇总

发布方式线程池名称计数开始时间(毫秒)结束时间(毫秒)总时间(毫秒)
.NET 6.0-RuntimeDefaultThreadPoolPOST /greet.Greeter/SayHello20994006,899.47254,194.780.93(平均)
.NET 8.0-RuntimePortableThreadPoolPOST /greet.Greeter/SayHello209940024,632.85282,396.700.22(平均)
.NET 8.0-RuntimeWindowsThreadPoolPOST /greet.Greeter/SayHello209940027,946.85316,615.520.29(平均)
.NET 8.0-NativeAOTPortableThreadPoolPOST /greet.Greeter/SayHello209940014,734.67270,186.240.20(平均)
.NET 8.0-NativeAOTWindowsThreadPoolPOST /greet.Greeter/SayHello209940018,136.84276,546.400.24(平均)
.NET 9.0-RuntimePortableThreadPoolPOST /greet.Greeter/SayHello209940017,256.75276,514.640.21(平均)
.NET 9.0-RuntimeWindowsThreadPoolPOST /greet.Greeter/SayHello20994009,874.09267,376.960.23(平均)
.NET 9.0-NativeAOTPortableThreadPoolPOST /greet.Greeter/SayHello209940018,121.15282,418.470.18(平均)
.NET 9.0-NativeAOTWindowsThreadPoolPOST /greet.Greeter/SayHello20994008,990.53253,278.750.19(平均)

二、测试结果综合分析

  1. gRPC接口在不同调用次数、不同并发数、不同连接数的耗时表现

    • 纵观所有版本与线程池,在调用次数(TotalCalls)较小(如100~1000)时,无论是RPS还是Latency,都表现相对优异。
    • 并发数(Concurrency)与连接数(Connections)上升后,RPS上升但平均Latency有所增长,某些配置出现极端慢请求(Slowest)。
    • 连接数和并发数越大,.NET版本、线程池、NativeAOT vs Runtime 的差异越明显,某些高负载下配置延迟变大或RPS受限。
  2. gRPC接口在不同线程池下的表现

    • WindowsThreadPool在极高并发场景下有不错的尾延迟控制,但有时平均延迟略高。
    • PortableThreadPool在中高并发场景下稳定,平均延迟较低,但在极端并发下尾部延迟可能拉高。
    • DefaultThreadPool on the .NET 6.0在低并发时也表现良好,但在高负载场景略逊于 .NET 8.0/.NET 9.0。
  3. .NET不同版本的不同线程池以及不同部署方式的执行性能表现

    • NativeAOT在 .NET 8/.NET 9 下普遍能获得更好的高并发表现(更低延迟/更高 RPS)。
    • .NET 6.0 稳定但不及 .NET 8.0/.NET 9.0 在高并发下的改进。
    • .NET 9.0 在某些压力测试场景下,RPS 高于 .NET 8.0 或 .NET 6.0 ,尾延迟控制更佳。
  4. .NET不同版本的不同线程池以及不同部署方式的内存性能表现

    • NativeAOT的内存使用往往优于对应 Runtime 版本,因减少 JIT 和 Reflection 等其他动态功能。
    • PortableThreadPool vs WindowsThreadPool 在高并发、大连接数时的GC触发与Allocation Rate各有差异,但总体差距不算极端。

三、建议

  1. 低连接数、低并发数时,使用哪种线程池和哪种部署方式?

    • 建议在 .NET 8.0+.NET 9.0+ 上使用 PortableThreadPool 即可;Runtime 与 NativeAOT 二选一,视项目对软件体积、启动速度的要求而定。
  2. 高连接数、高并发数时,使用哪种线程池和哪种部署方式?

    • 建议在 .NET 9.0.NET 8.0 中,结合 NativeAOT + WindowsThreadPool 获取更高吞吐与更好的延迟表现;若对 NativeAOT 有限制,则可使用 Runtime + WindowsThreadPool。
  3. 哪种线程池和哪种部署方式更适合 gRPC服务?

    • Windows 环境 & 追求极高并发:建议 WindowsThreadPool + NativeAOT
    • 跨平台或容器:建议 PortableThreadPool + NativeAOT,在没有动态特性需求的前提下,可获得更好性能和包体积。

.NET 6.0-Runtime-DefaultThreadPool

ghz 运行结果

TotalCallsConnectionsConcurrencyRPSTotalRequestsLatencyAvgFastestSlowestLatencyP0LatencyP25LatencyP50LatencyP75LatencyP90LatencyP95LatencyP99ErrorCount
100210980.9364804391456100948462008548580005186006767002127400590910084942500849425000
100021013747.934372860476100050713209650500System.Object[]05228005644001008700112050040951000
1000021019145.44681069403310000361839017023700System.Object[]006558001001699100749915063000
10000021022305.88167064362100000303645019320800System.Object[]005424001001100100570015068000
10021006807.30560037031810066415875171001265560004593000715380083243001039260010392600126556000
1000210016823.63114525186810003127358013814700010783002330600438860070713008579500124773000
10000210033413.548124530961000016185900141708000669200121830019054003297800476160072248000
100000210036310.65713429612510000014250900207427000651400109120018120002785200364010056408000
1000250021888.97474231204610001123657050770041694400043753009066300133782002672980031138000380379000
10000250033845.57482647374100009283925056246700045504008177400112350001762120023507300384351000
100000250036823.3077397842641000009126701079235400046829008171200119770001714330021033000284422000
100002250034509.56898583624100005113387450679911130440003910910052786600669010007684350085133500915909000
1000002250030219.67619435639410000073303285634000024584460005658210070121700890984001076647001161836001329643000
100002500030094.774463741214100009580268101864690000528939001136389001369864001511952001567017001611058000
1000002500032434.072719915510000013800645533500034748900001169107001389766001618130001813254001991663002277156000
100201006554.54033008665110027740180847650001394700273650038942004698500583510080380990
10002010020026.1942620948181000230950501798790005990001010300330190054170007210800125372000
100002010029243.400130133131000015979180223262000528100100160017826004119500628730094398000
1000002010025466.322100537625100000167216107225450005819001008700200170030553004888800117538000
10002050015682.043432987493100058286960475191000678900260760093497001612639920744500291519000
100002050030973.82959190121100008615289060666400017040006745100136294001875040022812700336141000
1000002050033892.299828772711000007547793081464900018965005234500114633001741100021467700321692000
1000020250026202.42948926224610000399133780270933100081212002957060058917200924471001194335001734339000
10000020250034908.686729968921000004512297803430580000176724003526110063365099986305001175788001701359000
1000020500031025.40515300954210000371370790191286800011777700304493005706760081014800951781001301408000
10000020500026858.8261688444110000011937792501113362800039969000859550001739325002708620003299612004858869000
1001001009189.149452326692100129960305900200System.Object[]067130020657003570500371160059002000
100010010021263.43051429859410001457248080338000543500111030020098992791500425880070225000
1000010010021224.53692305341210000234032802137660007865002001000300000050486007224300113367000
10000010010026569.634361976725100000185108002983650005379001446800218320038505005904700103587000
100010050020131.58000692526210006112320023110700010112993857200111753001492730016480100195473000
1000010050028343.60269298238100009345864078897000030224007774600132455001922820024533300363658000
10000010050030537.4216711316951000008678613090635400027004006611100126440001875000023766200357031000
10000100250029728.22162508134710000374247850204281400019287000350668005272010072609700851081001087689000
100000100250032815.987108830151000004731400403284204000232801004095330064607600919046001114604001581141000
10000100500023992.81175359862410000741314920345145500024932400629546001121798001623278001882772002392396000
100000100500032128.74734447871100000966822170592672400042400000798876001307776001981409002461057003481037000
100020050021736.4842540908071000605857203048340001747100407370086594001468890017522800246598000
1000020050027323.904946692426100008939643070837400034999006549100125789001881670024605600367261000
10000020050027838.067298750410000097296220107043100036746007358900130528002117940027097300409337000
10000200250026858.99136966889310000421433930191887100021302700378524005895210081158400924924001209234000
100000200250031494.933142398451000004928608403342832000232183004256250068128800977829001200870001611461000
10000200500022776.3453987227041000053432015026019589902006970046124000769034001121715001316475001739937000
100000200500031555.342311564513100000921303300616224800038913400765876001272697991874043002349990003305190000
10005005001912.90688007565931000843976850500861499019475005997100115215004752902004817723004917335000
1000050050018769.043540802584100001612312005028741000399680075132001116510016518200204186004787630000
10000050050021236.9684652255241000001607833405605634000821180014007800202278002750420033858400549757000
10000500250018553.519389262671000070172934049893460001371440025357000413670003418145004419760004802563000
100000500250028746.38151329404100000584125670110537860002182980043888100774996001133999001395246004622951000
10000500500018331.63765685007510000111798599051932710001586200033245700945641004204090004658124005007004000
100000500500023859.59999714639100000136435355011790349000596520001183666001878166002629231003242767005365641000

性能探查器结果

GC 信息
名称最小值最大值平均
Allocation Rate0 B282.50 MiB35.97 MiB
GC Committed Bytes0 B443 MiB372.21 MiB
GC Fragmentation0%87.50%27.77%
GC Heap Size3 MiB365 MiB88.55 MiB
Gen 0 GC Count020.43
Gen 0 Size0 B150.27 MiB7.40 MiB
Gen 1 GC Count020.36
Gen 1 Size0 B51.08 MiB2.51 MiB
Gen 2 GC Count020.34
Gen 2 Size0 B32.12 MiB2.38 MiB
IL Bytes Jitted39.45 KiB308.82 KiB288.12 KiB
LOH Size0 B66.34 MiB52.65 MiB
POH Size0 B6.62 MiB5.27 MiB
异步活动
名称计数开始时间(毫秒)结束时间(毫秒)总时间(毫秒)
Async: <<StartAcceptingConnectionsCore>g__AcceptConnectionsAsync|0>d1994.21[不完整][不完整]
Async: <<StartAcceptingConnectionsCore>g__AcceptConnectionsAsync|0>d1994.21[不完整][不完整]
Async: <RunAsync>d__41996.64[不完整][不完整]
Async: <DoReceive>d__2861096,867.94254,236.971,691.47(平均)
Async: <DoSend>d__2959306,869.51254,236.951,677.15(平均)
Async: <ReadInputAsync>d__11659606,875.79254,218.391,683.05(平均)
Async: <ExecuteAsync>d__660236,882.95255,323.601,670.12(平均)
Async: <ProcessDataWrites>d__48838406,884.81254,218.41979.92(平均)
POST /greet.Greeter/SayHello20994006,899.47254,194.780.93(平均)
GET /gc516,983.90255,321.5614.64(平均)
Async: <DisposeAsync>d__27194,325.6094,325.630.03

.NET 8.0-Runtime-PortableThreadPool

ghz 运行结果

TotalCallsConnectionsConcurrencyRPSTotalRequestsLatencyAvgFastestSlowestLatencyP0LatencyP25LatencyP50LatencyP75LatencyP90LatencyP95LatencyP99ErrorCount
100210991.4300784022905100953372108551450005307005512002182400387610085514500855145000
100021010057.51895088008310007188500619480005302005488007284001177900159650027115000
1000021014692.8208673319110000499594046606000525000535800560600755400107180015796000
10000021019001.6184818558110000036099001049520000326100540200778200100280015497000
10021004043.39370120129251006494620023670500021994003382100116566001489020021499400236705000
1000210018989.06040230223510002825141013027500012137002059699345500061336008785300113763000
10000210029024.8127319082561000019311100158973990945300156480022781003907899562860081212000
100000210030805.418130873863100000188557201883800001015099167330023946003395500427840066859000
1000250021999.3928167582610009901041036002800049746007492300113558002342010026478200324481000
10000250029033.2311460374441000011937464076230400065157009871800154377002231800027486200414747000
100000250031910.40070049711710000010744462075901300054957009475400141434001999710024896500337661000
100002250028991.7173562684871000065067364311740015373600004769370058304400817540001104499001166312001241389000
1000002250032953.322212246151000006782345425076001700356000551478006739890079795500940141001019301001151668000
100002500027123.6826366389431000097330084584400229340600071456000952514001343762001525313001591980001758267000
1000002500030075.38967855333610000015262401359540038442980001243040001500058001779495002129319002330313002669431000
100201006117.330397014743100525544801258530002310200482300080336001023620010742100119112000
10002010017672.715448074031000277094901685070009685001785200381690063821007945300132595000
100002010024734.75683507902810000221707702127570006438001591200267460054295007289100107332000
1000002010025173.704223223693100000194550909938720007180001516800243110035085004658500118183000
10002050017996.94052011158100042352460278281000160120029246006185600920620011567300178907000
100002050027546.6005842083071000010200569055560500026160009478400150120002129770026949900352292000
1000002050029972.49094808293710000010204018086917100030099008606000153083002135100025919800384050000
1000020250027546.13012681687510000442448530181589900022981000415103006161910081247600958746001234152000
10000020250029738.285836433610000054999947029884340002382820046237600771611001114728001377762001939692000
1000020500026844.816024422341000052862345022978610002673310048498400748783001028159001191781001493594000
10000020500028656.86204609536410000011693075606457343000630045991025899001562653002199550002576655003436723000
1001001008063.0855815903621002854507903900765780001863600239060035238005298300582870062580000
100010010017797.4894861330871000315750601069420001725400247010042515006916800828920093014000
1000010010021361.186041404813100002745052017843400011920002304000337840056960007373200100761000
10000010010021170.131603276311000002830932035577000013419002244200349040052478007540100124620000
100010050017602.1629537837610008843901034973100033567008056700137177001731040019959100262170000
1000010050024257.56096046357210000136918350737578000553500012580400194271002744010032733400428031000
10000010050025213.7374829867151000001244118101116114000463850010524300180134002494780030638300462903000
10000100250025796.758688864261000044182423026900180001288650032392800656290001031466001275918001680487000
100000100250028064.5877299433410000056659485034488650002951790049846800769452001081176001298533001815034000
10000100500020317.1548506496110000788335610314297600042314900746704001111610001414122001605823002056310000
100000100500021309.11980890663510000014875796809920619000776978001305089991967069002795957003411487004747287000
100020050018277.65958224581100010442973031000200036029008871500171910002096070022970600251723000
1000020050021940.2269233790210000151780100808024000766010013878600203007002762800034646500511821000
10000020050023584.91011036041000001305485701016890000566210010946300176617002661260032564400487634000
10000200250019943.4364256096851000056954146027717510002430230046296400820673001177319001424739001931065000
100000200250026882.77261604647710000058798054040143550002894120050386700803713001150293001380167001909913000
10000200500024087.87642726691000050584299024531780002234470042363500708877001010407001220603001657451000
100000200500027428.992988683110000011163260107256951000586157001008031001511803002100458002494847003338966000
10005005001909.10994812375541000740032360497487300027744007237000113968004758111004826920004876715000
1000050050018867.511578991856100001829791405048979000560750093605001309050018300400215371004753307000
10000050050018442.1985535045971000001767946605299393000883710016143000222777002912720035151900517918000
10000500250018644.899864768544100006087301304991263000889710020881700369421002892442003734233004595345000
100000500250024478.50503307437610000071202543077396810003098410054320100929690001360121001676379005014910000
10000500500018164.403472815968100001060518490517379100023813600473571001084643003275453004487827004924028000
100000500500025495.5012423192910000013289119109732019000544428001043970001780273002701379003487641006028798000

性能探查器结果

GC 信息
名称最小值最大值平均
Allocation Rate0 B279.21 MiB42.53 MiB
GC Committed Bytes0 B491.18 MiB357.33 MiB
GC Fragmentation0%54.78%6.83%
GC Heap Size3.83 MiB481.12 MiB81.64 MiB
Gen 0 GC Count020.41
Gen 0 Size0 B24.60 MiB1.58 MiB
Gen 1 GC Count020.34
Gen 1 Size0 B52.09 MiB2.25 MiB
Gen 2 GC Count020.30
Gen 2 Size0 B29.29 MiB2.60 MiB
IL Bytes Jitted53.88 KiB637.67 KiB565.54 KiB
LOH Size0 B8.85 MiB7.06 MiB
POH Size0 B36 MiB27.34 MiB
异步活动
名称计数开始时间(毫秒)结束时间(毫秒)总时间(毫秒)
Microsoft.AspNetCore.Server.Kestrel.Core.Internal.ConnectionDispatcher<T>.MoveNext()1859.95[不完整][不完整]
[任务范围]Microsoft.WebTools.ApiEndpointDiscovery.ApplicationEndpointWriter.WriteEndpointsAsync()1929.01929.100.09
Microsoft.WebTools.ApiEndpointDiscovery.HostingStartup.Configure.AnonymousMethod__1()1930.74933.032.29
Microsoft.Extensions.Hosting.HostingAbstractionsHostExtensions.RunAsync()1932.79[不完整][不完整]
Microsoft.AspNetCore.Server.Kestrel.Transport.Sockets.Internal.SocketConnection.DoReceive()590724,593.98283,473.001,897.84(平均)
Microsoft.AspNetCore.Server.Kestrel.Transport.Sockets.Internal.SocketConnection.DoSend()587924,595.26283,473.001,898.01(平均)
Microsoft.AspNetCore.Server.Kestrel.Core.Internal.Http2.Http2Connection.CopyPipeAsync()578524,605.09282,420.751,909.00(平均)
[任务范围]Microsoft.AspNetCore.Server.Kestrel.Core.Internal.Http2.Http2FrameWriter…ctor(BaseConnectionContext, Http2Connection, int, ITimeoutControl, MinDataRate, string, MemoryPool, ServiceContext)124,607.2824,608.591.31
Microsoft.AspNetCore.Server.Kestrel.Core.Internal.Infrastructure.KestrelConnection<T>.MoveNext()583924,612.21283,473.041,892.35(平均)
POST /greet.Greeter/SayHello209940024,632.85282,396.700.22(平均)
GET /gc5124,738.00283,468.8913.45(平均)
Microsoft.AspNetCore.Server.Kestrel.Core.Internal.Http2.Http2FrameWriter.ctor(PipeWriter, BaseConnectionContext, Http2Connection, int, ITimeoutControl, MinDataRate, string, MemoryPool<byte>, ServiceContext)1227,786.8196,199.194.23(平均)
Microsoft.AspNetCore.Server.Kestrel.Core.Internal.Http2.Http2FrameWriter.WriteToOutputPipe()175399,274.60279,002.742.20(平均)
Microsoft.AspNetCore.Server.Kestrel.Transport.Sockets.SocketConnectionListener.AcceptAsync()1150,162.85150,162.880.03
Task.Unwrap4234,123.98258,446.051,596.08(平均)

.NET 8.0-Runtime-WindowsThreadPool

ghz 运行结果

TotalCallsConnectionsConcurrencyRPSTotalRequestsLatencyAvgFastestSlowestLatencyP0LatencyP25LatencyP50LatencyP75LatencyP90LatencyP95LatencyP99ErrorCount
100210952.7520719975686100999803109109350005688008638001526000377670091093500910935000
100021012164.91735155151410006078190567050005182995476006499001047100116310024599000
1000021017477.27124567678100004123180597130000522499546600999399100890015056000
10000021020788.67233559902100000340800032001000005592001001200100600015053000
10021005400.99702405064100816689501749020005922900762980087052001268740013722200174902000
1000210020069.843053827317100023861170110802000999399184030029994006007600753780097066000
10000210027937.78367327097310000201742701810950001039900158050024360003632600532560090632000
100000210026821.100417180758100000221356601917230001276300195450027404003901500495330073157000
1000250021828.00839068642710008660457036709500030356007906200113680001601920023737400330360000
10000250025743.4582011192210000130587770608190000828090012370400169576002173190025484200311247000
100000250031357.2643822209710000013371829345300491894000952980012525500162199992104710024072200303840000
100002250017992.1644123983971000010370816849625002299283000734645001103772001341962991562586001623664001743427000
1000002250032739.6135376730451000006857888310844001891775000552117006601990078925800937202001052943001298930000
100002500030186.191447467121000075009900921500196858100046068500705633001086433001253519991299133001708254000
1000002500024746.94332561451310000018412630250530035464880001561581001802312002167255002455599002641510002908953000
100201007075.4383234041341002513595095058000530600157660036509006500300736900082135000
10002010021075.57067376492100020194880127109000596000144970027213004928400604110087224000
100002010024619.7540535809571000035477030238970000106060017695005514200891520011009500145992000
1000002010030407.607594202695100000176304803705610006154001096800218740036316005215300103109000
10002050022149.326328239727100054116760264160000797400210900088186001734110019681800223964000
100002050029811.919580558213100007812720058081400015744005404000115337001926300024900900312956000
1000002050033045.3748355042551000007692987088185200016880004449900108261001921610026051800386744000
1000020250028980.971094379427100003328627102676432990303930011236500313764001140746001377364002406443000
10000020250030910.61879287727810000052241314040099750001491760039463500740317001173672001471439002236557000
1000020500030330.4655878120071000030724091017430300005414200210067004462360078751000961175001336574000
10000020500031761.94498462691000001058667010972796500026414000743507001640383002494284003010548004010963000
1001001008934.474563550917100111679803367000052670076860016116002123000277930033670000
100010010019430.8320670907781000206304901452280009487001128800252760046677006138900112392000
1000010010022426.960435926285100002616359020169100010024992001100336070057724007466000114444000
10000010010024179.2054384255751000002526030031167300010019001999299307840053324007466400113757000
100010050018986.4285009075510007479076035393700010581003985500133104001974400021770400270083000
1000010050027747.77164582855100009995317067277300034955007879600139036002153820027545300386714000
10000010050029093.25432458860810000089830710117197500020111005565500128977002141270028735800439953000
10000100250029019.85160989078100003967690702131557000128614003105810057473500884141001085605001454044000
100000100250031072.8073162789210000048580083038248820001388440037221800707355001089789001345720001957603000
10000100500028598.9243944535231000055536868028236990001770950047084000821992001203839001480608001839523000
100000100500030445.331783787731000001009501690771903900034537700724892001446640002356031002845513003891561000
100020050019503.36628102010610007694771029133300019987994579200130503001806340021064200247512000
1000020050020998.17336889864100001334015701055212000463320010669100190681002846670035319300498257000
10000020050025038.255324353697100000108993660142225600035276007570100146658002467310032552400507134000
10000200250025113.5509204869851000045175772027456580001240400034703100696071001010146001179959001687637000
100000200250027442.0487048066510000054435873044153140001469900039228100765191001252475001629719002375992000
10000200500024330.823284500561000059113539030038730002004440048434500853691001239493001575613002155822000
100000200500021423.934982984898100000145077183013757530000568828001036896001949579003204663004170486006228615000
10005005001898.6248260385005100059095261050122990001001600226070081248994584871004769465004855984000
1000050050019125.91873741395100001716182004902759000500290092255001376550019911700267421004731678000
10000050050017944.4731605860761000001854090506736205000710930014496800233625003476620045568900777416000
1000050025009696.7891603860551000080905019098912380001025060024178800532340003917154004661487008774407000
100000500250020414.703469695251000007700498001025375200023082400549664001030957001701797002166846004272151000
1000050050009685.320076583763100009162754509936391000996210029457400825583002908179004805290006928978000
100000500500025563.6320726645210000013159575501195043600043415100902127001700523002941824004074573006648718000

性能探查器结果

GC 信息
名称最小值最大值平均
Allocation Rate0 B344.58 MiB26.97 MiB
GC Committed Bytes0 B489.48 MiB395.10 MiB
GC Fragmentation0%52.77%4.95%
GC Heap Size3.81 MiB477.76 MiB84.49 MiB
Gen 0 GC Count020.26
Gen 0 Size0 B23.29 MiB1.57 MiB
Gen 1 GC Count020.22
Gen 1 Size0 B52.04 MiB2.14 MiB
Gen 2 GC Count020.19
Gen 2 Size0 B28.38 MiB2.47 MiB
IL Bytes Jitted53.94 KiB629.38 KiB580.85 KiB
LOH Size0 B7.72 MiB6.29 MiB
POH Size0 B33.96 MiB28.40 MiB
异步活动
名称计数开始时间(毫秒)结束时间(毫秒)总时间(毫秒)
Microsoft.AspNetCore.Server.Kestrel.Core.Internal.ConnectionDispatcher<T>.MoveNext()11,272.50[不完整][不完整]
[任务范围]Microsoft.WebTools.ApiEndpointDiscovery.ApplicationEndpointWriter.WriteEndpointsAsync()11,338.161,338.240.08
Microsoft.WebTools.ApiEndpointDiscovery.HostingStartup.Configure.AnonymousMethod__1()11,339.921,344.004.08
Microsoft.Extensions.Hosting.HostingAbstractionsHostExtensions.RunAsync()11,343.36[不完整][不完整]
Microsoft.AspNetCore.Server.Kestrel.Transport.Sockets.Internal.SocketConnection.DoReceive()596827,903.48317,693.032,182.60(平均)
Microsoft.AspNetCore.Server.Kestrel.Transport.Sockets.Internal.SocketConnection.DoSend()593827,905.28317,693.032,185.01(平均)
Microsoft.AspNetCore.Server.Kestrel.Core.Internal.Http2.Http2Connection.CopyPipeAsync()587027,915.82316,637.922,211.47(平均)
[任务范围]Microsoft.AspNetCore.Server.Kestrel.Core.Internal.Http2.Http2FrameWriter…ctor(PipeWriter, BaseConnectionContext, Http2Connection, int, ITimeoutControl, MinDataRate, string, MemoryPool, ServiceContext)127,918.0927,919.641.55
Microsoft.AspNetCore.Server.Kestrel.Core.Internal.Infrastructure.KestrelConnection<T>.MoveNext()594827,923.56317,693.112,188.61(平均)
POST /greet.Greeter/SayHello209940027,946.85316,615.520.29(平均)
GET /gc5128,020.89317,690.6913.44(平均)
Microsoft.AspNetCore.Server.Kestrel.Core.Internal.Http2.Http2FrameWriter.ctor(PipeWriter, BaseConnectionContext, Http2Connection, int, ITimeoutControl, MinDataRate, string, MemoryPool<byte>, ServiceContext)1231,077.91102,951.900.01(平均)
Microsoft.AspNetCore.Server.Kestrel.Core.Internal.Http2.Http2FrameWriter.WriteToOutputPipe()1537106,029.50316,635.47127.03(平均)
Task.Unwrap32165,211.45316,635.721,728.56(平均)

.NET 8.0-NativeAOT-PortableThreadPool

ghz 运行结果

TotalCallsConnectionsConcurrencyRPSTotalRequestsLatencyAvgFastestSlowestLatencyP0LatencyP25LatencyP50LatencyP75LatencyP90LatencyP95LatencyP99ErrorCount
1002107093.10408420933210086546905805600005285007314001846500529540058056000
100021016717.93500066871610003781520293010000519799544400653700104560019054000
1000021019177.70231565002100003513780409620000517699533800998500100700015070000
10000021021258.51605523915100000322549072540900000532700999399100300015045000
10021008881.54681019246310044688541050000950080001670100477550071301007855600836890095008000
1000210020151.3365373958410002999886015830700014531002186300389740054014008918900140823000
10000210028884.6454135371410000205784501481320001079100170220024293004075299531010084556000
100000210028813.750567198676100000211534001905220001228500190170026180003633700457300069221000
1000250021561.99396695408710009758000038159600059440007993200138001001785190019508900234961000
10000250034675.2180377710251000010505183037052700064882009938100138627001776560020331100260259000
100000250036973.977234160891000009544097061475900052083008621400124432001723100020581400289019000
100002250035098.088628289481000048294325013107250003461470048879400641162008456120092665300975510000
1000002250037163.6301255521210000058636701508000186424600044626100558862006982890082458100954305001284279990
100002500033459.598705648881000076786968605400202338800037221600849268001036141001387458001465827001587634000
1000002500035161.3187238522910000013021617166120027104690001096523001303193001476221001691550001847054002205953000
100201007857.6199269241351003253656504899884580001975499248690044728006035500702940078706000
10002010018702.1808613102371000262115402158870008620001514500299970065613009176800145633000
100002010028289.01529049565610000197348802791430006841001343300219010044226005806100125967000
1000002010032079.51819643303100000159875202992940006593001072900196409926800003943300105134000
10002050019585.87623293091100052833670390889000997099220070082881001457890018950000256242000
100002050032691.704153154096100007990468056949000018527005219500114525001781490025786200416153000
1000002050034905.958461071691000008427892073967100023966006054600116954001872660025759400387264000
1000020250031580.0510080983910000394036850210860500099717002961320058304400899900001135932001483824000
10000020250035922.12987480814610000045480093051004280001332560028120500633662001114245001375990002126572000
1000020500031682.5961479665971000054405506027808210001045970040132100886945001272597001512210001993915000
10000020500028436.208711762410000011075326601313863400028018200640595991586355002760635003626599005610013000
1001001009429.8700563906221002532320933600706070001643300199959932720004392500491600060358000
100010010021507.3189406355100025399280805820001533200228090032826004941800546200064245000
1000010010020447.14219494755100002881066045127500010774002076999326510052947006853700169011000
10000010010026088.0190980996161000002236209040726800010047991877100262610040574005816700102309000
100010050024305.5893133184910006479589027675400017593004978700107734001296360014945500207854000
1000010050029852.6176267766021000010397239051497200043496009405100140412001982170026365600369817000
10000010050031896.118679333551000009743960074952600037292008042499135795001957170025484400372810000
10000100250030046.81293455203210000351958570280641400047710001447130052186300958506001227721002018082000
100000100250033641.5595446520751000004574300403143843000206437003785930062358100930046001154916001596266000
10000100500025642.9587256064951000046305337028735260001063680029596600646297001215496001510568001941205000
100000100500033074.75708740779100000940795150685852900033731900705895001331372992096327002506958003715854000
100020050019041.3082140395381000491327901839030001543600371510082270991043770011730600149906000
1000020050022196.3018741447510000142407140852610000524410012615300199317002757740034723200562270000
10000020050028936.482973050006100000104047080122804600040876998448000139819002112670027138200430332000
10000200250029041.4182899367410000433048350198025000020359500394879006002380083785800989134001291276000
100000200250032506.2455062147241000004796433403376785000218203003821900063842700987842001239654001849977000
10000200500029191.761851271476100004776679802460014000211508004056090065211400948147001202715001571027000
100000200500032564.983179697716100000925485390806489000040664000754807001241536001897896002413824003441366000
10005005001887.133917250311000842588140499672000032607006507100240209004782533004892078004959892000
1000050050018952.843997435302100001687116205053189000500010087310001221350015681700193614004759373000
10000050050018518.9005565781481000001871892005493661000903050016164800230984003163830040109500698239000
1000050025009806.359698842771000075893938098813160001089840020741800413735004055479004551670004987676000
100000500250029642.62407772533100000591543480121773930002144090040377700736893001189240001570695004840591000
1000050050009839.6210643852651000093418358096984780001109790031423100800100003703428004267367004909878000
100000500500030776.93257823565410000011016177401048581599034160900758943001451098002411092003135419006235804000

性能探查器结果

GC 信息
名称最小值最大值平均
Allocation Rate0 B1.22 GiB32.86 MiB
GC Committed Bytes6.91 MiB182.16 MiB111.55 MiB
GC Fragmentation3.49%58.66%12.11%
GC Heap Size5.19 MiB156.47 MiB49.67 MiB
Gen 0 GC Count0191.37
Gen 0 Size856.84 KiB26.55 MiB2.54 MiB
Gen 1 GC Count050.47
Gen 1 Size0 B56.41 MiB3.15 MiB
Gen 2 GC Count020.32
Gen 2 Size1.59 MiB24.78 MiB5.26 MiB
IL Bytes Jitted0 B0 B0 B
LOH Size850.49 KiB12.34 MiB10 MiB
POH Size128.68 KiB31.48 MiB24.93 MiB
异步活动
名称计数开始时间(毫秒)结束时间(毫秒)总时间(毫秒)
Async: <<StartAcceptingConnectionsCore>g__AcceptConnectionsAsync|0>d11,037.04[不完整][不完整]
Async: <<StartAcceptingConnectionsCore>g__AcceptConnectionsAsync|0>d11,037.04[不完整][不完整]
Async: <RunAsync>d__411,037.57[不完整][不完整]
Async: <DoReceive>d__27590214,732.66271,126.631,847.45(平均)
Async: <DoSend>d__28559314,732.67271,126.631,863.24(平均)
Async: <CopyPipeAsync>d__139573714,733.21270,204.841,873.97(平均)
Async: <ExecuteAsync>d__8593814,733.58271,126.671,852.59(平均)
POST /greet.Greeter/SayHello209940014,734.67270,186.240.20(平均)
GET /gc5114,780.76271,124.769.57(平均)
Task: WriteToOutputPipe196317,827.12267,472.376.85(平均)
Async: <WriteToOutputPipe>d__34107624,648.45270,204.861,732.49(平均)
Task.Unwrap4255,281.52270,199.972,499.72(平均)

.NET 8.0-NativeAOT-WindowsThreadPool

ghz 运行结果

TotalCallsConnectionsConcurrencyRPSTotalRequestsLatencyAvgFastestSlowestLatencyP0LatencyP25LatencyP50LatencyP75LatencyP90LatencyP95LatencyP99ErrorCount
1002106712.085109239185100974887060952000052140010047001875200558920060952000
100021013775.37596444850910004520300834120000523900622800733300109400052865000
1000021017252.313707791351000040799005308100005211005866001001800104240015134000
10000021020439.7180185557481000003470320212523000005348001000100100340015055000
10021006438.611062821528100499311801371120002657100403800067345001062490012142800126666000
1000210023244.245886930691000216450501191230007465001557600281470047735005563100100761000
10000210033188.036111238331000017373100106852000804200131780020771003225900513980074689000
100000210034563.66142543305100000172492803465690001008599149260021379003017900382350058400000
1000250020309.3520504321821000121800690455246000543650010515700164239002415910031046400396013000
10000250027902.35403790311510000128040240530639000693620011739700166410002307970029274100378238000
100000250036297.5708249998641000009492466065274600049180008330199122341001768980022383100308109000
100002250035160.84151145207100004619169691810016486400002548240035715600506369001241794001379016001448674000
1000002250036241.5340229541541000006025075713368002140236000434457005700750073977500888449001026025001346192000
100002500025310.169803398192100001223136946146002570838990839672001233927001540307002192360002254578002351024000
1000002500033613.889420455210000013541193250300027887630001160957001317344001569805001841614001967369002204243000
100201005860.2219852087991003769154011253300010062992509300558970088386009843700106882000
10002010018604.6165495506071000270648702339270006181001479700385880073544009891600123595000
100002010026186.97711153452510000212683601504460006520001352900276420051089006981300103597000
1000002010030322.3631066595210000017349900422975000655000112570021681003543500502160097259000
10002050018080.207416139478100059378910264749000983800298100088454001768780020451200229126000
100002050030205.63087329614100008386551060861700020566005703400120033001940470025703900372016000
1000002050033374.6143938771210000077023460131534099016862004308600106560001885730026052900426884000
1000020250030059.87325555040710000327904300184485600010190600253385004723340074062100886501001327249000
10000020250033940.0997289102451000004528011205962338000787479927572600641491001169825001535698002175494000
1000020500029996.94331147656310000307250530222481300025899009307800422717001007724001195340001698401000
10000020500032622.6957529752071000009906428601063599000020215900573590001654264002504024002970596004299218000
1001001008792.7547700694631001439848041281000518000102650023481003304000335050036661000
100010010015342.08241152988410002872899015473600010116992009400395360063776007633500110952000
1000010010020019.855692876194100003229967045552400010544002065600371770063407008313100171863000
10000010010022530.054867893221000002793189032594300010065002004900338920057826008309700134984000
100010050018431.0053744811671000465639702760280001054300260270077625001106190013886200178946000
1000010050027122.85132771782100009558462074754000020692006712700134899002193830029959200457162000
10000010050028572.13797679719610000090960310110270900020010005362400129385002216170030233700452086000
10000100250023452.223599128327100005162813702635220990620620037122800852356001300157991478051001925321000
100000100250031783.9464626120310000048883102049939680001133860034168300687748001170816001506797002225508000
10000100500028070.325146997275100004311140402712861000852480027986100618100001077483001389460001991330000
100000100500030887.149352092623100000990274210805991600026188200667372001395884002434535003102508004368013000
100020050017782.7727610599981000592082403656180001540500466910080664001264900015698799289857000
1000020050024604.8764404617361000011269962060272500039969008549200163630992376390031132400427803000
10000020050025970.485218781472100000112498520105408700038750007852899153530002555460033640800494019000
10000200250027607.31030533961100004662969302752497000257081004345540062876299870599001025055001338795990
100000200250030151.58983152105810000051299051048473250001830340040765100709054001081684001372016002094577000
10000200500021894.29914049551000057565874029151370002403850045577400802649001207775001572969002117785000
100000200500029886.978207730521000001024717720855548400035244100742741001461765002325020002871524004147825000
10005005001877.26268818385171000884133140506230500020530008787600190948004774991004841723004992343000
1000050050018836.971474608985100001766586804921588000348420078971001292390022209900301496004693927000
10000050050020271.799010464571000001702749706438300000766880013926000212822003049500039097100631563000
10000500250018281.9968767036551000077503428051856970001006600025620100603915003977304004630172005023465000
100000500250025639.9303557955710000067273447085535070002833240050932700849693001299949001637162005014834000
1000050050009565.8198715941741000019951558901021371500044564100891350003594596004918235005512200009633599000
100000500500029238.665784711551000001512211770137225280001091233001387324001612497001870956002062390009928420000

性能探查器结果

GC 信息
名称最小值最大值平均
Allocation Rate0 B916.24 MiB36.33 MiB
GC Committed Bytes6.91 MiB199.52 MiB111.33 MiB
GC Fragmentation1.34%52.81%8.44%
GC Heap Size5.16 MiB174.14 MiB51 MiB
Gen 0 GC Count071.22
Gen 0 Size850.79 KiB23.31 MiB3.02 MiB
Gen 1 GC Count050.51
Gen 1 Size0 B66.95 MiB3.94 MiB
Gen 2 GC Count020.36
Gen 2 Size1.62 MiB32.80 MiB6.91 MiB
IL Bytes Jitted0 B0 B0 B
LOH Size848.52 KiB10.96 MiB7.35 MiB
POH Size128.29 KiB33.36 MiB24.14 MiB
异步活动
名称计数开始时间(毫秒)结束时间(毫秒)总时间(毫秒)
Async: <<StartAcceptingConnectionsCore>g__AcceptConnectionsAsync|0>d11,146.94[不完整][不完整]
Async: <RunAsync>d__411,147.43[不完整][不完整]
Async: <DoReceive>d__27601418,134.72276,587.212,076.99(平均)
Async: <DoSend>d__28570318,134.74276,587.212,086.92(平均)
Async: <CopyPipeAsync>d__139580918,135.19276,578.852,105.14(平均)
Task: WriteToOutputPipe155618,135.29274,289.9681.96(平均)
Async: <WriteToOutputPipe>d__3487318,135.34276,587.031,850.57(平均)
Async: <ExecuteAsync>d__8597218,135.83278,166.492,076.42(平均)
POST /greet.Greeter/SayHello209940018,136.84276,546.400.24(平均)
GET /gc5118,160.81278,165.417.83(平均)
Task.Unwrap31145,634.68254,230.561,747.76(平均)
Async: <AcceptAsync>d__101200,200.26200,200.310.05
Async: <AcceptAsync>d__101273,233.09273,240.036.94

.NET 9.0-Runtime-ProtableThreadPool

ghz 运行结果

TotalCallsConnectionsConcurrencyRPSTotalRequestsLatencyAvgFastestSlowestLatencyP0LatencyP25LatencyP50LatencyP75LatencyP90LatencyP95LatencyP99ErrorCount
100210815.27366291042921001184886501114026000516700576400161300044731001108846001114026000
100021013249.17457642389100049785805151900005203995744001006900121110021035000
1000021018410.17464075766100003803100389770000522299533900610300100810014951000
10000021022092.2876597010071000003111490255979000005336001000000100399915062000
10021007881.3385665421411006238083925700111150000492340062989007550100965970010585400111150000
1000210019873.0114567911041000277408201552430007331001533400347540070184009654200142522000
10000210029741.2363729372610000188024801755800001008400156260022798003578600478160077502000
100000210030760.41909225388100000191877701651540001029100170230024271003348700424740064374000
1000250024400.48020145036610008716442112690023308500043924008341299117684001517230016784000220770000
10000250036818.946146032045100008847775031650699051144007788100112942001600060019926400266248000
100000250038879.065229079531000009192696088539700048334008172000118002001645179920616200315132000
100002250028367.13655882805100005928309162490019179750004014360056242900767417001024881001147190001348064000
1000002250037818.776356850714100000585920220243678100045726300568396006897600083181300935532001201411000
100002500029150.762496494621000010034818410070992319934000495880001043977001283196001863299001909406001989203000
1000002500031104.951777682207100000145668844032224590001225580001451056001704098001946869002085240002276303000
100201008147.9006933863481002458413506500877170001195600171160028189005641600706010087717000
10002010019576.482380187033100024006500122026000994000183160035824005438900637510083418000
100002010025943.27813554999710000204939603099380006708001186800219480044062005971500145000000
1000002010030049.34282387737410000016062800495713000697400107570020130992899100386220093704000
10002050020730.7162877091721000637569203132070002198300450870084361001562310019393200251824000
100002050030400.680975253847100008622565052890200022886006692100126302001908590023912000334365990
1000002050032341.4752673904221000009033488086998900024604006315100121990002080490028252700424694000
1000020250030066.6065534979610000276811000231266700028624001158710038786800835386001063812001442042000
10000020250025397.70972088958310000063960058084717060001271870036592100893387001630473002116179003346282000
1000020500029140.195227651948100005934635802856361000930430038390600890077001585601002023491002392161000
10000020500032058.481851997981000001033736490970445800019147400575183001685865002597696003218193004599674000
1001001009394.69951053615510018083880548510001457800180910018091002467600349890047421000
100010010019656.6764884526861000192152401804670007734001011200200959943590006376200122525000
1000010010024538.3357511773510000240838901717040001041500201100029307004818500593070084561000
10000010010026425.214897775113100000221908703872600001005400197190026751004044899566590095404000
100010050022158.406012905056100034202810246895000129360021766004201700807700010596600177685000
1000010050027655.34143561089510000116079220724661000400130010008100160761002418550031696000432766000
10000010050029898.7913951756751000009648830084037700029414007034800132714002143950028773200433949000
10000100250028713.89873297050510000342967190244425600040679992330210055603200838784001026622001402638000
100000100250032130.58589834210210000048082539051760110001245770029729500662081001212516001486754002363215000
10000100500022372.095374927238100004628036203487510000978530023980800646042001310466001626748002209524000
100000100500023945.34236152558510000012488502301507228200036457000707365001649022003301113004008267006000176000
100020050020338.8451603717951000532807302101520001626000341850090117001283260014422800150201000
1000020050026532.4689762473410000122206880620906000526000010967500164946002351240030345200458141000
10000020050028161.753905021444100000107100980146654900039955008489800142493002214780029019200465674000
10000200250027895.78469587039210000392784260229935600098806002590690051803500992234001389229001733837000
100000200250024075.3616600828610000063972926068217190002264860048222500878738001412850001791483002616990000
10000200500021357.1987214726581000061905828040816560001485080038191700834918001650189001975039002572864990
100000200500029041.626612213231000001074175110795662500039621300803881001480009002394029003028449004234986000
10005005001953.065873982330710001572399004897551000181100063338001136160017631300210390004686434000
1000050050019195.445918846646100001837104805017486000879360013752800194980002719110039414400696162000
10000050050021026.4635916795341000001661552505557071000866500014629700211206002839360035036900599014000
10000500250018523.7051559621871000067107880049349610001335490026929300658983991540640004125257004684720000
100000500250026025.38318082545810000063548998082896160002584340048273400840499001192593001519606004584000000
10000500500018130.761956149665100001012160550527777199011905500394879001333573003483341004474666005075860000
100000500500027524.8178208001710000011997795801191204300041530600885407001702754002620846003264023005134944990

性能探查器结果

GC 信息
名称最小值最大值平均
Allocation Rate0 B827.45 MiB33.98 MiB
GC Committed Bytes4.07 MiB191.55 MiB110.78 MiB
GC Fragmentation2.58%70.67%11.54%
GC Heap Size1.45 MiB156.13 MiB47.79 MiB
Gen 0 GC Count0101.37
Gen 0 Size0 B35.96 MiB2.23 MiB
Gen 1 GC Count080.53
Gen 1 Size0 B57.41 MiB3.78 MiB
Gen 2 GC Count030.38
Gen 2 Size0 B35.06 MiB4.75 MiB
IL Bytes Jitted39.35 KiB657.45 KiB594.55 KiB
LOH Size0 B9.35 MiB6.60 MiB
POH Size23.95 KiB31.76 MiB24.60 MiB
异步活动
名称计数开始时间(毫秒)结束时间(毫秒)总时间(毫秒)
Async: <<StartAcceptingConnectionsCore>g__AcceptConnectionsAsync|0>d1961.28[不完整][不完整]
Async: <<StartAcceptingConnectionsCore>g__AcceptConnectionsAsync|0>d1961.28[不完整][不完整]
Async: <RunAsync>d__41972.92[不完整][不完整]
Async: <DoReceive>d__27617,215.0820,532.0665.95(平均)
Async: <DoSend>d__28517,216.4020,532.0563.82(平均)
Async: <CopyPipeAsync>d__152417,225.9520,507.4891.05(平均)
Task: WriteToOutputPipe200917,228.11273,410.691.38(平均)
Async: <WriteToOutputPipe>d__36117,229.0217,334.48105.46
Async: <ExecuteAsync>d__81817,233.7138,953.57590.39(平均)
POST /greet.Greeter/SayHello209940017,256.75276,514.640.21(平均)
GET /gc5117,390.54277,491.867.96(平均)
Async: <WriteToOutputPipe>d__36120,432.9120,507.6174.70
Microsoft.AspNetCore.Server.Kestrel.Transport.Sockets.Internal.SocketConnection.DoReceive()590623,569.50277,493.781,938.87(平均)
Microsoft.AspNetCore.Server.Kestrel.Core.Internal.Http2.Http2Connection.CopyPipeAsync()573823,569.69276,538.771,945.87(平均)
Microsoft.AspNetCore.Server.Kestrel.Core.Internal.Http2.Http2FrameWriter.WriteToOutputPipe()101123,569.75276,538.741,825.73(平均)
Microsoft.AspNetCore.Server.Kestrel.Transport.Sockets.Internal.SocketConnection.DoSend()557723,570.22277,493.761,944.11(平均)
Microsoft.AspNetCore.Server.Kestrel.Core.Internal.Infrastructure.KestrelConnection<T>.MoveNext()593242,000.63277,493.841,929.29(平均)
Task.Unwrap1221,749.85225,921.044,171.19

.NET 9.0-Runtime-WindowsThreadPool

ghz 运行结果

TotalCallsConnectionsConcurrencyRPSTotalRequestsLatencyAvgFastestSlowestLatencyP0LatencyP25LatencyP50LatencyP75LatencyP90LatencyP95LatencyP99ErrorCount
100210789.26473675653221001222677101129730000505500556600147110067479001129730001129730000
100021013983.8430677195571000510694067566000504499526900559300672900105270021156000
1000021018669.66675765017510000377519025341000052390053610058490077730011702000
10000021022558.7394609517031000003058570172553000005330001000100100350015059000
10021007303.3215506412321004633213549500993480001555400372110071206007827100893060099348000
1000210016617.837919579633100034362610157305000107830020937004754600923710010966300134446000
10000210030435.30397868554810000194273401356200001005800155700023560003934600518140073020000
100000210038913.9278395687710000015477160189720000922500135940019320002735100341210052290000
1000250023975.5832660019041000712069402481780004242800626770094067001344360014306200175064000
10000250036362.45954221845100009834881060313300051464007842800124936001885960023688600404882000
100000250035170.698700045251000009862136082326500049472008328600126678001854570023507900342651000
100002250031935.83197153623100005657990257130022852910003507730045252800544823001391961001679395001875575000
1000002250035203.533984206784100000634319551062800171719900049080900598078007671070090421100983377001260985000
100002500034376.6769372718510000904894270217322900055028100924988001162184001603382001683793001819175000
1000002500035965.88635679059100000124327105028688740001012885001240435001478841001701466001850370002179689000
100201006289.782876695096100275484801043640009836001488600393600066965008208999102767000
10002010016833.1181499729831000297871401662120008351001909600447580069663009009700136215000
100002010029862.5754142013910000186553701784880005594001064400232360045313006165600120267000
1000002010033498.402293702610000015762130330798000538000101399919982003114100452830092984000
10002050017300.6489473420151000544718704190610001655300327190077244001346600017180900235584000
100002050032934.40980549596100007629251068578000013284004194900108895001896490026653800396461000
1000002050029578.395466696810000085725760129850600017415004357400107923002159650031227400553414000
1000020250030425.99743265433410000313816200215934600029056001649850049130000893757001087392001382627000
10000020250029284.915372305131000005096231905590411000767250027049600708327001391138001745712002720638000
1000020500031553.8338381420841000051879775027722820001115150038851400793018001220415001469132002158650000
10000020500027978.60196521700310000011722147501304971400025244700751184001708129002867818003711413005504112000
1001001008104.77857744926410026730530754660001004399217540046488005590000609530068242000
100010010018590.0558073475331000208004401844330005482001002800232430051760008050000131509000
1000010010022445.79228933165100002569992019997000010088002000699328860055263006970300104296000
10000010010023681.463476552511000002405238043298100010001001933900300790050899007209000115019000
100010050019086.482762043095100046954340275023000631700164850058741001498630020781800240858000
1000010050028694.72570855169100008123589065280099014937004460600117974002213390027980000404041000
10000010050032154.0451428646100000772874909006000001737100429210099986001916560027631200454894000
10000100250031918.482748538851000031644821018381640008215399220779004588810077393800956126001300553000
100000100250034495.138807058751000004022087005450059000573620020679400512221001156946001515295002284037000
10000100500025227.641624195934100005469738203138806000537580036292600808747001443002001846210002414158000
100000100500034447.3123362956110000073352572011065911000828410023287800612471002566743003421846005842314000
100020050023312.1425957138310002422676024421600052229910091001987600542040012656800211267000
1000020050023330.177537985031000010976776084215500037291007810800153065002476520032511400484155000
10000020050029928.53007161837410000092207350121415000027756006002500122807002122430029155800462026000
10000200250023994.648233657965100004374822402566568000186799003645160061896600914747001072012001484424000
100000200250025669.41074378811810000059802975055948390001792910042479100824383001383200001764702002615148000
10000200500026683.6588206036251000051648288024931650001996550047298200745725001037055001263295001708235000
100000200500029119.881572936031000009703004601133216700014576300422907001137693003014756003731184005307509000
10005005001935.4755047187862100051449090050116900001094600323670055220004601460004773725004849430000
1000050050019129.46766326092100001587436904993611000645580011038500167785002336340028710000553562000
10000050050021136.335918941311000001632748406310666000672070012526600206099003007810039116400668010000
10000500250018512.858383483126100006274738105056503000377260017285900482121002760887004041876004812473000
100000500250026437.901968471004100000623847170128352080001632410041804400810040001315925001775430005102968000
1000050050009818.34780181429210000116732587098639230009053400304128001352799004266215004724131007359420000
100000500500027048.81155501426510000011181043101268670900028516200757464001541881002628917003382469005549252000

性能探查器结果

GC 信息
名称最小值最大值平均
Allocation Rate0 B651.27 MiB26.68 MiB
GC Committed Bytes4.07 MiB195.77 MiB131.94 MiB
GC Fragmentation2.06%51.90%9.33%
GC Heap Size1.43 MiB165.98 MiB51.99 MiB
Gen 0 GC Count0221.20
Gen 0 Size1.08 MiB17.87 MiB2.45 MiB
Gen 1 GC Count080.43
Gen 1 Size0 B78.66 MiB2.44 MiB
Gen 2 GC Count030.30
Gen 2 Size0 B36.20 MiB3.59 MiB
IL Bytes Jitted39.42 KiB650.61 KiB610.92 KiB
LOH Size0 B14.26 MiB10.21 MiB
POH Size23.95 KiB29.04 MiB24.42 MiB
异步活动
名称计数开始时间(毫秒)结束时间(毫秒)总时间(毫秒)
Async: <<StartAcceptingConnectionsCore>g__AcceptConnectionsAsync|0>d1980.38[不完整][不完整]
Async: <RunAsync>d__41995.05[不完整][不完整]
Async: <DoReceive>d__2759,833.7013,085.5276.63(平均)
Async: <DoSend>d__2839,835.099,976.2280.78(平均)
Async: <CopyPipeAsync>d__15249,844.6313,085.3989.82(平均)
Task: WriteToOutputPipe17399,846.93267,397.40100.29(平均)
Async: <WriteToOutputPipe>d__3619,847.689,956.12108.44
Async: <ExecuteAsync>d__8189,852.6131,470.65580.62(平均)
POST /greet.Greeter/SayHello20994009,874.09267,376.960.23(平均)
GET /gc519,970.53268,476.527.21(平均)
Microsoft.AspNetCore.Server.Kestrel.Transport.Sockets.Internal.SocketConnection.DoReceive()599616,170.17268,477.441,863.24(平均)
Microsoft.AspNetCore.Server.Kestrel.Transport.Sockets.Internal.SocketConnection.DoSend()569816,170.18268,477.431,853.66(平均)
Microsoft.AspNetCore.Server.Kestrel.Core.Internal.Http2.Http2Connection.CopyPipeAsync()576716,170.43267,397.861,877.59(平均)
Microsoft.AspNetCore.Server.Kestrel.Core.Internal.Http2.Http2FrameWriter.WriteToOutputPipe()83316,170.66267,397.831,931.20(平均)
Microsoft.AspNetCore.Server.Kestrel.Core.Internal.Infrastructure.KestrelConnection<T>.MoveNext()593534,519.27268,477.461,861.99(平均)
Task.Unwrap4981,549.93267,394.371,969.34(平均)
Microsoft.AspNetCore.Server.Kestrel.Transport.Sockets.Internal.SocketConnection.DisposeAsync()1145,934.41145,934.450.04

.NET 9.0-NativeAOT-ProtableThreadPool

ghz 运行结果

TotalCallsConnectionsConcurrencyRPSTotalRequestsLatencyAvgFastestSlowestLatencyP0LatencyP25LatencyP50LatencyP75LatencyP90LatencyP95LatencyP99ErrorCount
1002106792.87834634169610079660604790200005356008218001473500382770043398000
100021014559.07124772696410004372960364970000526800585000805300116120019767000
1000021019444.11227419309610000350545034306000005396001000400100960015068000
10000021021848.8515675545971000003123640113799000005335001000300100370013833000
10021007325.84631839593210051332669059001204370001794200544400062321001129050011290500112905000
1000210021758.38187265689310002073636085964000849800158400027902004890700568500070383000
10000210033614.3605926749661000017779430152286000926200141590019897003626100496120092645000
100000210037448.92528325243610000015614520141212000940400139310019586992718000339360051373000
1000250017761.137565338784100012870784052565300035052008303200211971002954290033995400400943000
10000250036125.888606545100009498901052033700052784008310500118745001784910023022800321378000
100000250038292.609143509221000009084066084123600047414008199300119861001631579920170900274965000
100002250035394.5214943850151000045369291124610012790810002902280049460300594135007110880077969000834623000
1000002250030610.6440862148810000073273065305270019390150005616850071152700889341001049952001156574001356678000
100002500034863.321833085574100009017101701993953000534225001021172001218281001378939001630616001710314000
1000002500036119.83926960484100000125146762028706110001067765001263887001459538001642526001806078002244681000
100201008518.9034467483341003533734551400885570002609300350760042589005263700595600088557000
10002010020941.7505209260410002332819016095499010004001572200273670047671006342100130730000
100002010026338.530715599441000019130530169617000749600136660022404004367300596950088155000
1000002010033921.4510131336810000014824140231352000643300101720019109002629100378850079723000
10002050017976.26773134108210006866295027362500015886004781800111683001641840018725400225759000
100002050033235.985132879134100008706827056991300030023007412400124177001765430023322200308210000
1000002050035310.56613960351000008002224077100100022329005458500107045001882120025574300370662000
1000020250026339.1758893291041000046081385020519290001456420040736300683000001004472001154355001481139000
10000020250036485.8719953747641000004431391005616280000726690019589600651419001236483001578860002470864000
1000020500032307.9124985421041000047230251019783440001617810032381600732235001095142001254397991592641000
10000020500028264.6337385379510000011303640001171152000019690900521890001767633003047886003601324005872327000
1001001007183.95965488257751003291322011198200014573002566000406940070071008232099106302000
100010010018284.410346050751000297618601349360001289300238170041748006113100718680098710000
1000010010025575.54568623664510000239425401724890001087500201250028823004888900645700087020000
10000010010023075.3843037959271000002478881036037200010733002013300312710045564006357400104785000
100010050020133.2012595330710008105525031100700024695007358700129074001523870018430100258307000
1000010050030520.344403774391000010204616060663100039975998830200135891002116210027323300371719000
10000010050025892.99569350285100000112259730135700800036436008489900154733002413400032761800477745000
10000100250030533.45611853820410000344596060229213000070872001985180052418200874891001143363001565041000
100000100250033626.212035796451000004512648404471196000143761003408350064139300998881001242712001782622000
10000100500024510.320560678483100004885780602938738000443450024984800608926001581363001851768002261498000
100000100500033336.29804143915100000913539080918846200026856400608139001248555002160597002883058004195977000
100020050022475.344547031911000582640402519360001365100493700093371001151020013320800230337000
1000020050028598.9325734406271000010678504087779800038675009078400144570002080940028646000454078000
10000020050028591.1155967394710000010619146078760400043782008619500141646002147360027662900440263000
10000200250031048.44706534735510000351255620205011700012591300264728004869680078627500968969001332976990
100000200250032557.7989651633831000004764863605109924000186746003835440064029500965444001223250001917176000
10000200500030301.7447744641181000051022795027429160001451800036913900722454001235914001552428001967464000
100000200500031994.26969831995100000910952010941572300027727900674918001320811002098112002524963003661905000
10005005001895.779161443795410005977442704931528000525510010026900195449004697238004818645004881114000
1000050050019157.5762370956951000016212560049340800006228400100693001285200016851300205494004599149000
10000050050021106.08997230671000001666142505378436000804659914445200207795002842730035747100570656000
10000500250018594.1415810003561000068613202051307260001074670023713100471271001580017004546715004917498000
100000500250029561.34511214983310000056890118084987870002027920038953700725962001174138001553870004415231000
10000500500018582.35579302154310000100691168051177690002441930047508500916276003784496004354661004774896000
100000500500029786.82551941000210000010961294101074443200027211400641039991461174002768290003563036005707401000

性能探查器结果

GC 信息
名称最小值最大值平均
Allocation Rate0 B890.88 MiB35.06 MiB
GC Committed Bytes5.06 MiB244.93 MiB120.35 MiB
GC Fragmentation6.02%66.53%18.49%
GC Heap Size4.52 MiB161.55 MiB49.97 MiB
Gen 0 GC Count0211.38
Gen 0 Size1.66 MiB24.59 MiB4.90 MiB
Gen 1 GC Count040.46
Gen 1 Size0 B70.74 MiB4.40 MiB
Gen 2 GC Count040.37
Gen 2 Size631.06 KiB51.78 MiB5.50 MiB
IL Bytes Jitted0 B0 B0 B
LOH Size128.04 KiB11.12 MiB7.62 MiB
POH Size115.62 KiB32.06 MiB24.53 MiB
异步活动
名称计数开始时间(毫秒)结束时间(毫秒)总时间(毫秒)
Async: <<StartAcceptingConnectionsCore>g__AcceptConnectionsAsync|0>d1878.58[不完整][不完整]
Async: <<StartAcceptingConnectionsCore>g__AcceptConnectionsAsync|0>d1878.99[不完整][不完整]
Async: <RunAsync>d__41879.03[不完整][不完整]
Async: <DoReceive>d__27582718,119.54282,438.291,822.43(平均)
Async: <DoSend>d__28549118,119.56282,438.291,842.84(平均)
Async: <CopyPipeAsync>d__152565318,120.01282,438.241,856.79(平均)
Async: <ExecuteAsync>d__8585918,120.38283,323.511,835.27(平均)
POST /greet.Greeter/SayHello209940018,121.15282,418.470.18(平均)
GET /gc5118,146.32283,321.409.34(平均)
Task: WriteToOutputPipe212821,190.72282,431.167.03(平均)
Async: <WriteToOutputPipe>d__36111621,190.73282,438.011,996.19(平均)
Task.Unwrap3158,073.68271,174.753,621.26(平均)
Async: <AcceptAsync>d__101181,083.32181,083.390.07

.NET 9.0-NativeAOT-WindowsThreadPool

ghz 运行结果

TotalCallsConnectionsConcurrencyRPSTotalRequestsLatencyAvgFastestSlowestLatencyP0LatencyP25LatencyP50LatencyP75LatencyP90LatencyP95LatencyP99ErrorCount
1002105713.893904417982100111987609065500005234007737002468600610590080437000
100021012505.048913498826100045478001585870000525900592200771200120860025972000
1000021021072.24873345249210000312111036276000006084001001600100720015079000
10000021021834.7805389483261000003177400561693000005398001000700100559915072000
10021007995.3946526800561006493373427600119898000493410059525008004100955740011435300119898000
1000210021476.97131750480510002661974015736400010775001599500379780060127007682000136409000
10000210030753.2485425266710000193709701259990001046400155780022846003613600516420081172000
100000210037508.654184236664100000164044901751400001010400145340020014002780600352710055402000
1000250021804.924424131947100010143550044286500017261002919100178344002725300034343400408267000
10000250035534.20344752842100009427718041772800049995008429800124718001800310021457500284469000
100000250031310.647746226710000011326879073868300061506009774400145209002096790025690700370098000
100002250036435.1950867868141000050917435143740012491280004132970054819400638423996963140073177800837703000
1000002250038536.5543110303810000057939277476900145367800043966000554283006958560084155400978705001148721000
100002500035715.3571750009651000067408935622500162342000027400200743730001015832001173661001249607001383203000
1000002500036509.75237552529100000125528359123780024194860001069111001267579001455810001625449001715345001857441000
100201007978.10807145193610027587700720170001292200232480038214005113600578540072017000
10002010021977.34575199884100020181370131603000610400150960027124005082400603870077187000
100002010029927.512571799841000017732600138848000576000118410022794004195800566560080231990
1000002010033648.4748542760310000015848440371520000567200102490020086003177500452740087168000
10002050020875.47569990251210007045460040568100013477003474500108712001982960022724600282554000
100002050033414.64229625422100007721826064041299018609005338100113513001829880023845400333438000
1000002050029350.10014547670710000091131360115595100020187995494800126458002161120029848900492964000
1000020250032331.362844539171000027513313018382460004566800172256004056020072737300885218001204738000
10000020250029270.4409905128921000005366206806379147000879540030204700737279001436173001893419002783645000
1000020500032522.90588261312210000328910420249522500028597001214930060262000942285001106535001300218000
10000020500035311.1883217708100000921479620798382500013233800431917001569620002477899003017237004363618000
1001001008106.355382619974100108358006613400039500058720018167002387200289000046163000
100010010020888.51382401845100015789240163559000390900999600190030043012005601300125670000
1000010010025777.3548000270171000020889460250200000998100152460026369004723300604490089882000
10000010010027675.80090792679100000205769603410910009981001506000253320042414006064800102810000
100010050022169.0165824244031000244635602335270006539001053500262390059338009304400195510000
1000010050029375.779376146573100008892230069921600025211006942800128938001956430024439500372654000
10000010050032731.18749631978810000079004140109123400018496004682600104834001977350027422400423958000
10000100250025343.21042721051000034544458018349150007741000269108005278670078316200961804001321440990
100000100250027031.0042374883510000057205293053277440001517410041835700798650001321035991686117002574896000
10000100500025648.207139024571000029674965019611440005405600231296004387790068890200848142001199986000
100000100500034415.6090205100851000008565476301103749800013718100423977001269387992396001002940621004139775000
100020050022190.56368469871810004074707019619300098940029954005495700971280011881300168250000
1000020050029262.77415195749100008829511083257400020022004966700110812002004130031358600588384000
10000020050030379.5416389440710000093744110113144700029979006474400126742002068850028042500460769000
10000200250029671.107640250873100004259538602187935000161079003726460062001100886041001032577001428099000
100000200250033133.8147544081910000046515983044827130001415790033608200649721991058939001335859002000290000
10000200500029571.3630919817261000030122491016569170007146900239905004548250068852900833868001047509000
100000200500033128.81919380422100000827640190818812800031477199607844001126730001815618002307095003611006000
10005005001914.61176172809810004245320404871897000100289930210008389100123854004771603004830923000
1000050050019273.894569869313100001591956204917604000783380012874200197561002766490032883600477195000
10000050050021780.2254588750471000001624486506467165000707760013439300204991002887500036888800610257000
10000500250018484.913630165311000071523030051785430001611670026650500455636003618225004501307004971106000
100000500250029103.13283001599510000057072550071521360001683940037764300736973001226914001644564004225875000
1000050050009827.897785145644100001293496130993460400017956500430346002158733004259217004763646008238777000
100000500500030660.16266504020710000010968057201400321000044013600806843001401979002180568002842618006185679000

性能探查器结果

GC 信息
名称最小值最大值平均
Allocation Rate0 B468.01 MiB23.18 MiB
GC Committed Bytes4.99 MiB203.22 MiB138.67 MiB
GC Fragmentation3.09%60.47%11.73%
GC Heap Size4.46 MiB164.28 MiB57.42 MiB
Gen 0 GC Count0191
Gen 0 Size1.66 MiB23.29 MiB3.96 MiB
Gen 1 GC Count040.31
Gen 1 Size0 B81.30 MiB2.40 MiB
Gen 2 GC Count030.25
Gen 2 Size621.87 KiB37.84 MiB4.48 MiB
IL Bytes Jitted0 B0 B0 B
LOH Size128.04 KiB12.74 MiB10.11 MiB
POH Size115.27 KiB28.52 MiB24.69 MiB
异步活动
名称计数开始时间(毫秒)结束时间(毫秒)总时间(毫秒)
Async: <RunAsync>d__41877.95[不完整][不完整]
Async: <<StartAcceptingConnectionsCore>g__AcceptConnectionsAsync|0>d1878.39[不完整][不完整]
Async: <<StartAcceptingConnectionsCore>g__AcceptConnectionsAsync|0>d1878.64[不完整][不完整]
Async: <DoReceive>d__2760008,988.18254,301.301,596.50(平均)
Async: <DoSend>d__2856498,988.20254,301.301,595.21(平均)
Async: <CopyPipeAsync>d__15257748,988.69253,298.401,610.71(平均)
Task: WriteToOutputPipe16958,988.92253,295.42103.14(平均)
Async: <ExecuteAsync>d__859688,989.12254,301.331,599.35(平均)
POST /greet.Greeter/SayHello20994008,990.53253,278.750.19(平均)
GET /gc519,057.21254,299.188.67(平均)
Async: <WriteToOutputPipe>d__3693612,103.44253,298.341,709.58(平均)
Task.Unwrap3967,627.78253,293.691,434.70(平均)
Async: <AcceptAsync>d__10397,649.67245,792.070.04(平均)

四、结语

  • 数据误差提醒:所有测试数据都受系统负载、网络延迟、工具采样等多重因素影响,具有一定测量误差。本报告提供的是在特定硬件与环境下的结果,不能完全代表通用场景。
  • 不同部署方式(Runtime vs. NativeAOT)、不同线程池(Portable vs. Windows)、以及 .NET 不同版本,在高负载下的差异更明显。
  • 对于极端高并发追求最优启动性能的场景,.NET 9.0-NativeAOT + WindowsThreadPool 是值得优先尝试的组合。如需兼容动态特性,可选择对应 Runtime 版。

再次声明

  • 实验数据因测试环境差异、时间切片、网络状况等因素存在误差。
  • 本文仅提供参考性结论,不对任何技术选择做绝对保证,实际生产环境需多维度测试与调优。

标签:__,Core,不同,Server,GC,Async,NET,平均
From: https://blog.csdn.net/caizz520/article/details/144953971

相关文章

  • .NET 响应式编程 System.Reactive 系列文章(一):基础概念
    .NET响应式编程System.Reactive系列文章(一):基础概念引言在现代软件开发中,处理异步事件和数据流已经成为常见的需求,比如用户输入、网络请求、传感器数据等。这些数据流通常是无限的、异步的、实时的,而传统的编程方式往往无法优雅地处理这些情况。响应式编程(ReactivePro......
  • 在 Windows 操作系统中,卸载补丁的方式有几种不同的方法。以下是常见的几种方式:
    在Windows操作系统中,卸载补丁的方式有几种不同的方法。以下是常见的几种方式:1. 通过“设置”卸载更新步骤:打开“设置”(Win+I)。点击“更新与安全”。选择“Windows更新”,然后点击“查看更新历史记录”。点击“卸载更新”,这会打开一个新的窗口,列出所有已安装的更......
  • leetcode115 不同的子序列
    给定两个字符串s和t,统计并返回在s的子序列中t出现的个数,结果对1E9+7取模。1<=|s|,|t|<=1000分析:判断两字符串的最后一个字符:如果相同,则可以选择匹配或者不匹配;如果不同,则只能选择不匹配。初始条件:t为空时答案为1。mintdp[1005][1005];classSolution{public:intnumDi......
  • .NET 中管理 Web API 文档的两种方式
    前言在.NET开发中管理WebAPI文档是确保API易用性、可维护性和一致性的关键。今天大姚给大家分享两种在.NET中管理WebAPI文档的方式,希望可以帮助到有需要的同学。SwashbuckleSwashbuckle.AspNetCore是一个流行的.NET库,它使得在ASP.NETCore项目中自动生成Swag......
  • 结构胶与玻璃胶在性质、用途和应用场景上有很大的不同。下面是它们之间的对比,表格化呈
    结构胶与玻璃胶在性质、用途和应用场景上有很大的不同。下面是它们之间的对比,表格化呈现:特性结构胶(StructuralAdhesive)玻璃胶(GlassSealant)定义一种高强度、耐用的粘合剂,专门用于结构性连接和承载荷载。一种用于密封和粘合玻璃的胶,通常用于密封接缝和防水。......
  • ASP.NET Core - 日志记录系统(二)
    本篇接着上一篇[ASP.NETCore-日志记录系统(一)]往下讲,所以目录不是从1开始的。2.4日志提供程序2.4.1内置日志提供程序ASP.NETCore包括以下日志记录提供程序作为共享框架的一部分:ConsoleDebugEventSourceEventLog除此之外,还有一些微软官方提供的,但是没有和......
  • Prometheus 是一个开源的监控和报警工具,主要用于收集、存储和查询来自不同服务和应用
    Prometheus是什么?Prometheus是一个开源的监控和报警工具,主要用于收集、存储和查询来自不同服务和应用程序的时间序列数据(如CPU使用率、内存消耗、网络流量等)。它特别适合用于微服务架构下的监控,因为它支持多种集成方式,并能够处理大规模的、高频的数据。Prometheus具有以下主......
  • 信创环境下国产系统不同版本的依赖库都从哪里下载
    在Linux系统中安装软件时,可能会遇到各种依赖库问题,以下是一些常见的依赖库问题及其解决方法,以及获取软件依赖包的不同途径。1、依赖库问题依赖库版本不兼容:安装软件时,系统提示缺少特定版本的依赖库。依赖库缺失:软件安装需要某些库文件,但系统中未安装。依赖冲突:已安装的库版本......
  • .NET 9.0 WebApi 发布到 IIS 详细步骤
            微软表示,.NET9是迄今为止性能最高的.NET版本,对运行时、工作负载和语言方面进行了1,000多项与性能相关的改进,并采用了更高效的算法来生成更好的代码。        .NET9是.NET8的继任者,特别侧重于云原生应用和性能。作为标准期限支持(STS)......
  • 对比下px、em、rem有什么不同?
    在前端开发中,px、em和rem是三种常用的长度单位,它们各自有着独特的特点和使用场景。以下是对这三者的详细对比:一、px(像素)定义:px是像素单位,代表屏幕上的一个物理像素点。特点:px是固定的像素单位,一旦设置了就无法因为适应页面大小而改变。这意味着使用px定义的元素在各种显示环境......