-
Notifications
You must be signed in to change notification settings - Fork 4.9k
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
Try reducing memory pressure during object writing #83181
Conversation
Tagging subscribers to this area: @agocke, @MichalStrehovsky, @jkotas Issue DetailsThis is likely going to be a compile time regression, because we're close to finishing the compilation and the managed memory is going to be freed by the ultimate garbage collector: process termination. But it looks like we're getting OOM-killed for larger apps around here. The native object writer is going to allocate more native memory without giving the managed GC see there's memory pressure. We might be able to tune this with Hoping to unblock dotnet/performance#2919. Cc @dotnet/ilc-contrib @markples
|
src/coreclr/tools/aot/ILCompiler.Compiler/Compiler/DependencyAnalysis/ObjectWriter.cs
Outdated
Show resolved
Hide resolved
src/coreclr/tools/aot/ILCompiler.Compiler/Compiler/DependencyAnalysis/ObjectWriter.cs
Outdated
Show resolved
Hide resolved
src/coreclr/tools/aot/ILCompiler.Compiler/Compiler/DependencyAnalysis/ObjectWriter.cs
Outdated
Show resolved
Hide resolved
src/coreclr/tools/aot/ILCompiler.Compiler/Compiler/DependencyAnalysis/ObjectWriter.cs
Outdated
Show resolved
Hide resolved
src/coreclr/tools/aot/ILCompiler.Compiler/Compiler/DependencyAnalysis/ObjectWriter.cs
Outdated
Show resolved
Hide resolved
Co-authored-by: Jan Kotas <[email protected]>
src/coreclr/tools/aot/ILCompiler.Compiler/Compiler/DependencyAnalysis/ObjectWriter.cs
Outdated
Show resolved
Hide resolved
@vitek-karas The "Build CoreCLR Tools Unit Tests linux x64 checked" leg is failing in this PR. Digging in the CI logs, the failure is:
The CI run in your recent #83085 appears to have run only 305 tests, so this looks like a bad interaction between two PRs. |
The latest run in the performance repo is still failing. The heuristic is not kicking in (patting myself on the back for adding logging ("
Since Should we pull out the heuristic and go with what was there originally? |
We can give it a try. I think it would be still worth it to have some heuristic eventually to avoid the useless blocking full GC when there is a plenty of memory available. Maybe 50% is too high - it may need to be less, like 20%. |
|
Or perhaps you should look at something like |
The typical compilation has many GCs. The number from last GC should be good-enough approximation. The check can be very conservative. |
This is likely going to be a compile time regression, because we're close to finishing the compilation and the managed memory is going to be freed by the ultimate garbage collector: process termination.
But it looks like we're getting OOM-killed for larger apps around here. The native object writer is going to allocate more native memory without giving the managed GC see there's memory pressure. We might be able to tune this with
GC.AddMemoryPressure
once we have some sort of estimate of native memory used by the native object writer.Hoping to unblock dotnet/performance#2919.
Cc @dotnet/ilc-contrib @markples