JEP 545, Faster Startup and Warmup with ZGC, has been integrated into JDK 28, moving the work of acquiring and preparing heap memory off the startup path and onto dedicated concurrent worker threads. On Linux 6.1 and later it also upgrades 4 KB pages to 2 MB pages while the application runs. The 2 MB initial heap behind the JEP's headline numbers comes from elsewhere: adaptive heap sizing, in the companion JEP 546, which still defaults to off.
Deploying ZGC has until now meant choosing which half of a trade-off to pay for. The collector's pause times do not grow with the heap, but its collection frequency does, so a small heap brings on early and frequent cycles. The JEP describes the older ergonomic behavior of committing one sixty-fourth of physical memory for the initial heap.
A team chasing fast startup set a tiny -Xms and accepted a long warmup, because the collector then had to acquire and prepare memory in increments while the application was already allocating. A team chasing fast warmup set a large -Xms, usually with -XX:+AlwaysPreTouch, and paid the whole bill before the first request landed. The JEP puts the spread at roughly a tenth of a second to start with a 2 MB heap against more than ten seconds with a 32 GB one on current hardware.
That work now happens in a new thread, ZMemoryWorker, one per heap partition. It commits and uncommits memory concurrently as capacity changes. It also heats memory before application threads reach it, which means pre-touching page by page and collapsing small pages into large ones.
The budget is fixed rather than adaptive. ZConcurrentWorkersCPUShare in zGlobals.hpp is 0.25, so preparation takes at most a quarter of the available CPU. ZGC's director caps young-generation worker counts when adaptive sizing is on, which keeps collection inside its CPU target while expansion continues and the collector deliberately runs above its heuristic heap size target.
Large pages on Linux no longer require an administrator to reserve them up front. ZGC probes for MADV_COLLAPSE, the madvise mode added in Linux 6.1, by mapping a 4 MB region, pre-touching a single page and collapsing an aligned 2 MB range. When the probe succeeds and memory heating is enabled, the collector enters a new Collapse state and upgrades pages in the background. The call races the kernel's khugepaged, so the implementation retries on EAGAIN.
The change shows up in what a deployer no longer has to decide. Where JDK 25 forced a choice between two tunings, JDK 28 offers a third option:
JDK 25, tuned for startup
$ java -XX:+UseZGC -Xms2m -Xmx32g -jar app.jar
JDK 25, tuned for warmup
$ java -XX:+UseZGC -Xms32g -Xmx32g -XX:+AlwaysPreTouch -jar app.jar
JDK 28, neither trade-off
$ java -XX:+UseZGC -XX:+ZAdaptiveHeapSizing -jar app.jar
The third command produces the JEP's case study figures, a 38% drop in startup time and a fall in warmup from 80 seconds to 10 for Spring PetClinic on a 32 GB machine. -XX:+ZAdaptiveHeapSizing takes the minimum and initial heap down to 2 MB and raises the MaxHeapSize ceiling to 100% of physical memory. Without it, ZGC falls back to the shared heap sizing path and a 25% ceiling. Concurrent preparation still runs, but not the aggressive expansion the measurements depend on.
Using identical memory techniques on every operating system is an explicit non-goal, so large pages may be the default on Linux and not on Windows. The JEP also cautions that applications tuned around a larger initial heap may warm up more slowly and need re-tuning.
Two further edges live in the implementation rather than the text. Pairing -XX:+UseLargePages with adaptive sizing and no -Xmx logs a warning and disables explicit large pages for the heap. The retry loop around MADV_COLLAPSE can also spin indefinitely when EAGAIN persists, a case the code attributes to pinning through mlock or long-term DMA and treats as user error.
Teams can see the heap sizing difference for themselves on the JDK 28 early-access builds by comparing the resolved flags:
$ java -XX:+UseZGC -XX:+PrintFlagsFinal -version | grep -E "MinHeapSize|InitialHeapSize|MaxHeapSize"
$ java -XX:+UseZGC -XX:+ZAdaptiveHeapSizing -XX:+PrintFlagsFinal -version | grep -E "MinHeapSize|InitialHeapSize|MaxHeapSize"
The second run drops the minimum and initial sizes to the 2 MB floor and lifts the maximum from a quarter of physical memory to all of it. Adding -Xlog:gc+init reports Memory Heating: Enabled and, once the collapse path is active, Large Page Support: Enabled (Transparent, JVM enforced).
Services already running a modest heap on Linux 6.1 or later pick up concurrent pre-touch and background large pages without touching a flag, because memory heating is on by default. Services carrying a large pre-touched heap purely to buy warmup have something to delete, though only after enabling adaptive sizing. That 100% ceiling reads worse than it behaves. The policy tracks machine-wide memory and holds a reserve, preferring to leave a fifth of the machine free, fighting for a tenth and enforcing a twentieth, with those margins widening when usage is unstable or compressed.
JDK 28 reaches Rampdown Phase One on December 3, 2026, with general availability scheduled for March 9, 2027. The JEP's own future work points at better CPU sharing between concurrent collection and concurrent commit, and at ahead-of-time compilation from JEP 544, already Completed for JDK 28, which frees JIT cycles the memory workers could spend instead.