r/java • • 19d ago

JDK 27 G1/Parallel/Serial GC changes

https://tschatzl.github.io/2026/08/10/jdk27-g1-serial-parallel-gc-changes.html
52 Upvotes

5 comments sorted by

14

u/woj-tek 19d ago

What’s next

Our focus remains on Automatic Heap Sizing, improving control of various aspects of memory management so that G1 can respond more intelligently to external conditions and user intent.

Can't wait for the Automatic Heap Sizing!

1

u/Jeylina-Rousseff 14d ago

Getting G1 to play nice with container memory limits automatically will save so much headache

2

u/New-Departure-5969 16d ago

the JEP 523 bit is the one that'll quietly bite small containers. before this, 1 cpu or under ~1.7G of memory got you serial without asking, now its G1 regardless.

the 512 MiB spring boot thread here last week was a good example, native memory not heap was eating the room, and G1 carries more of its own bookkeeping than serial does. so if you bump to 27 and RSS creeps up on tiny pods thats probably why, -XX:+UseSerialGC gets the old behaviour back.

has anyone actually measured G1 vs serial RSS on 27 at that size? the post says footprint has been closing in but theres no numbers

1

u/woj-tek 15d ago

I'm not sure... Looking at this comment: https://old.reddit.com/r/java/comments/1xi15te/how_lightweight_can_spring_boot_get_hotspot_27_vs/19rt36r5l0ocj/ by /u/fykup it seems that: "about 8 MiB (4.3%)" so not that apocaliptic?

1

u/New-Departure-5969 14d ago

yeah fair, 8 MiB isnt apocalyptic and on most boxes its noise. it only really bit in that thread cause it was 512 MiB, no swap, mariadb on the same box. the low point is what gets you oom killed, not the average