Partition more ConcurrentQueues in Kestrel - #42237
Conversation
- PinnedMemoryPool uses an ConcurrentQueue just like IOQueue so we should partition it the same - We used to do the exact same thing per LibuvThread. I thought I did the same thing in SocketConnectionListener, but I guess not
|
I have seen PRs with more value, maybe? Plaintext Platform Json Platform: Note that the bottleneck in the runtime has already been fixed with these runs. |
|
Ran benchmarks on INTEL Linux 28 cores and it doesn't regress it. |
|
halter73, this change will be considered for inclusion in the blog post for the release it'll ship in. Nice work! Please ensure that the original comment in this thread contains a clear explanation of what the change does, why it's important (what problem does it solve?), and, if relevant, include things like code samples and/or performance numbers. This content may not be exactly what goes into the blog post, but it will help the team putting together the announcement. Thanks! |
|
Looks like the bot needs an @-sign added 😄 |
PinnedMemoryPooluses anConcurrentQueuejust likeIOQueueso we should partition it the same way which this PR doesLibuvThread. I thought I did the same thing inSocketConnectionListener, but I guess not.Ultimately, we can be smarter about how we partition
ConcurrentQueues at the Kestrel layer than we can be at a lower layer like withinConcurrentQueueitself. That's because we can ensure that each partition is exclusively used by code servicing sockets within that partition. These can still be accessed by the application from the thread pool, so it's not perfect. But especially when you're running inline, this should avoid issues related to high core counts and NUMA.@sebastienros Can we benchmark on our high core count machines that are seeing a lot of contention in
ConcurrentQueue?