-
Notifications
You must be signed in to change notification settings - Fork 4.7k
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
fix for excessive gen0 in high memory load situation #61884
Conversation
Tagging subscribers to this area: @dotnet/gc Issue Detailsin high memory load situations, when we had to wait for a BGC to finish, we switch to preemptive mode which means GCs can occur and replenished the budget. but when we come back from the wait, we use the previous decision on whether the budget was exceeded or not. this causes us to trigger GC incorrect and you would see GCs triggered when the allocated bytes are tiny. repro -
when memory load is high (I made it 97%), using GC realmon this is the output - the
with fix this no longer repros. also got rid of the allocations_allowed check that's unused. @PeterSolMS I did put it a bit more logic to detect whether I should do the check again. PTAL.
|
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.
LGTM, but note suggestion to make it more readable...
in high memory load situations, when we had to wait for a BGC to finish, we switched to preemptive mode which means GCs could have occurred and replenished the budget. but when we come back from the wait, we use the previous decision on whether the budget was exceeded or not. this causes us to trigger GC incorrect and you would see GCs triggered when the allocated bytes are tiny.
repro -
when memory load is high (I made it 97%), using GC realmon this is the output - the
gen0 alloc (mb)
column shows some gen0 GCs triggered when it's < 1mb or just a few mb instead of hundreds of mb -with fix this no longer repros.
also got rid of the allocations_allowed check that's unused.
@PeterSolMS I did put in a bit more logic to detect whether I should do the check again. PTAL.