Return to site

☕🗑️ JDK 27 is NEARING RELEASE: G1 becomes the DEFAULT GC EVERYWHERE

· java

Inspired by David Delabassee’s OpenJDK Quality Outreach summer update.

JDK 27 has entered Rampdown Phase 2 (RDP2), meaning its feature set is effectively frozen and only low-risk fixes or enhancements may still be considered.

General availability is currently planned for 15 September 2026. The first release candidate builds should arrive after RDP2 concludes.

🔸 TLDR

JDK 27 standardizes the JVM’s default garbage collector behavior.

When no GC is explicitly configured, G1 will now be selected in every environment, including containers and machines with only one CPU or less than 1792 MB of memory.

This does not mean that Serial GC is being removed (or that every application must switch).

🔸 WHY IS G1 BECOMING THE DEFAULT?

Previously, HotSpot could automatically choose Serial GC in constrained environments because it historically offered better throughput and a smaller footprint there.

Recent improvements have made G1 competitive in those environments, while generally providing lower maximum pause times.

Using one consistent default also makes JVM behavior easier to understand and predict.

🔸 WHICH APPLICATIONS MAY BE AFFECTED?

Your application is potentially affected only when it:

▪️ Runs with one CPU or less than 1792 MB of physical memory

▪️ Does not explicitly select a garbage collector

▪️ Previously relied on the JVM automatically choosing Serial GC

Applications already using options such as -XX:+UseSerialGC, -XX:+UseG1GC or another explicitly selected GC will keep that configuration.

Serial GC also remains available in JDK 27.

🔸 WHAT SHOULD DEVELOPERS DO?

▪️ Test applications and container configurations with JDK 27 now

▪️ Benchmark G1 and Serial GC for constrained workloads

▪️ Check throughput, native memory usage and latency (not only average performance)

▪️ Explicitly select Serial GC when preserving its existing characteristics matters

▪️ Start testing future compatibility with JDK 28 early-access builds

🔸 OTHER JDK 27 HIGHLIGHTS

JDK 27 also includes:

▪️ Compact Object Headers enabled by default

▪️ Post-quantum hybrid key exchange for TLS 1.3

▪️ JFR in-process data redaction

▪️ Structured Concurrency’s seventh preview

▪️ Primitive types in patterns and switch

▪️ Lazy Constants and PEM encoding previews

The takeaway is not that G1 is automatically the best GC for every workload.

It is now the JVM’s consistent default; but production decisions should still be supported by measurements.

#Java #JDK27 #OpenJDK #JVM #GarbageCollection #G1GC #SerialGC #JavaPerformance #JavaDevelopers #SoftwareEngineering

Go further with Java certification:

Java👇

Spring👇

SpringBook👇

JavaBook👇