<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Coordinated Restore at Checkpoint on CRaC</title><link>https://crac.org/</link><description>Recent content in Coordinated Restore at Checkpoint on CRaC</description><generator>Hugo</generator><language>en-GB</language><atom:link href="https://crac.org/index.xml" rel="self" type="application/rss+xml"/><item><title>Spring Boot</title><link>https://crac.org/frameworks/spring-boot/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://crac.org/frameworks/spring-boot/</guid><description>&lt;p&gt;Spring Boot provides CRaC support as of version 3.2, for more details see:&lt;/p&gt;&#10;&lt;ul&gt;&#10;&lt;li&gt;&lt;a href="https://spring.io/blog/2023/10/16/runtime-efficiency-with-spring#jvm-checkpoint-restore-scale-to-zero-with-spring-and-project-crac" target="_blank" rel="noopener"&gt;Scale to zero with Spring and Project CRaC&lt;/a&gt;&#10;&lt;/li&gt;&#10;&lt;li&gt;&lt;a href="https://docs.spring.io/spring-boot/docs/current/reference/html/deployment.html#deployment.efficient.checkpoint-restore" target="_blank" rel="noopener"&gt;Spring Boot documentation for Project CRaC support&lt;/a&gt;&#10;&lt;/li&gt;&#10;&lt;li&gt;&lt;a href="https://docs.spring.io/spring-framework/reference/integration/checkpoint-restore.html" target="_blank" rel="noopener"&gt;Spring Framework documentation for Project CRaC support&lt;/a&gt;&#10;&lt;/li&gt;&#10;&lt;/ul&gt;&#10;&lt;p&gt;Examples:&lt;/p&gt;</description></item><item><title>Best practices</title><link>https://crac.org/reference/best-practices/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://crac.org/reference/best-practices/</guid><description>&lt;h2 id="best-practices-for-implementing-crac-support-in-your-applicationlibrary"&gt;Best practices for implementing CRaC support in your application/library&lt;/h2&gt;&#10;&lt;p&gt;This guide assumes you are already familiar with the concepts and &lt;code&gt;Resource&lt;/code&gt; API; please check out the &lt;a href="https://github.com/CRaC/docs/blob/master/STEP-BY-STEP.md" target="_blank" rel="noopener"&gt;step-by-step guide&lt;/a&gt;&#10; for those.&lt;/p&gt;&#10;&lt;h3 id="implementing-resource-as-inner-class"&gt;Implementing Resource as inner class&lt;/h3&gt;&#10;&lt;p&gt;In order to encapsulate the functionality, the &lt;code&gt;Resource&lt;/code&gt; interface is sometimes not implemented directly by the component but we rather create an (anonymous) inner class. However it is not sufficient to pass this resource to the &lt;code&gt;Context.register()&lt;/code&gt; method; Global Context tracks resources using &lt;em&gt;weak&lt;/em&gt; references. As there is no &lt;code&gt;unregister&lt;/code&gt; method on the Context, had a strong reference been used this would prevent the component from being garbage-collected when the application releases it. Therefore the class implementing &lt;code&gt;Resource&lt;/code&gt; should be stored inside the component (in a field) to prevent garbage-collection:&lt;/p&gt;</description></item><item><title>Quarkus</title><link>https://crac.org/frameworks/quarkus/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://crac.org/frameworks/quarkus/</guid><description>&lt;p&gt;Basic CRaC support is a part of Quarkus &lt;a href="https://github.com/quarkusio/quarkus/pull/23950" target="_blank" rel="noopener"&gt;since 2.10.0&lt;/a&gt;&#10;.&lt;/p&gt;&#10;&lt;p&gt;Example: &lt;a href="https://github.com/CRaC/example-quarkus" target="_blank" rel="noopener"&gt;https://github.com/CRaC/example-quarkus&lt;/a&gt;&#10;&lt;/p&gt;</description></item><item><title>What CRaC is</title><link>https://crac.org/about/about-crac/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://crac.org/about/about-crac/</guid><description>&lt;p&gt;Coordinated Restore at Checkpoint (CRaC) is an OpenJDK feature that provides a fast start and immediate performance for Java applications.&lt;/p&gt;&#10;&lt;p&gt;A Java application and JVM are started from an image in a warmed-up form.&#10;The image is created from a running Java instance at arbitrary point of time (&amp;ldquo;checkpoint&amp;rdquo;).&#10;The start from the image (&amp;ldquo;restore&amp;rdquo;) continues from the point when checkpoint was made.&lt;/p&gt;</description></item><item><title>Measured results</title><link>https://crac.org/about/results/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://crac.org/about/results/</guid><description>&lt;p&gt;CRaC support was implemented in a few frameworks with the following results.&#10;The source code can be found in the &lt;a href="https://crac.org/frameworks/"&gt;frameworks with CRaC support&lt;/a&gt;&#10;.&lt;/p&gt;&#10;&lt;details&gt;&lt;summary&gt;The environment&lt;/summary&gt;&#10;&lt;p&gt;&#10;&lt;ul&gt;&#10;&lt;li&gt;laptop with Intel i7-5500U, 16Gb RAM and SSD.&lt;/li&gt;&#10;&lt;li&gt;Linux kernel 5.7.4-arch1-1&lt;/li&gt;&#10;&lt;li&gt;data was collected in container running &lt;code&gt;ubuntu:18.04&lt;/code&gt; based image&lt;/li&gt;&#10;&lt;li&gt;host operating system: archlinux&lt;/li&gt;&#10;&lt;/ul&gt;&#10;&lt;p&gt;&lt;a href="https://github.com/org-crac/jdk/releases/tag/release-jdk-crac" target="_blank" rel="noopener"&gt;jdk14-crac build&lt;/a&gt;&#10;&lt;/p&gt;</description></item><item><title>Checkpoint engines</title><link>https://crac.org/reference/engines/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://crac.org/reference/engines/</guid><description>&lt;p&gt;CRaC&amp;rsquo;s API is deliberately mechanism-agnostic: it tells your application that a&#10;checkpoint is happening without saying how. The mechanism that actually takes&#10;the image is a separate choice, made with &lt;code&gt;-XX:CRaCEngine=&lt;/code&gt;.&lt;/p&gt;</description></item><item><title>Runtimes with CRaC support</title><link>https://crac.org/use/crac-runtime/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://crac.org/use/crac-runtime/</guid><description>&lt;p&gt;To use the CRaC functionality, you need a Java runtime that has support for CRaC integrated.&lt;/p&gt;&#10;&lt;p&gt;Runtimes differ in more than whether they have CRaC at all: the mechanism that&#10;takes the image is selectable, and which mechanisms a build offers is part of&#10;what you are choosing between. See&#10;&lt;a href="https://crac.org/reference/engines/"&gt;checkpoint engines&lt;/a&gt;&#10;.&lt;/p&gt;</description></item><item><title>Debugging failures</title><link>https://crac.org/reference/debugging/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://crac.org/reference/debugging/</guid><description>&lt;h2 id="debugging-checkpoint-and-restore-failures"&gt;Debugging checkpoint and restore failures&lt;/h2&gt;&#10;&lt;p&gt;This guide will help you identify common problems when the checkpoint operation does not work.&lt;/p&gt;&#10;&lt;h3 id="failures-in-native-cr"&gt;Failures in native C/R&lt;/h3&gt;&#10;&lt;p&gt;When the checkpoint operation fails in the native part, there is usually little information in the stack trace of the exception:&lt;/p&gt;</description></item><item><title>Implementing the CRaC API</title><link>https://crac.org/use/implement-crac/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://crac.org/use/implement-crac/</guid><description>&lt;p&gt;&lt;strong&gt;WARNING&lt;/strong&gt;: next is a proposal phase and is subject to change&lt;/p&gt;&#10;&lt;p&gt;Please refer to the &lt;a href="https://crac.org/frameworks/"&gt;frameworks with CRaC support&lt;/a&gt;&#10;, &lt;a href="https://github.com/CRaC/docs/blob/master/STEP-BY-STEP.md" target="_blank" rel="noopener"&gt;step-by-step guide&lt;/a&gt;&#10; or &lt;a href="https://crac.org/reference/best-practices/"&gt;best practices guide&lt;/a&gt;&#10; to get an application with CRaC support.&#10;The rest of the section is written for the &lt;a href="#spring-boot"&gt;spring-boot example&lt;/a&gt;&#10;.&lt;/p&gt;</description></item><item><title>Jetty</title><link>https://crac.org/examples/jetty/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://crac.org/examples/jetty/</guid><description>&lt;h2 id="step-by-step-crac-support-for-a-jetty-app"&gt;Step-by-step CRaC support for a Jetty app&lt;/h2&gt;&#10;&lt;p&gt;A program can be restored in a different environment compared to the one where it was checkpointed.&#10;Dependencies on the environment need to be detected and a coordination code need to be created to update the dependencies after restore.&#10;Such dependencies are open handles for operating system resources like files and sockets, cached hostname and environment, registration in remote services, &amp;hellip;&lt;/p&gt;</description></item><item><title>Micronaut</title><link>https://crac.org/frameworks/micronaut/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://crac.org/frameworks/micronaut/</guid><description>&lt;p&gt;You can just add &lt;code&gt;crac&lt;/code&gt; feature at &lt;a href="https://micronaut.io/launch" target="_blank" rel="noopener"&gt;https://micronaut.io/launch&lt;/a&gt;&#10;!&lt;/p&gt;&#10;&lt;ul&gt;&#10;&lt;li&gt;&lt;a href="https://micronaut-projects.github.io/micronaut-crac/latest/guide" target="_blank" rel="noopener"&gt;Micronaut CRaC Module&lt;/a&gt;&#10;&#10;&lt;ul&gt;&#10;&lt;li&gt;Hikari DataSources coordination&lt;/li&gt;&#10;&lt;li&gt;Redis coordintation&lt;/li&gt;&#10;&lt;/ul&gt;&#10;&lt;/li&gt;&#10;&lt;li&gt;&lt;a href="https://micronaut-projects.github.io/micronaut-gradle-plugin/latest/#_micronaut_crac_plugin" target="_blank" rel="noopener"&gt;Build System&lt;/a&gt;&#10;&#10;&lt;ul&gt;&#10;&lt;li&gt;a single command to generate a docker image with CRaC image included&lt;/li&gt;&#10;&lt;/ul&gt;&#10;&lt;/li&gt;&#10;&lt;/ul&gt;&#10;&lt;p&gt;Example: &lt;a href="https://github.com/CRaC/example-micronaut" target="_blank" rel="noopener"&gt;https://github.com/CRaC/example-micronaut&lt;/a&gt;&#10;&lt;/p&gt;</description></item><item><title>Helidon</title><link>https://crac.org/frameworks/helidon/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://crac.org/frameworks/helidon/</guid><description>&lt;p&gt;Helidon has shipped CRaC support since 4.2, as a preview feature — Helidon&amp;rsquo;s own&#10;documentation says the feature is subject to change and will be finalized in a&#10;later release, so treat the API below as not yet settled.&lt;/p&gt;</description></item><item><title>Quarkus Super Heroes</title><link>https://crac.org/examples/super-heroes/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://crac.org/examples/super-heroes/</guid><description>&lt;p&gt;This guide will walk you through the process of taking an existing non-trivial application and getting it CRaC-able. The &lt;a href="https://quarkus.io/quarkus-workshops/super-heroes/spine.html" target="_blank" rel="noopener"&gt;workshop&lt;/a&gt;&#10; describes the application, please refer there for any details. We&amp;rsquo;ll start right away with the result of that workshop:&lt;/p&gt;</description></item><item><title>AWS Lambda</title><link>https://crac.org/frameworks/aws-lambda/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://crac.org/frameworks/aws-lambda/</guid><description>&lt;p&gt;&lt;a href="https://github.com/CRaC/aws-lambda-java-libs" target="_blank" rel="noopener"&gt;AWS Libs with CRaC&lt;/a&gt;&#10; allows implementation of AWS Lambda functions on CRaC JDK.&lt;/p&gt;&#10;&lt;p&gt;Artifacts: &lt;a href="https://mvnrepository.com/artifact/io.github.crac.com.amazonaws" target="_blank" rel="noopener"&gt;https://mvnrepository.com/artifact/io.github.crac.com.amazonaws&lt;/a&gt;&#10;&lt;/p&gt;&#10;&lt;p&gt;Example: &lt;a href="https://github.com/crac/example-lambda" target="_blank" rel="noopener"&gt;https://github.com/crac/example-lambda&lt;/a&gt;&#10; (&lt;a href="https://github.com/crac/example-lambda/compare/0182484592feed..master" target="_blank" rel="noopener"&gt;diff&lt;/a&gt;&#10;) is a sample Java serverless function on CRaC.&lt;/p&gt;&#10;&lt;p&gt;Changes: &lt;a href="https://github.com/CRaC/aws-lambda-java-libs/compare/master...crac" target="_blank" rel="noopener"&gt;https://github.com/CRaC/aws-lambda-java-libs/compare/master...crac&lt;/a&gt;&#10;&lt;/p&gt;</description></item><item><title>Checkpoint and restore</title><link>https://crac.org/use/checkpoint-and-restore/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://crac.org/use/checkpoint-and-restore/</guid><description>&lt;p&gt;&lt;strong&gt;WARNING&lt;/strong&gt;: next is a proposal phase and is subject to change&lt;/p&gt;&#10;&lt;p&gt;Please refer to the &lt;a href="https://crac.org/frameworks/"&gt;frameworks with CRaC support&lt;/a&gt;&#10;, &lt;a href="https://github.com/CRaC/docs/blob/master/STEP-BY-STEP.md" target="_blank" rel="noopener"&gt;step-by-step guide&lt;/a&gt;&#10; or &lt;a href="https://crac.org/reference/best-practices/"&gt;best practices guide&lt;/a&gt;&#10; to get an application with CRaC support.&#10;The rest of the section is written for the &lt;a href="#spring-boot"&gt;spring-boot example&lt;/a&gt;&#10;.&lt;/p&gt;</description></item><item><title>CPU features</title><link>https://crac.org/reference/cpu-features/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://crac.org/reference/cpu-features/</guid><description>&lt;p&gt;CPU features differ from host to host as newer CPUs offer support for newer&#10;instructions, and some optional features may be removed over time. JVM (Java&#10;Virtual Machine) depends on CPU features (such as AVX512, SSE3 etc.) of each&#10;computer it is running on. The more CPU features JVM can use the better&#10;performance it can provide. JVM normally uses all the CPU features it can find&#10;on the CPU where it has started.&lt;/p&gt;</description></item><item><title>File descriptor policies</title><link>https://crac.org/reference/fd-policies/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://crac.org/reference/fd-policies/</guid><description>&lt;p&gt;CRaC requires that the application closes all open files, network connections etc. - on Linux these are represented as file descriptors. However, it might be difficult to alter the application to properly coordinate with the checkpoint, e.g. due to a code in a library you cannot modify. In those cases CRaC offers a limited handling via configuration. Note that this applies only to file descriptors opened through JDK API; anything opened through native code cannot be handled this way.&lt;/p&gt;</description></item><item><title>Page not found</title><link>https://crac.org/404.html</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://crac.org/404.html</guid><description>&lt;p&gt;The likely destinations:&lt;/p&gt;&#10;&lt;ul&gt;&#10;&lt;li&gt;&lt;a href="https://crac.org/use/"&gt;Using CRaC&lt;/a&gt;&#10; — the deployment scheme, runtimes, and taking a checkpoint&lt;/li&gt;&#10;&lt;li&gt;&lt;a href="https://crac.org/use/implement-crac/"&gt;Implementing the API&lt;/a&gt;&#10; — coordinating your own resources&lt;/li&gt;&#10;&lt;li&gt;&lt;a href="https://crac.org/frameworks/"&gt;Frameworks&lt;/a&gt;&#10; — Spring Boot, Quarkus, Micronaut, AWS Lambda&lt;/li&gt;&#10;&lt;li&gt;&lt;a href="https://crac.org/reference/"&gt;Reference&lt;/a&gt;&#10; — best practices, debugging, file descriptors, CPU features&lt;/li&gt;&#10;&lt;li&gt;&lt;a href="https://crac.org/sitemap/"&gt;Sitemap&lt;/a&gt;&#10; — everything, on one page&lt;/li&gt;&#10;&lt;/ul&gt;&#10;&lt;p&gt;If a link on this site brought you here, that is worth&#10;&lt;a href="https://github.com/CRaC/crac.github.io/issues" target="_blank" rel="noopener"&gt;raising on the project&amp;rsquo;s repository&lt;/a&gt;&#10;.&lt;/p&gt;</description></item><item><title>Search</title><link>https://crac.org/search/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://crac.org/search/</guid><description/></item><item><title>Sitemap</title><link>https://crac.org/sitemap/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://crac.org/sitemap/</guid><description/></item></channel></rss>