Liberica Joins The Java CRaC Train
Written by Nikos Vaggalis   
Monday, 04 December 2023

CRaC is a novel technique that makes the JVM faster to start.
Liberica's JDK build has just added support for it. Here are the details.

Is CRaC the magic recipe to Java's warm up problems?

The JVM is notorious for its hefty requirements in startup and warmup times. The main reason for the slow startup is that it takes much time to load, link, and initialize classes. Of course we are talking micro-seconds here but the delay can make a difference when trying to spin VMs on the Cloud and run Microservices. There are ideas for speeding things up and CRaC is one of them.

CRaC stands for Coordinated Restore at Checkpoint. It is an API that helps to coordinate the JDK and an application's resources under a checkpoint/restore mechanism.
It allows applications to, for instance, close open files, dump their cache, and snapshot the required state for them to come alive when restored back.

As such the primary aim of the project is to offer a standard mechanism-agnostic API to notify Java programs about the checkpoint and restore events.

In contrast to GraalVM and AOT, CRaC retains the full power of JIT compilation and leverages the checkpoint mechanism.

Back in June, Azul Zulu OpenJDK 17 adopted CRaC and later on Azul, again with ReadyNow, offered Crac at a platform level.
ReadyNow monitors your Java application for usage patterns and the most efficient optimizations, then builds a profile of those optimizations. The next time you start your application the JVM immediately performs those optimizations, getting your application to full speed as quickly as possible.


Bellsoft is now the next vendor to build CRaC into its OpeJDK builds, offering it in Liberica for both Java version 17 and 21, so that developers are able to make running application snapshots to reduce the startup and warmup time of Java application to mere milliseconds. And because Liberica's build is the default runtime for Spring it means that Spring Boot projects can take advantage of the great performance gains.

As a matter of fact, in initial tests Liberica run on the showcase Spring Boot Petclinic application, the time to first operation was reduced from 7. 1 seconds to 54 milliseconds without additional configuration. The new builds are available for x86_64 AArch64 CPU architectures and Linux operating system, however they are not yet verified by TCK.

To understand how to use the new feature and find out how it can benefit your projects, Liberica has released a good tutorial
"How to use CRaC with Java applications" to get you started.

Both builds, for Java 17 and 21, are available for download now.





More Information

BellSoft releases Liberica JDK LTS 17 and 21 with Coordinated Restore at Checkpoint (CRaC) for fast startup

Related Articles

Azul To Tackle Java's Warm Up Issues


To be informed about new articles on I Programmer, sign up for our weekly newsletter, subscribe to the RSS feed and follow us on Twitter, Facebook or Linkedin.


Access LLMs From IntelliJ With Devoxx Genie

Devoxx Genie is a fully Java-based LLM Code Assistant plugin for IntelliJ IDEA, designed to integrate with local and cloud LLM providers.

Udacity Offers More AWS Scholarships

Udacity has announced it is accepting applications for the next wave of 1,000 AWS AI & ML Scholarships. Any student over the age of 16 who self-identifies as under-served or under-represented in t [ ... ]

More News

kotlin book



or email your comment to:

Last Updated ( Tuesday, 23 April 2024 )