-
Enhancement
-
Resolution: Unresolved
-
P4
-
15
Currently G1 determines a minimum amount of old gen regions every mixed based on the total number of collection set candidates and the G1MixedGCCountTarget by splitting the former evenly over the latter.
A potentially better strategy would be to determine this minimum number based on actual bytes reclaimed per region and the allocation rate between gcs. I.e. given an allocation rate of the mutator between (mixed) gc X and the allocation rate in old gen, the minimum regions could be those N regions that free that amount of space (+ some buffer to actually get back to below IHOP level in finite amount of time). The rest of the available time could be distributed to eden regions to better space out mixed gcs.
At least that would remove the need for the G1MixedGCCountTarget variable which is somewhat hard to tune.
A potentially better strategy would be to determine this minimum number based on actual bytes reclaimed per region and the allocation rate between gcs. I.e. given an allocation rate of the mutator between (mixed) gc X and the allocation rate in old gen, the minimum regions could be those N regions that free that amount of space (+ some buffer to actually get back to below IHOP level in finite amount of time). The rest of the available time could be distributed to eden regions to better space out mixed gcs.
At least that would remove the need for the G1MixedGCCountTarget variable which is somewhat hard to tune.