Process Suspend/Resume
Being able to suspend a process and later resume it at the same point is a powerful tool for processes that keep a lot of state in memory:
- all JITted processes typically perform best after a warmup period,
- various tools (e.g. Bazel) keep significant caches in-memory only and restarts are expensive.
Thus, if the ideas in [/zack/components/infra_dependencies/] don’t work, having this ability can speed things up.
Snapshotting
The typical workflow would be to snapshot an already running process, write the snapshot to a file.
Then, to resume the process somewhere else, we need to transfer the snapshot file to that host and restore the process.
Typical challenges are dependencies on the environment, such as file descriptors, memory addresses, host names, …
Tools
- Firecracker MicroVM Snapshot Support: not all solutions for docker/VMs support nested virtualization, though, e.g. not on OrbStack
- nested virtual machine support on Mac OS
- UTM for Virtual Machines on MacOS
- CRIU
- CRIU with Docker