<!-- mobian-agent-page publisher="dailydev" canonical="https://daily.dev/posts/java-27-s-compact-headers-cut-heap-usage-20-and-g1-is-finally-the-default-everywhere-nrv7kuujy" -->

---
title: Java 27&#x27;s compact headers cut heap usage 20%, and G1 is...
description: Java 27 ships September 15th with nine finalized JEPs. Compact Object Headers (JEP 534) shrinks object headers from 96 to 64 bits by default, cutting heap...
canonical: https://daily.dev/posts/java-27-s-compact-headers-cut-heap-usage-20-and-g1-is-finally-the-default-everywhere-nrv7kuujy
twitter:card: summary_large_image
twitter:site: @dailydotdev
og:type: website
og:site_name: daily.dev
og:title: Java 27&#x27;s compact headers cut heap usage 20%, and G1 is finally the default everywhere | daily.dev
og:description: Java 27 ships September 15th with nine finalized JEPs. Compact Object Headers (JEP 534) shrinks object headers from 96 to 64 bits by default, cutting heap...
og:url: https://daily.dev/posts/java-27-s-compact-headers-cut-heap-usage-20-and-g1-is-finally-the-default-everywhere-nrv7kuujy
og:image: https://api.daily.dev/og/posts/nrV7KUujY.png
og:image:alt: Java 27&#x27;s compact headers cut heap usage 20%, and G1 is finally the default everywhere
og:image:width: 1200
og:image:height: 630
og:locale: en
---

> ## Documentation Index
> Fetch the complete documentation index at: https://daily.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# Java 27's compact headers cut heap usage 20%, and G1 is finally the default everywhere

**[Trends](https://daily.dev/sources/trends)** · 2 min read · 17 upvotes · 0 comments

## Summary

Java 27 ships September 15th with nine finalized JEPs. Compact Object Headers (JEP 534) shrinks object headers from 96 to 64 bits by default, cutting heap usage by roughly 20% and CPU by about 10% with no code changes required. G1GC becomes the default garbage collector everywhere (JEP 523), including small containers that previously silently defaulted to Serial GC. Also finalized: Post-Quantum Hybrid Key Exchange in TLS 1.3 (JEP 527) and JFR redaction of sensitive JVM arguments and environment variables by default (JEP 536). Preview work continues on Structured Concurrency and the Vector API (twelfth incubator round), both targeting JDK 28. Behavioral changes include HttpServer switching from prefix to path segment matching, removal of finalize() from ThreadPoolExecutor, changed JNDI/LDAP defaults, and removal of java.locale.useOldISOCodes support.

## Content

Java 27 shipped September 15 with nine JEPs, and the headline features are genuinely useful: G1 is now the default garbage collector everywhere (yes, even in single-CPU containers that used to get Serial GC), compact object headers are on by default cutting heap usage by roughly 22% and GC pauses by 15% with zero code changes, and post-quantum hybrid key exchange lands in TLS 1.3 to defend against harvest-now-decrypt-later attacks. Flight Recorder also redacts secrets like tokens and passwords from recordings by default now, which is the kind of thing you don't think about until you really need it.

The compact object headers number is the one worth sitting with. Shrinking object headers from 12 to 8 bytes sounds like plumbing, but a 22% heap reduction and 8% CPU drop on SPECjbb2015 benchmarks with no application changes is the kind of free lunch Java rarely hands out. Josh Long (starbuxman) called it his favorite feature in the release, and it's hard to argue.

The post-quantum story has a catch, though. JDK 27 gets it now, but teams on older LTS versions are waiting: JDK 25 gets it in October, JDK 21 and 17 in the first half of 2027, and JDK 8 and 11 not until the second half of 2027. If you're on an older LTS and worried about harvest-now-decrypt-later, that timeline is uncomfortable.

The quieter controversy is the removal of JVMCI, the JVM Compiler Interface that let GraalVM's JIT plug into HotSpot. Oracle's position is that after separating GraalVM from OpenJDK, maintaining 252 conditional blocks across shared compiler and runtime code wasn't worth it. Amazon's Paul Hohensee pushed back, citing real dependents: GraalJS, JRuby, TornadoVM. That objection didn't change the outcome.

Five JEPs remain in preview or incubation, including Structured Concurrency (seventh preview, with API changes again) and the Vector API, which is stuck in its twelfth and supposedly final incubator round waiting on Project Valhalla. Valhalla value classes are now targeting JDK 28 as a preview, with JDK 29 as the next LTS. Twelve years of Valhalla work, 179,000 lines across 1,800 files, and it's still not final.

Java 27 is a non-LTS release with support only through March 2027. For most teams, the compact object headers and G1 default changes are the practical story. The post-quantum work matters more for teams who can actually upgrade.

## Questions this post answers

### What does JEP 534 compact object headers do in Java 27?

JEP 534 shrinks Java object headers from 96 bits to 64 bits and is enabled by default in Java 27, released September 15th. This reduces heap usage by roughly 20% and CPU usage by about 10% on typical workloads without requiring any code changes, making it a free performance improvement for existing applications.

_Teams planning a Java 27 upgrade can track JEP details like this one on daily.dev._

### Why did my Java app's garbage collection behavior change after upgrading in a small Docker container?

Small containers previously defaulted silently to Serial GC instead of G1GC due to low detected resource limits. JEP 523 in Java 27 makes G1GC the default garbage collector everywhere, including small containers, so GC behavior in constrained environments should now be more consistent with larger deployments.

_daily.dev helps developers debugging container GC quirks stay on top of JVM defaults like this._

### What breaking change affects HttpServer routing in Java 27?

HttpServer switches from prefix string matching to path segment matching in Java 27, which can break routing code that relied on the old prefix-matching behavior. Other behavioral changes in the same release include removal of finalize() from ThreadPoolExecutor and removed support for java.locale.useOldISOCodes.

_Developers auditing upgrade risk can follow breaking changes like this HttpServer shift on daily.dev._

---

Tags: [#performance](https://daily.dev/tags/performance), [#java](https://daily.dev/tags/java)

[View this post on daily.dev](https://daily.dev/posts/java-27-s-compact-headers-cut-heap-usage-20-and-g1-is-finally-the-default-everywhere-nrv7kuujy)

```json
{"@context":"https://schema.org","@graph":[{"@type":"Organization","@id":"https://daily.dev/#organization","name":"daily.dev","url":"https://daily.dev","logo":{"@type":"ImageObject","url":"https://daily.dev/apple-touch-icon.png","width":180,"height":180},"sameAs":["https://twitter.com/dailydotdev","https://github.com/dailydotdev","https://www.linkedin.com/company/daily-dev-ltd"]},{"@type":"WebSite","@id":"https://daily.dev/#website","url":"https://daily.dev","name":"daily.dev","publisher":{"@id":"https://daily.dev/#organization"},"potentialAction":{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https://daily.dev/search?q={search_term_string}"},"query-input":"required name=search_term_string"}}]}
{"@context":"https://schema.org","@type":"TechArticle","headline":"Java 27's compact headers cut heap usage 20%, and G1 is finally the default everywhere","url":"https://daily.dev/posts/java-27-s-compact-headers-cut-heap-usage-20-and-g1-is-finally-the-default-everywhere-nrv7kuujy","mainEntityOfPage":{"@type":"WebPage","@id":"https://daily.dev/posts/java-27-s-compact-headers-cut-heap-usage-20-and-g1-is-finally-the-default-everywhere-nrv7kuujy"},"datePublished":"2026-09-10T11:06:00.976Z","dateModified":"2026-09-17T01:07:30.901Z","description":"Java 27 ships September 15th with nine finalized JEPs. Compact Object Headers (JEP 534) shrinks object headers from 96 to 64 bits by default, cutting heap...","image":"https://media.daily.dev/image/upload/f_auto,q_auto/v1/posts/bc8360c7f1d7e1d1f4914c9e208bca3a?_a=AQAEuop","thumbnailUrl":"https://media.daily.dev/image/upload/f_auto,q_auto/v1/posts/bc8360c7f1d7e1d1f4914c9e208bca3a?_a=AQAEuop","isAccessibleForFree":true,"articleSection":"Trends","inLanguage":"en","publisher":{"@type":"Organization","name":"daily.dev","url":"https://daily.dev","logo":{"@type":"ImageObject","url":"https://daily.dev/apple-touch-icon.png","width":180,"height":180}},"author":{"@type":"Organization","name":"Trends","logo":"https://media.daily.dev/image/upload/s--ZfSp3asX--/f_auto,q_auto/v1780996004/logos/trends?_a=BAMAMiWQ0","url":"https://daily.dev/sources/trends"},"commentCount":0,"discussionUrl":"https://daily.dev/posts/java-27-s-compact-headers-cut-heap-usage-20-and-g1-is-finally-the-default-everywhere-nrv7kuujy","interactionStatistic":[{"@type":"InteractionCounter","interactionType":{"@type":"LikeAction"},"userInteractionCount":17},{"@type":"InteractionCounter","interactionType":{"@type":"CommentAction"},"userInteractionCount":0}],"keywords":"performance,java","timeRequired":"PT2M"}
{"@context":"https://schema.org","@type":"BreadcrumbList","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https://daily.dev"},{"@type":"ListItem","position":2,"name":"Trends","item":"https://daily.dev/sources/trends"},{"@type":"ListItem","position":3,"name":"Java 27's compact headers cut heap usage 20%, and G1 is finally the default everywhere"}]}
{"@context":"https://schema.org","@type":"FAQPage","@id":"https://daily.dev/posts/java-27-s-compact-headers-cut-heap-usage-20-and-g1-is-finally-the-default-everywhere-nrv7kuujy#faq","mainEntity":[{"@type":"Question","name":"What does JEP 534 compact object headers do in Java 27?","acceptedAnswer":{"@type":"Answer","text":"JEP 534 shrinks Java object headers from 96 bits to 64 bits and is enabled by default in Java 27, released September 15th. This reduces heap usage by roughly 20% and CPU usage by about 10% on typical workloads without requiring any code changes, making it a free performance improvement for existing applications. Teams planning a Java 27 upgrade can track JEP details like this one on daily.dev."}},{"@type":"Question","name":"Why did my Java app's garbage collection behavior change after upgrading in a small Docker container?","acceptedAnswer":{"@type":"Answer","text":"Small containers previously defaulted silently to Serial GC instead of G1GC due to low detected resource limits. JEP 523 in Java 27 makes G1GC the default garbage collector everywhere, including small containers, so GC behavior in constrained environments should now be more consistent with larger deployments. daily.dev helps developers debugging container GC quirks stay on top of JVM defaults like this."}},{"@type":"Question","name":"What breaking change affects HttpServer routing in Java 27?","acceptedAnswer":{"@type":"Answer","text":"HttpServer switches from prefix string matching to path segment matching in Java 27, which can break routing code that relied on the old prefix-matching behavior. Other behavioral changes in the same release include removal of finalize() from ThreadPoolExecutor and removed support for java.locale.useOldISOCodes. Developers auditing upgrade risk can follow breaking changes like this HttpServer shift on daily.dev."}}]}
```

