[jdk21u-dev] RFR: 8314573: G1: Heap resizing at Remark does not take existing eden regions into account

Liang Mao lmao at openjdk.org
Tue Apr 9 02:54:13 UTC 2024


On Thu, 4 Apr 2024 19:52:07 GMT, Goetz Lindenmaier <goetz at openjdk.org> wrote:

>> Clean backport of fix of G1 Heap resizing heuristics at remark
>> 
>> Additional testing:
>>  - [x] Linux aarch64 server release/fastdebug, test/hotspot/jtreg/gc with +UseG1GC
>
> Hi @mmyxym, I don't think the risk is that low.
> After all, someone opened [JDK-8315866](https://bugs.openjdk.org/browse/JDK-8315866) because his GC behaved differently. Something like this can obstruct a producitve system.

@GoeLin ,@jerboaa,I have noticed the original issue that heap resizing counted eden region size since the original JEP346 arrived in JDK12. The heap resizing heuristics in G1 remark Pause is similar to the one in Full GC which will estimate the heap capacity based on live set size. But counting of eden region size as part of live set will make the resizing behavior unexpected due to random eden use at remark pause . Only counting old objects as live set is more reasonable. As @tschatzl described in [JDK-8315866](https://bugs.openjdk.org/browse/JDK-8315866), the behavior is expected which uses less memory for more gc activity.

-------------

PR Comment: https://git.openjdk.org/jdk21u-dev/pull/429#issuecomment-2044060357


More information about the jdk-updates-dev mailing list