Skip to content

SocketsHttpHandler allocating more per HTTP/1.1 request due to additional async state machines #57977

@stephentoub

Description

@stephentoub

In .NET 5 for an HTTP/1.1 request, SocketsHttpHandler would typically end up allocating two async state machines for a total of 480 bytes:
image

In .NET 6 for the same request, it now typically ends up allocating five async state machines for a total of 952 bytes:
image

(These traces are for ~10K requests).

The extra state machines come from the DetermineVersionAndSendAsync, SendUsingHttp11Async, and SendAndProcessAltSvcAsync async methods.

Metadata

Metadata

Assignees

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions