-
Notifications
You must be signed in to change notification settings - Fork 10.3k
Multiple accept loops in named pipes transport #46259
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
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Small nits, increasing the bounded channel capacity might be helpful
src/Servers/Kestrel/Transport.NamedPipes/src/Internal/NamedPipeConnectionListener.cs
Show resolved
Hide resolved
src/Servers/Kestrel/Transport.NamedPipes/src/Internal/NamedPipeConnectionListener.cs
Show resolved
Hide resolved
src/Servers/Kestrel/Transport.NamedPipes/src/NamedPipeTransportOptions.cs
Outdated
Show resolved
Hide resolved
src/Servers/Kestrel/Transport.NamedPipes/src/Internal/NamedPipeConnectionListener.cs
Outdated
Show resolved
Hide resolved
src/Servers/Kestrel/Transport.NamedPipes/src/Internal/NamedPipeConnectionListener.cs
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
two nits; the captured i
seems a definite "this should be fixed"
👍 on the pragmatic solution to those logger bits :) |
It was just some |
@JamesNK feels like we should have a benchmark for this in the perf infrastructure. |
Using a unit test as a benchmark is gross. Named pipes benchmarks would differ from our regular tests because the client and server are on the same machine. @sebastienros Are there existing examples of benchmarks running the client and server processes on one machine? |
@JamesNK here is how it's done, same architecture (multiple applications) but you can see where https://github.com/aspnet/Benchmarks/blob/main/scenarios/redis.benchmarks.yml#L36-L45 And in profiles, we defined https://github.com/aspnet/Benchmarks/blob/main/scenarios/aspnet.profiles.standard.yml#L56-L60 So the only special thing to do is to define the job with |
Blocked on API review: #46268 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm interested in seeing the results on our "Ampere Linux (80)" machine. I know you said that perf didn't improve on your machine adding more than 2 accept loops, but did it get any worse before hitting the limit of 16?
src/Servers/Kestrel/Transport.NamedPipes/test/NamedPipeConnectionListenerTests.cs
Show resolved
Hide resolved
ac3a927
to
d8ed70a
Compare
Feedback from #14207
PR adds multiple accept queues. I did some very cursory benchmarks via a unit test and found an improvement when 2 or more queues were used.
Creating 50,000 connections.
I didn't notice any improvement from increasing the queue count above 2, but in other places in transports, we are using
Environment.ProcessorCount
, so I followed that.