Message ID | 20191018105315.27511-1-slp@redhat.com (mailing list archive) |
---|---|
Headers | show |
Series | Introduce the microvm machine type | expand |
Sergio Lopez <slp@redhat.com> writes: > microvm is a machine type inspired by Firecracker and constructed > after its machine model. > > It's a minimalist machine type without PCI nor ACPI support, designed > for short-lived guests. microvm also establishes a baseline for > benchmarking and optimizing both QEMU and guest operating systems, > since it is optimized for both boot time and footprint. I know this has been merged, but I ask anyway: got some boot time and memory footprint measurements?
Markus Armbruster <armbru@redhat.com> writes: > Sergio Lopez <slp@redhat.com> writes: > >> microvm is a machine type inspired by Firecracker and constructed >> after its machine model. >> >> It's a minimalist machine type without PCI nor ACPI support, designed >> for short-lived guests. microvm also establishes a baseline for >> benchmarking and optimizing both QEMU and guest operating systems, >> since it is optimized for both boot time and footprint. > > I know this has been merged, but I ask anyway: got some boot time and > memory footprint measurements? It's been a while since I ran an instrumented kernel, but I've been playing a bit with OSv (thanks to a question in qemu-discuss), which is aggressively optimized for boot time, and I have some numbers. This is using a QEMU build with some patches to be able to do a microvm-only build that "I have not yet submitted but shouldn't be controversial" (TM) [1]. The Q35 binary was also built having only the Q35 machine type enabled. In this test, OSv runs to userspace and then shuts down. OSv gives us its boot time (from entry point to userspace), and I also get the execution totals with "time". Variation between runs is +-2%: ------------ | qemu-q35 | ------------ Boot time ========= time ./x86_64-softmmu/qemu-system-x86_64 -M q35 -enable-kvm \ -cpu host -m 64m -kernel ~/osv/build/release/loader-stripped.elf \ -append "/hello" -serial stdio -nodefaults -no-user-config \ -nographic -no-reboot -device virtio-blk,id=blk0,drive=hd0,scsi=off \ -drive file=~/osv/build/release/usr.img,if=none,id=hd0,cache=none \ -global virtio-mmio.force-legacy=off -no-reboot SeaBIOS (version rel-1.12.0-59-gc9ba5276e321-prebuilt.qemu.org) Booting from ROM..OSv v0.54.0-26-gcccc7d40 Booted up in 11.77 ms Cmdline: /hello Hello from C code real 0m0.073s user 0m0.034s sys 0m0.029s Size ==== # ls -l x86_64-softmmu/qemu-system-x86_64* -rwxr-xr-x. 1 root root 13400680 Dec 2 07:31 x86_64-softmmu/qemu-system-x86_64 -rwxr-xr-x. 1 root root 11707344 Dec 2 07:51 x86_64-softmmu/qemu-system-x86_64.stripped ---------------- | qemu-microvm | ---------------- Boot time ========= time ./x86_64-softmmu/qemu-system-x86_64 -M microvm -enable-kvm \ -cpu host -m 64m -smp 1 \ -kernel ~/osv/build/release/loader-stripped.elf \ -append "--nopci /hello" -serial stdio -nodefaults -no-user-config \ -nographic -no-reboot \ -device virtio-blk-device,id=blk0,drive=hd0,scsi=off \ -drive file=~/osv/build/release/usr.img,if=none,id=hd0 \ -global virtio-mmio.force-legacy=off OSv v0.54.0-26-gcccc7d40 Booted up in 3.64 ms Cmdline: /hello Hello from C code real 0m0.020s user 0m0.009s sys 0m0.011s Size ==== # ls -l x86_64-softmmu/qemu-system-x86_64* -rwxr-xr-x. 1 root root 7823344 Dec 2 07:35 x86_64-softmmu/qemu-system-x86_64 -rwxr-xr-x. 1 root root 6486992 Dec 2 07:55 x86_64-softmmu/qemu-system-x86_64.stripped I don't have numbers for memory footprint. It'd be nice coming up with some reasonable methodology for getting them, as there a significant amount of moving parts there that can have an impact on memory consumption. Sergio. [1] https://github.com/slp/qemu/tree/microvm_only