-
Notifications
You must be signed in to change notification settings - Fork 10.5k
Closed
Labels
HTTP2Perfarea-networkingIncludes servers, yarp, json patch, bedrock, websockets, http client factory, and http abstractionsIncludes servers, yarp, json patch, bedrock, websockets, http client factory, and http abstractionsfeature-kestrel
Milestone
Description
Today Kestrel locks and copies buffers into the connection pipe when multiplexing output from multiple streams. We could improve this by using a channel to queue writes to the pipe instead of locking (See
lock (_writeLock) |
This samples shows the difference between a SemaphoreSlim
and a Channel<byte[]>
and the performance difference is almost 3x with 0 allocations https://gist.github.com/davidfowl/8af7b6fa21df0fe1f150fb5cfeafa8f7.
There was still lock contention in Channels itself but it was pretty optimized.
We should prototype and measure this change.
gfoidl, halter73, Saibamen and yanrez
Metadata
Metadata
Assignees
Labels
HTTP2Perfarea-networkingIncludes servers, yarp, json patch, bedrock, websockets, http client factory, and http abstractionsIncludes servers, yarp, json patch, bedrock, websockets, http client factory, and http abstractionsfeature-kestrel