Skip to content

Performance degradation on upgrade from .NET 8 to .NET 9/10 with concurrent requests #64711

@leondeklerkfenetre

Description

@leondeklerkfenetre

Description

When doing concurrent requests after the API has started, the response times increase significantly compared to older .NET versions. On our front-end we are doing some initial calls with some of the calls being sequential, and some blocks of concurrent calls. Overall, the response time is 6-8 times slower. If the calls are all executed in sequence, there are no performance issues.

Performance issues only occur when running from Visual Studio (26) with the Diagnostic tools enabled. When running without a debugger (Ctrl + f5 or the performance analyzer) the issue is not noticeable.

You can clone my minimal example from here: https://github.com/leondeklerkfenetre/dotnet-performance-degradation
The README contains steps on how to run

Configuration

.NET 10.0.100
Windows 11 Business 26200.7171
x64
Visual Studio 26

Regression?

The performance is good on .NET 6/7/8 but degrades on .NET 9/10 (10 improves slightly over 9)

Data

Version Avg Response
.NET 8 49ms
.NET 9 437ms
.NET 10 340ms

Analysis

The only pointer I can give is that the issue is mostly noticeable with the diagnostic tools and debugger enabled. When using the performance analyzer or after creating a release build. Also, the performance on .NET 6/7/8 is nearly identical.

Metadata

Metadata

Assignees

No one assigned

    Labels

    area-networkingIncludes servers, yarp, json patch, bedrock, websockets, http client factory, and http abstractionsfeature-kestrel

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions