Skip to content

Native AOT Trimming & Perf Improvements in .NET 8 #79003

Closed
@agocke

Description

@agocke

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.

  1. 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)

  2. 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:

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

Labels

User StoryA single user-facing feature. Can be grouped under an epic.area-NativeAOT-coreclrlinkable-frameworkIssues associated with delivering a linker friendly frameworktenet-performancePerformance related issue

Type

No type

Projects

Status

No status

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions