Types of CR illustrated in relation software component hierarchy: from the OS, to environment, to individual processes. The environment level and the corresponding solution (container), are highlighted.
Types of CR illustrated in relation to the software component hierarchy: from the OS to individual processes. The Container solution is highlighted.

Containers are a form of virtualization that use a single OS kernel to run multiple, seemingly isolated environments within that OS. In many ways, using a container can be similar to using a virtual machine; in fact, this is no coincidence; it is supposed to be that way! The reason to prefer the container approach over virtual machines is to reduce the overhead. This does, however, come at the price of somewhat increasing complexity since now the container technology has to know something (actually, quite a bit) about the operating system for which it is providing virtualization. Note that containers use the same operating system as the host OS since that particular kernel is shared among all the containers running on the system. The processes running in each container shouldn't know that they are being partitioned in this way.

Popular container implementations in Linux include Docker, Apptainer/Singularity OpenVZ/Virtuozzo, and LXC/LXD. Efforts between these projects sometimes overlap, and container technology is evolving quickly. Other UNIX operating systems have their own implementations of containers, some of which have been around far longer than Linux alternatives. The Apptainer/Singularity system is designed to work well on supercomputer systems.

When it comes to C/R, containers enjoy some of the benefits of being able to leverage existing virtualization technology. However, unlike the case with virtual machines, easily saving and restoring the program state is not a given since now we have to have groups of processes being restored within a running OS, and there are many things to worry about when restoring processes as we briefly discussed when describing C/R.

The most popular container systems, Docker and Apptainer, only offer experimental C/R support (as of early 2023). Of course, you could use application-level C/R inside of a Docker container, which we will discuss soon, and checkpointing of Docker containers using (multi) application-level C/R has been tried experimentally. OpenVZ and LXC offer more robust C/R support by employing the same application-level C/R tried in Docker above. As we've already mentioned, efforts between the container implementations often mingle, and it is possible to use Docker features with OpenVZ, either by using Virtuozzo's built-in Docker support or by configuring OpenVZ containers to support Docker.

Docker is a great system to know about due to its layered approach to building application environments, and if you haven't tried it, you can build on the previous suggested exercise in the page on Virtual Machines, and use your Linux Virtual Machine to install a Docker container! Then you you'll have multiple levels of virtualization, all running from the convenience of your laptop or desktop computer.

Advantages and disadvantages of using containers for checkpointing
Pros
  • Like VMs, enjoy the benefit of existing virtualization technology
  • Few surprises due to creating/restoring isolated environment
Cons
  • May incur additional overhead due to C/R of unnecessary processes and storage
  • Still a challenge for multi-container C/R
 
©   Cornell University  |  Center for Advanced Computing  |  Copyright Statement  |  Inclusivity Statement