← All stories
● Covered by 1 source · 1 reportMedium impact1 neutral

JEP 545 Integrates into JDK 28, Moving ZGC Memory Preparation Off Startup Path

🔄 Updated 2d ago
New to BrevFeed? We gather this story from every outlet covering it into one summary — ranked by real-world impact, not just the latest headline — so you never miss what matters. What is BrevFeed? →

Key points

  • JEP 545 moves ZGC memory preparation to concurrent worker threads in JDK 28.
  • Improves startup and warmup times by offloading memory work.
  • Upgrades 4 KB pages to 2 MB pages on Linux 6.1+ during runtime.
  • Eliminates previous trade-off between fast startup and fast warmup for ZGC.

Concurrent Memory Preparation

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).

Dynamic Page Upgrades on Linux

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.

New ZMemoryWorker Thread

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.

CPU Budget and Adaptive Sizing

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.

Impact on Deployment

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 →

The daily brief

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.

Today's brief

Spend a few minutes, get the whole day. Every topic's top stories in one hands-free rundown — listen, watch, or read the transcript.

~4 min · 3 stories · Nov 26

▶ Play today's brief Listen on Spotify

New every morning, and the back catalogue is archived by date.

Reporting from

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.