software engineering5 min read

JEP 545 Moves ZGC Memory Preparation off the Startup Path in JDK 28

  • JDK
  • OpenJDK
  • ZGC
  • Spring PetClinic

AI Summary

JEP 545, integrated into JDK 28, moves ZGC heap memory preparation off the startup path onto dedicated concurrent worker threads, solving the historical trade-off between fast application startup and rapid warmup. On Linux 6.1 and later, it also dynamically upgrades 4 KB pages to 2 MB pages in the background using MADV_COLLAPSE. Combined with adaptive heap sizing, this reduces startup times and significantly accelerates warmup for large memory configurations.

Key Takeaways

  • ZMemoryWorker handles concurrent memory commitment, uncommitment, and heating in JDK 28.
  • Linux 6.1+ features background 2 MB large page upgrades via MADV_COLLAPSE without upfront reservation.
  • Companion JEP 546 enables adaptive heap sizing down to a 2 MB floor.

Why it matters

Understanding how modern garbage collectors handle memory preparation and large page allocation at runtime helps backend engineers optimize JVM performance, eliminate long warmup phases, and choose optimal startup flags without sacrificing throughput.

Conversation0

What would you add from your experience?

Checking your session…

Every good conversation starts with one perspective.