fix for excessive gen0 in high memory load situation#61884
fix for excessive gen0 in high memory load situation#61884Maoni0 merged 2 commits intodotnet:mainfrom
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.
|
PeterSolMS
left a comment
There was a problem hiding this comment.
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.