Four Approaches to Reducing Java Startup Time
summary
Four practical fixes with tradeoffs: Application Class Data Sharing + Spring AOT is trivial to add (pom/docker change) and cuts a 6.5s startup by about 3s; Project Leyden (AOT cache in Java 24/25) drops the same example to ~2.83s by preserving more link/profile data; GraalVM Native Image produces a standalone binary that starts under 1.5s but needs heavy CI resources (minutes, ~16GB) and lots of tuning; Coordinated Restore at Checkpoint (CRaC) resumes memory snapshots to ~0.8s but requires privileged caps, large snapshots and per-connection restore code (MongoDB proxy example).
AI-written summary · about
chapters (16)
- 0:00Introduction
- 3:10Java startup challenges
- 9:14Four approaches to reduce startup time
- 10:22Defender approach: Application Class Data Sharing
- 11:46Demo: ABCDS with Spring Boot
- 17:10Sage approach: Project Leyden
- 18:58Project Leyden benefits and limits
- 21:51Explorer approach: GraalVM Native Image
- 25:28Native Image setup and challenges
- 34:49Native Image startup improvements
- 35:31Rebel approach: CRaC checkpoint/restore
- 36:14CRaC implementation and security
- 40:11CRaC demo and MongoDB
- 44:31CRaC limitations and trade-offs
- 45:13Recap of approaches
- 46:40Q&A
related talks
45mFour Approaches to Reducing Java Startup Time: AppCDS, Native Image, Project Leyden, CRaC
45mProject Leyden: Improving Java’s Startup Time
42mTechniques for a faster JVM start-up
59mRuntime Efficiencies and Spring Boot
46mSimple Tweaks to Get the Most Out of Your JVM
26mGoing Serverless With Spring’s Support for GraalVM, Project CraC & More
52mTechniques for a faster JVM start-up
01h 02mOptimizing Containerized #Java Apps with Jib, #GraalVM, CDS, & #CRaC
