-
Notifications
You must be signed in to change notification settings - Fork 10.4k
Partition more ConcurrentQueues in Kestrel #42237
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
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 😄 |
PinnedMemoryPool
uses anConcurrentQueue
just likeIOQueue
so 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
ConcurrentQueue
s at the Kestrel layer than we can be at a lower layer like withinConcurrentQueue
itself. 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
?