JDK 27 GC Updates Make G1 Default Runtime Engine Across All Environments
Maintainers resolved approximately 350 changes across the HotSpot VM, standardizing default memory management and refining dynamic heap sizing ahead of OpenJDK 28.

As the Java ecosystem prepares for the upcoming OpenJDK 28 release, open-source maintainers have detailed the technical milestones completed in JDK 27, highlighting approximately 350 individual updates delivered to the HotSpot Virtual Machine's garbage collection subcomponent. Among the most significant updates is JEP 523, which establishes the Garbage-First collector as the default engine across all execution environments when no specific collector is designated on the command line.
First reported on Hacker News, the decision to elevate G1 to the default choice across all deployment setups reflects years of performance convergence between G1 and legacy alternatives like Serial GC. Maintainers noted that G1's throughput, memory footprint, and latency profiles now closely match or surpass Serial GC even in smaller execution contexts. Engineering teams requiring legacy behavior can still explicitly enable Serial GC using the -XX:+UseSerialGC option, but automated fallbacks based on environment detection have been eliminated.
The technical review revealed that roughly half of the 350 closed issues in JDK 27 focused on underlying code refactoring and architecture cleanups. A major portion of this work involved replacing legacy thread-shared variable idioms—previously relying on volatile declarations and explicit AtomicAccess operations—with the unified Atomic<T> abstraction introduced under JDK-8367013. Engineers also overhauled G1 state machine mechanics and established baseline support for JEP 401 Value Objects, adapting object iterators and eager reclamation routines for preview value types.
Bug fixes and system stability updates constituted another 35% of the total commit log. Among the key correctness patches, tickets JDK-8378331 and JDK-8378336 addressed an issue where reclaimable humongous objects were inadvertently kept active in memory by lingering weak references. Additionally, ticket JDK-8373894 corrected an accounting flaw where garbage collection attempts that failed to find sufficient space to copy objects were omitted from GC CPU usage metrics, which had previously caused flawed heap-sizing decisions.
G1 received additional architectural updates aimed at preventing conflicting heuristics during dynamic heap sizing. Under JDK-8238686, default values for -XX:MinHeapFreeRatio and -XX:MaxHeapFreeRatio were shifted to 0% and 100%, down and up from 40% and 70% respectively, preventing Full GC heap adjustments from overriding CPU usage-based scaling rules. Furthermore, tickets JDK-8379846 and JDK-8381006 introduced fixes to make adaptive concurrent marking triggers more resilient against adverse operational workloads that previously spurred unnecessary marking work.
Beyond G1, the Parallel GC collector received critical fixes to its adaptive tenuring algorithm under JDK-8380590. Previously, the threshold determining when objects transition from the young generation to the old generation tended only to increase, causing older objects to crowd survivor spaces and force premature promotion of short-lived allocations. The updated mechanism allows the threshold to decrease dynamically when necessary. Additionally, JDK-8377561 resolved an issue where Parallel GC failed to expand the Java heap during repeated large allocations, which had previously caused thousands of unnecessary Full GCs.
General memory management refinements in JDK 27 also targeted Thread-Local Allocation Buffers (TLABs). Under JDK-8381834, TLAB sizing heuristics were modified to better handle applications spawning large volumes of lightly allocating, short-lived threads, reducing memory waste and preventing premature collection cycles. For diagnostics, ticket JDK-8372348 enhanced string deduplication tracking across standard logs and Java Flight Recorder events, adding aggregate byte metrics and new categories for previously untracked string allocations.
Looking ahead, the OpenJDK team indicated that ongoing development will remain centered on Automatic Heap Sizing and refining memory controls so that G1 can respond dynamically to external system conditions. With foundational refactorings like Atomic<T> now completed, engineers expect to dedicate expanded resources toward performance capabilities in upcoming release cycles.
Sources
Written by
The Company Wire
Inside the companies building what’s next. Reporting on startups, technology, funding and the people shaping them.



