Skip to content

Commit

Permalink
datas tuning fix (#98743)
Browse files Browse the repository at this point in the history
+ Change the HC (heap count) adjustment based on history and how successful the previous adjustment was -
  + looking at the trending of this buffer and using it to detect if things look stable or if they are
    trending up/down (and if so how fast is that trend) and make a decision if we want to grow/shrink according to our calculation
  + previous we barely ever shrank the HC, with this change we shrink as needed
  + if we just grew and the calculation says to grow again, we grow more aggressively
  + if we just shrink but the tcp didn't come down, and the calculation says to shrink again, we should avoid shrinking for a while
+ One of the reasons for outliers is something temporarily affected GC work. We pick the min tcp if the survival is very stable to avoid counting these outliers.
+ Added simple gen2 handling for BGC.
+ Bug fixes - 
  + When we change the heap count, we should not be refreshing all new heaps' budget which will cause a spike in heap size. If the budget is already partially used we should use up the existing budget and let the next GC will refresh it.
  + Don't carry stcp over when HC is changed - it doesn't make sense since the estimated stcp is bogus
  + Don't add the first sample as it's artificially skewed by startup time

There are a few issues with these that will be addressed in future checkins -

+ the aggressiveness factor needs to be capped and also it needs to discard history if history is too distant
+ growth is too aggressive for large tcps which causes an initial spike when we look at heap counts
+ recognize when the slope direction changes, ie, trending upward <-> downward and discard older entries as appropriate
  • Loading branch information
Maoni0 authored Feb 23, 2024
1 parent 00874d6 commit b07134a
Show file tree
Hide file tree
Showing 3 changed files with 660 additions and 110 deletions.
1 change: 1 addition & 0 deletions src/coreclr/gc/env/common.h
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
#include <stdarg.h>
#include <memory.h>
#include <limits.h>
#include <math.h>

#include <new>

Expand Down
Loading

0 comments on commit b07134a

Please sign in to comment.