From 68d8fa14bf9d9d60945fb4c1bb9b17a01103b85f Mon Sep 17 00:00:00 2001 From: Moritz Halbritter Date: Mon, 23 Oct 2023 11:01:25 +0200 Subject: [PATCH] Polish "Add JVM Checkpoint Restore documentation" See gh-37975 --- .../src/docs/asciidoc/deployment/efficient.adoc | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/spring-boot-project/spring-boot-docs/src/docs/asciidoc/deployment/efficient.adoc b/spring-boot-project/spring-boot-docs/src/docs/asciidoc/deployment/efficient.adoc index c247d62dd00..1880abcd473 100644 --- a/spring-boot-project/spring-boot-docs/src/docs/asciidoc/deployment/efficient.adoc +++ b/spring-boot-project/spring-boot-docs/src/docs/asciidoc/deployment/efficient.adoc @@ -66,15 +66,19 @@ It implies the following restrictions: To learn more about ahead-of-time processing, please see the <>. -[[deployment.efficient.crac]] +[[deployment.efficient.checkpoint-restore]] === Checkpoint and Restore With the JVM -https://wiki.openjdk.org/display/crac/Main[CRaC] is an OpenJDK project that defines a new Java API to allow you to checkpoint and restore an application on the HotSpot JVM. It is based on https://github.com/checkpoint-restore/criu[CRIU], a project that implements checkpoint/restore functionality on Linux. +https://wiki.openjdk.org/display/crac/Main[CRaC] is an OpenJDK project that defines a new Java API to allow you to checkpoint and restore an application on the HotSpot JVM. +It is based on https://github.com/checkpoint-restore/criu[CRIU], a project that implements checkpoint/restore functionality on Linux. -The principle is the following: you start your application almost as usual but with a CRaC enabled version of the JDK like https://www.azul.com/downloads/?package=jdk-crac#zulu[the one provided by Azul]. Then at some point, potentially after some workloads that will make your JVM hot by executing all common code paths, you trigger a checkpoint using an API call, a `jcmd` command, an HTTP endpoint, or another mechanism. +The principle is the following: you start your application almost as usual but with a CRaC enabled version of the JDK like https://www.azul.com/downloads/?package=jdk-crac#zulu[the one provided by Azul]. +Then at some point, potentially after some workloads that will warm up your JVM by executing all common code paths, you trigger a checkpoint using an API call, a `jcmd` command, an HTTP endpoint, or a different mechanism. -A memory representation of the running JVM, including its warmness, is then serialized to disk, allowing a very fast restoration at a later point, potentially on another machine with a similar operating system and CPU architecture. The restored process retains all the capabilities of the HotSpot JVM, including further JIT optimizations at runtime. +A memory representation of the running JVM, including its warmness, is then serialized to disk, allowing a fast restoration at a later point, potentially on another machine with a similar operating system and CPU architecture. +The restored process retains all the capabilities of the HotSpot JVM, including further JIT optimizations at runtime. -Based on the foundations provided by Spring Framework, Spring Boot provides support for checkpointing and restoring your application, and manages out-of-the-box the lifecycle of resources such as socket, files and thread pools https://github.com/spring-projects/spring-checkpoint-restore-smoke-tests/blob/main/STATUS.adoc[on a limited scope]. Additional lifecycle management is expected for other dependencies and potentially for the application code dealing with such resources. +Based on the foundations provided by Spring Framework, Spring Boot provides support for checkpointing and restoring your application, and manages out-of-the-box the lifecycle of resources such as socket, files and thread pools https://github.com/spring-projects/spring-checkpoint-restore-smoke-tests/blob/main/STATUS.adoc[on a limited scope]. +Additional lifecycle management is expected for other dependencies and potentially for the application code dealing with such resources. -You can find more details about the 2 modes supported ("on demand checkpoint/restore of a running application" and "automatic checkpoint/restore at startup"), how to enable Project CRaC support and some guidelines in {spring-framework-docs}/integration/checkpoint-restore.html[the Spring Framework JVM Checkpoint Restore support documentation]. \ No newline at end of file +You can find more details about the two modes supported ("on demand checkpoint/restore of a running application" and "automatic checkpoint/restore at startup"), how to enable checkpoint and restore support and some guidelines in {spring-framework-docs}/integration/checkpoint-restore.html[the Spring Framework JVM Checkpoint Restore support documentation].