|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.
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.
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.
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
Both builds, for Java 17 and 21, are available for download now.
or email your comment to: firstname.lastname@example.org
|Last Updated ( Monday, 04 December 2023 )