JEP 545, titled 'Faster Startup and Warmup with ZGC', has been integrated into JDK 28. This update moves the process of acquiring and preparing heap memory for ZGC from the application's startup path to dedicated concurrent worker threads. This change addresses a long-standing trade-off where users had to configure ZGC for either fast startup (small initial heap) or fast warmup (large initial heap with pre-touching).
On Linux kernel version 6.1 and later, JEP 545 also introduces the ability to upgrade 4 KB memory pages to 2 MB pages while the application is running. This is achieved by probing for MADV_COLLAPSE, a madvise mode added in Linux 6.1. When successful and memory heating is enabled, ZGC enters a new 'Collapse' state to perform these page upgrades in the background.
The memory preparation work is now handled by a new thread called ZMemoryWorker, with one thread per heap partition. This worker thread commits and uncommits memory concurrently as heap capacity changes. It also 'heats' memory by pre-touching pages and collapsing small pages into large ones before application threads access them.
The CPU budget for this memory preparation is fixed, set at 0.25 of available CPU via ZConcurrentWorkersCPUShare. While JEP 545 improves memory preparation, the 2 MB initial heap mentioned in its context is related to adaptive heap sizing, which is part of the companion JEP 546 and remains off by default. ZGC's director manages young-generation worker counts when adaptive sizing is active, ensuring collection stays within its CPU target even as heap expansion continues.
This integration means deployers no longer need to make a critical decision between optimizing for startup speed or warmup performance when using ZGC. Previously, starting with a 2 MB heap could take a tenth of a second, while a 32 GB heap with pre-touching could take over ten seconds. The new concurrent approach removes this dilemma, allowing for better performance across both metrics without manual configuration trade-offs.
✨ This summary was generated by AI from the outlets' reporting listed below. It is not independently verified and may contain errors — check the original sources. How BrevFeed works →
One email each morning: the day's tech stories, clustered across outlets and summarized. No account needed.
One email a day. Unsubscribe in one click, any time.
Spend a few minutes, get the whole day. Every topic's top stories in one hands-free rundown — listen, watch, or read the transcript.
▶ Play today's briefNew every morning, and the back catalogue is archived by date.
JEP 545 has been integrated into JDK 28, shifting ZGC heap memory acquisition and preparation to concurrent worker threads, improving startup and warmup times. This change allows ZGC to upgrade 4 KB pages to 2 MB pages on Linux 6.1+ during application runtime, removing the need for developers to choose between fast startup or fast warmup configurations.