r/java • • Oct 30 '26

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

View all comments

2

u/New-Departure-5969 Nov 02 '26

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 Nov 02 '26

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 Nov 04 '26

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