-
Notifications
You must be signed in to change notification settings - Fork 4.8k
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
Arm64: Revisit the heuristics for IO completion poller threads #67266
Comments
I couldn't figure out the best area label to add to this issue. If you have write-permissions please help me learn by adding exactly one area label. |
Tagging subscribers to this area: @mangod9 Issue DetailsToday, depending on the number of processors, we create IO completion poller threads. Back then, we did our analysis on older Arm64 machines to come up with the heuristic and they can be different on modern Arm64 machines. We need to revisit them or have some kind of auto-tuning of number of threads creation. runtime/src/libraries/System.Net.Sockets/src/System/Net/Sockets/SocketAsyncEngine.Unix.cs Lines 52 to 57 in 0e35b8d
runtime/src/libraries/System.Private.CoreLib/src/System/Threading/PortableThreadPool.IO.Windows.cs Lines 41 to 43 in 39b3aac
Related: #67180
|
@kouvel as fyi. |
cc: @dotnet/ncl |
FWIW I am the person who came up with the magic numbers on Unix. Here you can find the data and reasoning behind it. Recently after a conversation with @kunalspathak I wanted to give it a quick try and see how the number of epoll threads affects the throughput of JSON Platform benchmark on the Ampere machine. Currently more than 80% of time is spent in arm64 with 80 cores:: x64 with 28 cores: |
@mangod9 - Do you think we will be doing this in .NET 7? |
yeah we hope to investigate this soon. Might be worth validating again after the concurrent queue fix. |
On the Linux Ampere machine, quick tests on JsonPlatform and Json didn't show any significant improvements from decreasing the IO poller thread counts. It still seems like relatively more IO poller threads are necessary on arm64 platforms than on x64 platforms. Probably the heuristics could be more fine-tuned, and I haven't done an exhaustive test. |
Today, depending on the number of processors, we create IO completion poller threads. Back then, we did our analysis on older Arm64 machines to come up with the heuristic and they can be different on modern Arm64 machines. We need to revisit them or have some kind of auto-tuning of number of threads creation.
runtime/src/libraries/System.Net.Sockets/src/System/Net/Sockets/SocketAsyncEngine.Unix.cs
Lines 52 to 57 in 0e35b8d
runtime/src/libraries/System.Private.CoreLib/src/System/Threading/PortableThreadPool.IO.Windows.cs
Lines 41 to 43 in 39b3aac
Related: #67180
The text was updated successfully, but these errors were encountered: