G1 Becomes the Default GC in JDK 27

JDK 27 G1/Parallel/Serial GC Changes

JDK 27 brings G1 as the default garbage collector across all environments, ending Serial GC's default status. The release includes over 350 GC changes, many focused on refactoring and bug fixes. Key improvements include better heap sizing after Full GC, adaptive concurrent marking, and fixes for humongous object reclamation. Parallel GC sees fixes to tenuring and heap expansion, while TLAB sizing and string deduplication logging improve across all collectors.

We thought that G1 fit the bill of a default collector nicely, and selecting something else depending on arcane environmental conditions was more of a burden than an advantage.
  1. exabrial

    Huge thanks to the OpenJDK Team! I still can't believe we are finding incredible improvements. The JVM is an engineering marvel

  2. kasperni

    Are people still dealing with GC issues?

    I find that it basically just more or less works out of the box on modern JVMs.

  3. smallnix

    > selecting something else depending on arcane environmental conditions was more of a burden than an advantage

    What is being referred to here? Does "else" refer to ZGC, Shenandoah?

    What does arcane env conditions mean?

  4. Traubenfuchs

    If any JDK wizard is present:

    In my opinion, the thing the JRE is REALLY missing is a single process level memory limit setting.

    Nowadays you still have to consider the off heap memory when limiting a JRE processes max memory.

    To clarify: -XX:MaxRAMPercentage should not exist. Instead the process should be told: „You can use x mb/gb of memory. Use of that what you need for offheap and use the rest for heap.“

    That setting is embarassing. Figuring out its value is a mixture of voodoo, vibe-driven guessing and playing the game of „how much wasted memory do you want to risk to prevent a crash?“.

    Give us -XX:MaxProcessMemory=4g please. Why doesn‘t this exist?

  5. stmw

    GC's haven't freed us from manual memory management, you just do all that manual work with environment variables, or making sure to "pick the right collector for the job", or debugging performance or heap size issues, or chasing down weak references or confused finalizers.

More from this day

2026-08-13