# JEP targeted to JDK 28: 546: Adaptive Heap Sizing for ZGC

DevFeed: [JEP targeted to JDK 28: 546: Adaptive Heap Sizing for ZGC](<https://devfeed.tech/articles/jep-targeted-to-jdk-28-546-adaptive-heap-sizing-for-zgc-89906.md>)

Original publisher: [Read original article](<https://inside.java/2026/10/19/jep546-target-jdk28/>)

Author: Erik Österlund

Published: 2026-10-19T00:00:00Z

Content type: article

Language: en

Sources: [Inside Java](<https://devfeed.tech/sources/inside-java.md>)

Topics: [openjdk](<https://devfeed.tech/topics/openjdk.md>)

Tags: [adaptive](<https://devfeed.tech/tags/adaptive.md>), [case-study](<https://devfeed.tech/tags/case-study.md>), [container](<https://devfeed.tech/tags/container.md>), [cpu](<https://devfeed.tech/tags/cpu.md>), [garbage-collection](<https://devfeed.tech/tags/garbage-collection.md>), [garbage-collectors](<https://devfeed.tech/tags/garbage-collectors.md>), [gc](<https://devfeed.tech/tags/gc.md>), [h2](<https://devfeed.tech/tags/h2.md>), [heap](<https://devfeed.tech/tags/heap.md>), [jdk](<https://devfeed.tech/tags/jdk.md>), [jdk-28](<https://devfeed.tech/tags/jdk-28.md>), [jep](<https://devfeed.tech/tags/jep.md>)

## AI overview

JEP 546 proposes optional adaptive heap sizing for ZGC, enabled with `-XX:+ZAdaptiveHeapSizing`, to balance heap memory against garbage-collection CPU use and respond to resource contention on the host. ZGC expands the heap when GC CPU use exceeds a configurable target intensity and contracts it when use falls below target; it also adjusts heap size to accommodate neighboring processes, prioritizing that behavior over the target. Lower intensity favors less GC CPU use and more memory, while higher intensity favors less memory and more CPU. The proposal aims to remove the need to set `-Xmx` or `SoftMaxHeapSize`, while retaining existing sizing options. Its default maximum would rise from 25% to nearly all physical memory, which could leave other processes short of memory. The case study reports heap adjustments across four JVMs sharing a 16 GB container, with temporary latency and throughput degradation during memory contention.

## Source excerpt

The following JEP is targeted to JDK 28: 546: Adaptive Heap Sizing for ZGC