Technology

Java 27 removes the app-freezing GC from cheap servers and cuts object memory 33%

Adrian Kessler
Add us on Google

Java 27 ships with two changes that will quietly reach every JVM running anywhere. The G1 garbage collector is now the default on every Java runtime — ending the stop-the-world Serial collector holdout on constrained hardware — and object headers have shrunk from 96 bits to 64 bits, cutting overhead by a third for any application that creates significant numbers of objects.

The Serial collector was Java’s oldest GC: simple, predictable, and brutal. When it ran, it froze the entire application until the heap was cleaned. On large-memory, multi-CPU servers, that trade-off became untenable years ago — G1 replaced Serial as the server default starting with Java 9. Constrained environments continued running Serial through Java 26: single-CPU machines, small cloud VMs, low-memory embedded systems. That default ends with Java 27.

G1 divides the heap into small regions and collects them incrementally, prioritizing the sections with the most garbage first — hence Garbage-First. The pauses still exist, but they are shorter and more predictable than a Serial full collection. Oracle states that G1 is now competitive with Serial at all heap sizes. For developers who deploy applications on the cheapest available cloud instances — one CPU, one gigabyte of RAM — Java 27 removes a friction they have been living with for years.

The compact object headers change is the other half of this release. Java objects carry metadata — type information, hash codes, locking state — stored in a header attached to every object. The old format used 96 bits. Java 27 compresses this to 64 bits, a 33% reduction per object. For applications that create millions of objects — message queues, financial ledgers, event-driven microservices — the cumulative effect is measurable: denser heap, better CPU cache utilization, fewer collection cycles needed.

Both changes carry caveats. Applications tuned explicitly for Serial GC behavior may see unexpected timing differences after upgrading. G1 uses more memory for bookkeeping than Serial, which matters in environments with genuinely tight memory budgets — though Oracle testing indicates the throughput trade-off is negligible for most workloads. Development teams deploying Java 27 on constrained systems should test against the new defaults before shipping. The transition is automatic, but it is not invisible.

Java 27 also adds post-quantum hybrid key exchange for TLS 1.3, implementing the ML-KEM algorithm alongside the existing X25519 elliptic-curve exchange. TLS connections negotiated today could, in theory, be captured and decrypted later by a future quantum computer. Hybrid key exchange defends against that by requiring an attacker to break both a classical and a post-quantum algorithm simultaneously — a meaningful addition for any Java service that handles sensitive data.

Java 27 was released on September 15, 2026, following the platform’s six-month cadence. Structured concurrency and lazy constants continue as preview features in this version. The next long-term support release in the Java series is expected in 2027.

Tags: , , , , ,

Add us on Google

Discussion

There are 0 comments.