Description
For .NET 8 we want to continue improving Native AOT performance, particularly in the areas that Native AOT excels at, namely fast startup, small binaries, and smaller working set. Native AOT shares the JIT and GC with CoreCLR so there's a lot of overlap with CoreCLR in these areas.
For .NET 8 we'll target basic APIs that are commonly used by customers and touch multiple areas of the stack (web/http stack and base framework libraries). There are two toy apps that we can use as benchmarks.
-
Albums app
This is an ASP.NET Core Minimal APIs app that simply returns lists of in-memory objects, JSON serialized.):
i. Disk size: 10 MB
ii. Startup time: <50 ms
iii. Working set (before load): <50 MB
iv. Working set (at load): <50 MB
v. Throughput: Within 5% of default CoreCLR RPS on Citrine perf environment ("default" here means compared to the default configuration of a CoreCLR-based deployment of the app, e.g. including tiered JIT) -
Todo API app
This app is more representative of something “real” and thus uses much more of the framework surface area:
i. Disk size: 20 MB
ii. Startup time: <150 ms
iii. Working set (before load): <60MB
iv. Working set (at load): <60MB
v. Throughput: Within 5% of default CoreCLR RPS on Citrine perf environment
vi. Container smallest possible constraint: <100MB
The ASP.NET work here is at dotnet/aspnetcore#45910
Planned perf work in Native AOT includes
Size:
- Reduce impact of relocations Investigate size of
.rela.dyn
section on Linux #76657- Reloc in EmbeddedPointerIndirectionNode Convert pointers in a couple tables to relative #78801
- Relocs in GCStaticsNode Remove pointer relocs from GC statics #78794
- Reloc in ThreadStaticsNode
- Reloc in NonGCStaticsNode Place non-GC statics in the dehydratable section #78795
- Relocs in ModuleInitializerListNode Convert pointers in a couple tables to relative #78801
- Relocs in PInvokeMethodFixup/PInvokeModuleFixup
- Frozen strings and frozen objects - Place frozen objects into dehydrated section #78688
- InterfaceDispatchCellNode - Place dispatch cells in dehydrated section #78748
- Shrink metadata overhead for user code if possible
- Componentize fixed overheads in the lowest portions of the framework: Bringing down the size of Hello World under 2 MB #80165
Add benchmarking:
These items don't have improvements planned, but need to be tracked for regressions:
- Startup perf
- Build time (ILLink and Native AOT)
- Throughput
Metadata
Metadata
Assignees
Labels
Type
Projects
Status