ZeroDailyGet it on Google Play
Article illustration: JEP 545 Moves ZGC Memory Preparation off the Startup Path in JDK 28

JDK's ZGC Just Ditched Its Awkward Startup Tax

Original headline: JEP 545 Moves ZGC Memory Preparation off the Startup Path in JDK 28 — infoq.com

More in Programming and developer news

JDK 28 has integrated JEP 545, which moves the memory preparation work for the Z Garbage Collector (ZGC) off the main application startup path and onto dedicated background threads. This change tackles a long-standing trade-off for developers using ZGC: either endure a slow initial warm-up with a small heap or pay a steep, upfront time cost by pre-allocating a large heap. The update specifically shifts the tasks of committing memory and preparing large pages to a new `ZMemoryWorker` thread, allowing the main application to start allocating objects almost immediately.

The real-world impact is more predictable and faster startup times for Java applications, especially microservices and serverless functions where launch speed is critical. Developers no longer have to manually choose between configuring a tiny heap (and suffering through frequent early garbage collection cycles) or a massive one (and waiting over ten seconds for pre-touch). The background thread handles memory heating and can even upgrade 4 KB pages to 2 MB pages on modern Linux kernels, all while capping its CPU usage. The key takeaway is a significant quality-of-life improvement that removes a painful configuration decision and makes ZGC's renowned low-pause-time benefits more accessible from the very first request.

Read the original at infoq.com

Satirical commentary on real tech news, summarised with AI. Read the original source for the facts. How ZeroDaily works

Open in the appGet it on Google Play

More stories

Add ZeroDaily on Google