Liberica Alpaquita Containers Now Come With CRaC
Written by Nikos Vaggalis   
Tuesday, 23 April 2024

Bellsoft has added CRaC support to its ready-to-use Alpaquita container images. This will enable developers to seamlessly integrate CRaC into their projects for performant Java in the Cloud.

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.


 

Bellsoft has recently introduced CRaC into its Liberica OpeJDK builds for both Java version 17 and 21, hence developers could use it to make snapshots of their Java application at runtime in order to reduce startup times to mere milliseconds. So it was only logical that Bellsoft would also release its Alpaquita containers with CRaC support too. And the benchmarks are promising, containers with CRaC provided up to 164x faster startup and 1.1x smaller images in testing with the Petclinic app.

In terms of startup time, the tests yielded the reduction of startup (i.e. time to first operation) from 4935 ms to 30 ms. In terms of size, the size of the generated CRaC image was reduced from 613 MB to 190 MB right after restore. When the application started processing requests, the image size grew to 381 MB after 10, 000 requests but the image size didn’t change afterwards. So the general reduction by 1.1x times is still tangible.

The extra boon is that because Liberica's JDK build is the default runtime for Spring it means that Spring Boot projects can take advantage of the great performance gains immediately. Other projects with CRaC support already are Micronaut and Quarkus while there's a modification of Tomcat that enables CRaC for Spring Boot applications.

As such the Alpaquita containers free up developers to use CRaC in their projects without having to additionally adjust Java or the OS. The containers are available for JDK 17 and 21 and x86_64 architecture, with ARM support coming later in 2024.

alpaquita

More Information

 Alpaquita Containers

Related Articles

Liberica Joins The Java CRaC Train

Making GraalVM-Based Executables Easy

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.

Banner


Looking Forward To NAO 7
03/11/2024

Introduced to the world in 2004 by its creator Bruno Maisonnier the kid-sized, autonomous humanoid robot NAO, turns 20 this year. At less than 2 ft tall, it is small in stature, but plays a big r [ ... ]



Lightbend Announces Akka 3
15/11/2024

Lightbend, the company that developed Akka, has announced Akka 3, and has changed its name to Akka. The company produces cloud-native microservices frameworks, and Akka is used for building distribute [ ... ]


More News

espbook

 

Comments




or email your comment to: comments@i-programmer.info

Last Updated ( Tuesday, 23 April 2024 )