-
Notifications
You must be signed in to change notification settings - Fork 5.3k
Move CoreCLR over to the managed wait subsystem #117788
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
25446d0 to
63dc9af
Compare
06de3b2 to
63a1aa6
Compare
src/libraries/System.Private.CoreLib/src/System/Threading/LowLevelLifoSemaphore.Unix.cs
Outdated
Show resolved
Hide resolved
63a1aa6 to
2b610bf
Compare
src/coreclr/System.Private.CoreLib/src/System/Threading/Thread.CoreCLR.cs
Outdated
Show resolved
Hide resolved
src/libraries/Common/src/Interop/Unix/System.Native/Interop.GetPageSize.cs
Outdated
Show resolved
Hide resolved
4a27a27 to
ac08ce6
Compare
8838c10 to
9af82b0
Compare
|
Looks like I need to do some perf work in the wait subsystem. Time to first request is much worse and requests/sec regresses as well. JSON benchmark results| application | PR | Main | | --------------------------------------- | --------------------------------- | --------------------------------- | | Max Process CPU Usage (%) | 90 | 90 | | Max Cores usage (%) | 5,030 | 5,036 | | Max Working Set (MB) | 115 | 119 | | Max Private Memory (MB) | 894 | 897 | | Build Time (ms) | 8,267 | 9,119 | | Start Time (ms) | 470 | 280 | | Published Size (KB) | 109,039 | 109,039 | | Symbols Size (KB) | 34 | 34 | | .NET Core SDK Version | 10.0.100-rtm.25513.102 | 10.0.100-rtm.25513.102 | | ASP.NET Core Version | 10.0.0-rtm.25513.102+b502b6eeec0d | 10.0.0-rtm.25513.102+b502b6eeec0d | | .NET Runtime Version | 10.0.0-rtm.25513.102+b502b6eeec0d | 10.0.0-rtm.25513.102+b502b6eeec0d | | Max Global CPU Usage (%) | 90 | 92 | | Max CPU Usage (%) | 89 | 90 | | Max Working Set (MB) | 121 | 123 | | Max GC Heap Size (MB) | 19 | 18 | | Size of committed memory by the GC (MB) | 27 | 31 | | Max Number of Gen 0 GCs / sec | 32.00 | 29.00 | | Max Number of Gen 1 GCs / sec | 1.00 | 2.00 | | Max Number of Gen 2 GCs / sec | 1.00 | 1.00 | | Max Gen 0 GC Budget (MB) | 33 | 15 | | Max Time in GC (%) | 17.00 | 2.00 | | Max Gen 0 Size (B) | 560 | 1,248 | | Max Gen 1 Size (B) | 2,608,768 | 963,760 | | Max Gen 2 Size (B) | 5,856,456 | 5,710,120 | | Max LOH Size (B) | 88,680 | 88,680 | | Max POH Size (B) | 1,606,608 | 1,594,248 | | Max Allocation Rate (B/sec) | 275,062,672 | 277,456,832 | | Max GC Heap Fragmentation (%) | 1,352% | 340% | | # of Assemblies Loaded | 107 | 101 | | Max Exceptions (#/s) | 458 | 442 | | Max Lock Contention (#/s) | 973 | 1,022 | | Max ThreadPool Threads Count | 76 | 76 | | Max ThreadPool Queue Length | 104 | 68 | | Max ThreadPool Items (#/s) | 2,574,119 | 2,593,353 | | Max Active Timers | 1 | 1 | | IL Jitted (B) | 541,472 | 367,434 | | Methods Jitted | 7,263 | 3,974 | | Load Working Set - P90 (MB) | 115 | 118 | | Load CPU Usage - P90 (%) | 85 | 88 |
Plaintext benchmark results
|
I see the Methods Jitted almost doubled. If that is included in the time, it might be one of the reasons. |
…ith a comment stating that we know that this can cause deadlocks for users that write bad code.
|
I'm rerunning now to grab a trace and see if I can figure out why methods jitted is so high. Might just be R2R major version differences between the aspnetcore version I used (pulled from .NET 10) and the .NET runtime version (where we've already bumped the min R2R major version twice) causing all of the R2R code for aspnetcore to be thrown out. |
|
For this reason we usually suggest to benchmark the two locally built versions. You only have to build baseline once. Apples to apples. |
|
That's a tomorrow problem :) |
…ed to not protect against
|
Here's the results after doing an apples-to-apples comparison (Main is locally built from the last merge point into the PR branch) JSON benchmark results
Plaintext benchmark results
With an apples-to-apples comparison, the difference in First Request (ms) goes away (lending credit to the R2R rejection hypothesis) and the PR actually has an improved Requests/sec instead of a slight regression! |
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.
Copilot encountered an error and was unable to review this pull request. You can try again by re-requesting a review.
jkotas
left a comment
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.
Thank you! Great work!
|
/ba-g WBT failures and a spurious infra problem |
Use the shared managed wait subsystem for CoreCLR's managed code instead of the Win32 PAL
Also, remove the named mutex support from the CoreCLR PAL as well as Mutex support.
Unblocks #115685