[Paper Review] A Generic Checkpoint-Restart Mechanism for Virtual Machines
This paper presents a generic checkpoint-restart mechanism for virtual machines using DMTCP as a plugin-based, external checkpointing framework. It enables fast, consistent snapshots in 0.2 seconds via forked checkpointing and mmap-based restart, with minimal code overhead (200 lines for KVM/QEMU, 40 lines for Lguest), and works without modifying the VM or DMTCP, demonstrating compatibility across user-space QEMU, KVM/QEMU, and Lguest.
It is common today to deploy complex software inside a virtual machine (VM). Snapshots provide rapid deployment, migration between hosts, dependability (fault tolerance), and security (insulating a guest VM from the host). Yet, for each virtual machine, the code for snapshots is laboriously developed on a per-VM basis. This work demonstrates a generic checkpoint-restart mechanism for virtual machines. The mechanism is based on a plugin on top of an unmodified user-space checkpoint-restart package, DMTCP. Checkpoint-restart is demonstrated for three virtual machines: Lguest, user-space QEMU, and KVM/QEMU. The plugins for Lguest and KVM/QEMU require just 200 lines of code. The Lguest kernel driver API is augmented by 40 lines of code. DMTCP checkpoints user-space QEMU without any new code. KVM/QEMU, user-space QEMU, and DMTCP need no modification. The design benefits from other DMTCP features and plugins. Experiments demonstrate checkpoint and restart in 0.2 seconds using forked checkpointing, mmap-based fast-restart, and incremental Btrfs-based snapshots.
Motivation & Objective
- To eliminate the need for VM-specific, hand-coded checkpointing solutions by enabling a generic, reusable mechanism.
- To provide fast, consistent snapshots of virtual machines using an external, user-space checkpointing package (DMTCP).
- To support diverse virtualization types—paravirtualized (Lguest), full virtualized (KVM/QEMU), and user-space (QEMU)—with minimal code changes.
- To enable advanced checkpointing features like forked checkpointing and incremental snapshots via DMTCP’s existing capabilities.
- To reduce development effort for adding checkpointing to new virtual machines, estimating 5–10 person-days depending on kernel driver API availability.
Proposed method
- Leverages DMTCP, a user-space, transparent checkpoint-restart package, as the core checkpointing engine.
- Uses DMTCP plugins to interface with VM-specific kernel drivers (e.g., KVM, Lguest) for state transfer between kernel and user space.
- Employs Btrfs as a copy-on-write filesystem to enable incremental, fast snapshots of checkpoint images.
- Applies forked checkpointing: a child process is created to checkpoint while the parent continues execution.
- Uses mmap-based fast restart to restore VM state efficiently from checkpointed memory images.
- For user-space QEMU, DMTCP directly checkpoints without plugins due to absence of kernel driver communication.
Experimental results
Research questions
- RQ1Can a generic checkpoint-restart mechanism be built for virtual machines without modifying the VM or the checkpointing framework?
- RQ2What is the minimal code overhead required to add checkpointing to a new virtual machine using an external checkpointing package?
- RQ3How efficiently can this mechanism achieve fast, consistent snapshots across different virtualization types?
- RQ4Can advanced features like forked checkpointing and incremental snapshots be inherited transparently from the underlying checkpointing system?
- RQ5What is the performance overhead of the mechanism when running real workloads?
Key findings
- The mechanism achieves a checkpoint and restart time of 0.2 seconds using forked checkpointing and mmap-based fast restart on Btrfs.
- The runtime overhead of the mechanism is too small to measure when running the nbench2 benchmark, indicating near-zero performance impact.
- User-space QEMU is checkpointed directly by DMTCP with no additional code or plugins, due to its lack of kernel driver components.
- KVM/QEMU and Lguest require only 200 and 40 lines of code respectively for plugins and kernel driver extensions, enabling efficient state transfer.
- The development effort for adding checkpointing to a new VM is estimated at 5 person-days if a full kernel driver API is available, or 10 person-days if not.
- The approach supports heterogeneous and distributed checkpointing, enabling consistent snapshots of clusters of VMs and bare processes.
Read this paper
Open the full text in the Nubint reader and ask about any passage as you read.
Read this paper on NubintThis review was generated by AI from the original paper. Please check the paper before citing it.