A NetBSD/amd64 guest can now boot in 18ms
old.reddit.com
old.reddit.com
Boot time will be the setup of shadow page tables and other hypervisor structures at new offsets. Plus a few tricks to avoid reproducible RNGs.
You can't do that easily as devices can be attached, detached or reattached dynamically whilst the VM is running and when it is shut down.
In lieu of the hardware / VM support for device trees, with the existing design, the kernel has to probe each device upon every boot.
Applicability is limited, but works well to spin up serverless compute on-demand.
The UEFI option should work fine with pretty much any OS the hardware should be able to boot.
This is how GraalVM and OpenJ9 achieve instant startup of Java programs.
EDIT: at least linux seems to be capable of doing that: https://www.systutorials.com/docs/linux/man/9-crypto_rng_res...
Wasn't there recently a lot of work to reduce the time on FreeBSD (and it's 20ms)
https://www.usenix.org/publications/loginonline/freebsd-fire....
Anyone know what the current record for Linux is? Last I heard was ~50 ms."
- @cperciva at https://twitter.com/cperciva/status/1747270461095043532
I wonder if this is related to what Netflix found as a regression.
Starting at slide #18 below
The "other issues I didn't get around to fixing" are things like precomputing lookup tables (we can wait and do them on demand, or not at all if they turn out to never get used) and an O(n^2) issue registering names of sysctls.
I'll see which tricks can be reused on linux, as I'd love to cut that by 1 order of magnitude!
https://dev.l1x.be/posts/2020/12/13/diving-into-firecracker-...
If you are asking for the NetBSD image I am not sure.
"Boot" isn't even a sensible concept in a VM, IMHO, you could just toss an image into RAM. There's no hardware to initialize, the caches are probably already warm, etc.
The "take a snapshot after you finish booting and resume that" approach can work (Lambda does it) but it only works if you have the same type and number of CPUs, the same amount of RAM, the same filesystem on disk, and even the same MAC addresses on your network interfaces. So it's not like FreeBSD can ship useful "pre-booted" images.