-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
Rollback: remove .NET 6 build #1992
Conversation
cc: @kouvel |
To check: the real issue here is the |
@mgravell Yep exactly, maybe this can help on thread pool knobs and throttle thoughts in some way. |
Hi @NickCraver, trying to clarify your comment above:
Does this indicate that targeting 5, but running on 6 runtime is still good? We are trying to determine whether the enablement of portable (managed) threadpool in 6 is causing the issues you are observing. So any details on how to measure would be helpful. Thx! |
This allows for using new APIs introduced in net6.0. In order to enable building for net6.0, we also need to revert the thread pool changes in StackExchange#1939 and StackExchange#1950. This was already effectively reverted in StackExchange#1992 by not building for net6.0. Now that we are building for net6.0 again, these if-defs need to be removed.
This allows for using new APIs introduced in net6.0. In order to enable building for net6.0, we also need to revert the thread pool changes in #1939 and #1950. This was already effectively reverted in #1992 by not building for net6.0. Now that we are building for net6.0 again, these if-defs need to be removed.
This removes the .NET 6 specific build from the main library. In testing many previous performance issues filed around past releases (vs. 1.2.6), I was testing this example:
This parallel thread contention state is one of the things we hoped the .NET 6 behavior for thread pools would help with. It comes from 2 main factors: defaulting to the primary thread pool (rather than our own) and the backlog moving back to
Task.Run
instead of a thread (which has ~11% impact on throughput due to startup cost). This happens here:In the
net5.0
build the sample takes ~100-105ms on an 8-core machine, running under .NET 6. With thenet6.0
build in play (before this PR) and using those changes, we end up in the 20,000-30,000ms territory. With only the socket manager change (leaving the Backlog as aTask.Run
), we're in the 400-500ms territory.In short, trying to use the .NET 6 changes to our advantage here greatly regresses some use cases drastically enough I advise we do not enable it. We should look at these cases further before adding the
net6.0
paths to any release build. I can go further than this PR and remove the code paths completely, but I'd like to have these in play easily to discuss with the .NET team as a use case to look at and get some advice.cc @stephentoub on this one (happy to sync up and help repro)