> Markdown version of [/videos/1440-cracing-java-snapshots](https://www.wearedevelopers.com/videos/1440-cracing-java-snapshots). Every page supports `.md` or `Accept: text/markdown`. Links point to the HTML versions so they work for humans too. Agent guide: [/agents.md](https://www.wearedevelopers.com/agents.md). --- # CRaCing Java Snapshots Ditch slow Java startups and lengthy native image builds. Coordinated Restore at Checkpoint (CRaC) captures fully optimized JVM memory states to jumpstart your containerized applications in milliseconds. - **Speakers:** [Pasha Finkelshteyn](https://www.wearedevelopers.com/@pasha-finkelshteyn) - **Event:** World Congress 2025 - **Published:** August 20, 2025 - **Duration:** 29:33 - **URL:** https://www.wearedevelopers.com/videos/1440-cracing-java-snapshots ## Summary Slow Java application startup times and sluggish rollback processes are persistent challenges in production environments. Coordinated Restore at Checkpoint (CRaC) solves this by providing a Linux-only API built on top of Checkpoint/Restore In Userspace (CRIU). By capturing the entire memory state of a running JVM application—including fully optimized compilations—and saving it to disk, CRaC enables near-instant restoration. This methodology drastically improves deployment velocity without the lengthy build times or degraded developer experience associated with native image compilation alternatives. Implementing CRaC in containerized workflows requires a compatible JDK distribution. Running the snapshotting process inside Docker demands proper permissions; granting explicit tracing and checkpoint capabilities ensures operational functionality without resorting to broadly permissive and dangerous container flags. Developers dynamically trigger a snapshot using internal runtime utilities, committing the captured memory state into a new Docker image. When relaunched, modern frameworks with native CRaC support jumpstart execution in milliseconds by bypassing standard initialization entirely. While powerful, state snapshots introduce targeted security and lifecycle risks. The resulting memory dumps contain active secrets, credentials, and states that infrastructure teams must closely secure. Furthermore, unmanaged network connections or open files, such as event streams, break upon restoration. To ensure reliable resumption of service, developers must implement explicit resource interfaces, actively tearing down volatile connections prior to the checkpoint and safely re-establishing them instantly upon restoration. **Keywords:** coordinated restore at checkpoint, java memory snapshots, linux criu implementation, spring boot startup optimization, native image build alternatives, cap_checkpoint_restore privileges, jcmd process snapshotting, compiler optimization caching, custom connection lifecycle management, java rollback deployment speed, active resource disconnection, liberica JDK container deployments ## Chapters 1. **The impact of slow application startup on production deployments** (00:04) — Slow application startup times on the java virtual machine complicate the speed of production rollbacks. 1. **Using Checkpoint Restore In Userspace for Linux memory snapshots** (03:05) — Developers can use the native Linux criu feature to snapshot and restore application memory states. 1. **Limitations of simple snapshotting for desktop and Java applications** (06:02) — Basic memory snapshots often fail to correctly restore UI programs and complex Java virtual machines. 1. **Coordinated Restore at Checkpoint for Java running on Linux** (07:56) — The crac API coordinates safe memory checkpoints for Linux-based Java deployments. 1. **Comparing CRaC performance with GraalVM native image compilation** (09:48) — Software engineering teams must weigh the tradeoffs of native builds versus JVM memory snapshots. 1. **Configuring a Docker container for Java CRaC checkpoint generation** (11:18) — Developers can assign specific Linux kernel capabilities in Dockerfiles to allow safe JVM snapshots. 1. **Generating application checkpoints utilizing the JCMD runtime diagnostic tool** (15:45) — Engineers trigger and commit runtime JVM snapshots by executing the Java command-line diagnostic tool. 1. **Restoring Spring Petclinic execution from a Docker memory snapshot** (18:16) — Launching a previously checkpointed Docker container bypasses standard application initialization delays. 1. **Handling network connections during Java checkpoint and restore cycles** (22:12) — Implementing the Resource interface gracefully disconnects and reconnects proprietary network streams across snapshot restorations. 1. **Best practices for Java snapshot creation and restoration workflows** (28:17) — Orchestrating the CRaC workflow correctly requires explicit Docker commands and careful resource lifecycle management. ## Related Moments - [Running traditional Java applications in constrained containerized environments](https://www.wearedevelopers.com/videos/1595-like-spring-but-faster-the-new-java-jedi) (from "Like Spring, but Faster: The new Java Jedi") - [Implementing priming techniques with checkpoint snapshot hooks](https://www.wearedevelopers.com/videos/1205-high-performance-serverless-java-on-aws) (from "High performance Serverless Java on AWS") - [Optimizing container workloads with Quarkus and lightweight JVMs](https://www.wearedevelopers.com/videos/89-development-of-reactive-applications-with-quarkus) (from "Development of reactive applications with Quarkus") - [Enhancing Java startup speed with GraalVM native images](https://www.wearedevelopers.com/videos/405-build-ultra-fast-in-memory-database-apps-and-microservices-with-java) (from "Build ultra-fast In-Memory Database Apps and Microservices with Java ") - [Building native executables to lower memory and startup times](https://www.wearedevelopers.com/videos/1591-developer-joy-with-quarkus) (from "Developer Joy with Quarkus") - [Evaluating performance tradeoffs between JVM and native images](https://www.wearedevelopers.com/videos/443-going-serverless-using-the-spring-framework-ecosystem) (from "Going serverless using the Spring Framework ecosystem") ## Related Articles - [Building AI Solutions with Rust and Docker](https://www.wearedevelopers.com/magazine/494-building-ai-solutions-with-rust-and-docker) - [Data Science & more: The Lopez dilemma](https://www.wearedevelopers.com/magazine/10-data-science-more-the-lopez-dilemma) - [Introducing Redis Agent Memory Server](https://www.wearedevelopers.com/magazine/699-introducing-redis-agent-memory-server) - [Dev Digest 127 - putting 5 rings on it](https://www.wearedevelopers.com/magazine/464-dev-digest-127-putting-5-rings-on-it) ## Related Jobs - [Java Softwareentwickler - Spring Boot & Microservices](https://www.wearedevelopers.com/jobs/ext/1306817-java-softwareentwickler-spring-boot-microservices) at **Aok Systems Gmbh** - [Senior Backend Engineer (Java)](https://www.wearedevelopers.com/jobs/ext/19369-senior-backend-engineer-java) at **Bonial International GmbH** - [Softwareentwickler Java](https://www.wearedevelopers.com/jobs/ext/1245896-softwareentwickler-java) at **Aok Systems Gmbh** - [Senior Software Engineer, Enterprise Products](https://www.wearedevelopers.com/jobs/ext/1841248-senior-software-engineer-enterprise-products) at **GitHub** - [Cloud Foundations Team](https://www.wearedevelopers.com/jobs/ext/1483289-cloud-foundations-team) at **GitHub** - [Staff Software Engineer, Copilot Experiences](https://www.wearedevelopers.com/jobs/ext/164361-staff-software-engineer-copilot-experiences) at **GitHub**