| From: | Paolo Bonzini <pbonzini-AT-redhat.com> | |
| To: | qemu-devel <qemu-devel-AT-nongnu.org>, KVM list <kvm-AT-vger.kernel.org> | |
| Subject: | Announcing qboot, a minimal x86 firmware for QEMU | |
| Date: | Thu, 21 May 2015 15:51:43 +0200 | |
| Message-ID: | <555DE2EF.1000509@redhat.com> | |
| Archive-link: | Article |
Some of you may have heard about the "Clear Containers" initiative from Intel, which couple KVM with various kernel tricks to create extremely lightweight virtual machines. The experimental Clear Containers setup requires only 18-20 MB to launch a virtual machine, and needs about 60 ms to boot. Now, as all of you probably know, "QEMU is great for running Windows or legacy Linux guests, but that flexibility comes at a hefty price. Not only does all of the emulation consume memory, it also requires some form of low-level firmware in the guest as well. All of this adds quite a bit to virtual-machine startup times (500 to 700 milliseconds is not unusual)". Right? In fact, it's for this reason that Clear Containers uses kvmtool instead of QEMU. No, wrong! In fact, reporting bad performance is pretty much the same as throwing down the gauntlet. Enter qboot, a minimal x86 firmware that runs on QEMU and, together with a slimmed-down QEMU configuration, boots a virtual machine in 40 milliseconds[2] on an Ivy Bridge Core i7 processor. qboot is available at git://github.com/bonzini/qboot.git. In all the glory of its 8KB of code, it brings together various existing open source components: * a minimal (really minimal) 16-bit BIOS runtime based on kvmtool's own BIOS * a couple hardware initialization routines written mostly from scratch but with good help from SeaBIOS source code * a minimal 32-bit libc based on kvm-unit-tests * the Linux loader from QEMU itself The repository has more information on how to achieve fast boot times, and examples of using qboot. Right now there is a limit of 8 MB for vmlinuz+initrd+cmdline, which however should be enough for initrd-less containers. The first commit to qboot is more or less 24 hours old, so there is definitely more work to do, in particular to extract ACPI tables from QEMU and present them to the guest. This is probably another day of work or so, and it will enable multiprocessor guests with little or no impact on the boot times. SMBIOS information is also available from QEMU. On the QEMU side, there is no support yet for persistent memory and the NFIT tables from ACPI 6.0. Once that (and ACPI support) is added, qboot will automatically start using it. Happy hacking! Paolo
Announcing qboot, a minimal x86 firmware for QEMU
Posted May 21, 2015 17:27 UTC (Thu) by arjan (subscriber, #36785) [Link]
Announcing qboot, a minimal x86 firmware for QEMU
Posted May 21, 2015 18:27 UTC (Thu) by SEJeff (subscriber, #51588) [Link]
Announcing qboot, a minimal x86 firmware for QEMU
Posted May 21, 2015 19:18 UTC (Thu) by pbonzini (subscriber, #60935) [Link]
But really, the VENOM thing was massively overhyped.
Announcing qboot, a minimal x86 firmware for QEMU
Posted May 21, 2015 19:31 UTC (Thu) by pbonzini (subscriber, #60935) [Link]
Announcing qboot, a minimal x86 firmware for QEMU
Posted May 22, 2015 4:50 UTC (Fri) by edomaur (subscriber, #14520) [Link]
Will this work on Xen ?
Announcing qboot, a minimal x86 firmware for QEMU
Posted May 21, 2015 19:39 UTC (Thu) by luto (subscriber, #39314) [Link]
Announcing qboot, a minimal x86 firmware for QEMU
Posted May 21, 2015 19:41 UTC (Thu) by pbonzini (subscriber, #60935) [Link]
Announcing qboot, a minimal x86 firmware for QEMU
Posted May 21, 2015 19:48 UTC (Thu) by luto (subscriber, #39314) [Link]
At the very least, I want all the legacy storage stuff gone. Even AHCI is kind of slow to probe.
Announcing qboot, a minimal x86 firmware for QEMU
Posted May 21, 2015 21:13 UTC (Thu) by arnd (subscriber, #8866) [Link]
Announcing qboot, a minimal x86 firmware for QEMU
Posted May 23, 2015 7:29 UTC (Sat) by drag (subscriber, #31333) [Link]
Announcing qboot, a minimal x86 firmware for QEMU
Posted May 22, 2015 6:29 UTC (Fri) by pbonzini (subscriber, #60935) [Link]
Announcing qboot, a minimal x86 firmware for QEMU
Posted May 21, 2015 20:38 UTC (Thu) by mjg59 (subscriber, #23239) [Link]
Announcing qboot, a minimal x86 firmware for QEMU
Posted May 21, 2015 22:19 UTC (Thu) by jlargentaye (subscriber, #75206) [Link]
But you'd know something about that wouldn't you :)
Announcing qboot, a minimal x86 firmware for QEMU
Posted May 22, 2015 18:56 UTC (Fri) by dlang (guest, #313) [Link]
Announcing qboot, a minimal x86 firmware for QEMU
Posted May 22, 2015 19:01 UTC (Fri) by mjg59 (subscriber, #23239) [Link]
Announcing qboot, a minimal x86 firmware for QEMU
Posted May 22, 2015 19:15 UTC (Fri) by dlang (guest, #313) [Link]
If you are after the highest performance (and when we are quibbling about 10s of ms of boot time, you are), then you don't want to use a stock distro kernel that probes for 1000 different things that you don't have, and enables all sort of features that each have a small performance impact because "someone" will want them.
As the earlier article said, Intel got the super-fast startup of their VMs by stripping out all the 'real hardware' drivers and only including the drivers for the virtual devices provided by the hypervisor that are effectively instant initialization.
Announcing qboot, a minimal x86 firmware for QEMU
Posted May 22, 2015 19:20 UTC (Fri) by mjg59 (subscriber, #23239) [Link]
Announcing qboot, a minimal x86 firmware for QEMU
Posted May 22, 2015 23:18 UTC (Fri) by josh (subscriber, #17465) [Link]
Announcing qboot, a minimal x86 firmware for QEMU
Posted May 23, 2015 2:44 UTC (Sat) by ploxiln (subscriber, #58395) [Link]
Oh, the days when my total list of services fit in one screen, and reading the list of mounted filesystems an easy glance at 4 or 5 lines...
Announcing qboot, a minimal x86 firmware for QEMU
Posted May 23, 2015 11:51 UTC (Sat) by mathstuf (subscriber, #69389) [Link]
Heh. My service list doesn't fit, but all non-kernel processes fits on half a screen now ;) .
Plus, autofs is useful outside of systemd anyways. I use it for on-demand mounting and unmounting of devices via cd rather than udisks.
Announcing qboot, a minimal x86 firmware for QEMU
Posted May 24, 2015 11:55 UTC (Sun) by ibukanov (subscriber, #3942) [Link]
What is wrong with autofs? I use it to mount and *unmount* sshfs shares on demand.
Announcing qboot, a minimal x86 firmware for QEMU
Posted May 25, 2015 9:44 UTC (Mon) by intgr (subscriber, #39733) [Link]
Oh, that's easy to fix, clearly you need to upgrade to a 4k-5k display!
Seems like a good idea until you hit problems like this: https://i.imgur.com/6swhGrr.jpg
Announcing qboot, a minimal x86 firmware for QEMU
Posted May 22, 2015 23:19 UTC (Fri) by josh (subscriber, #17465) [Link]
Ideally, there'd be a single command-line option (*possibly* available as a firmware option) to say "no, really, if you don't see it explicitly listed as a device then it isn't there, don't guess at any legacy PC hardware".
Announcing qboot, a minimal x86 firmware for QEMU
Posted May 21, 2015 20:14 UTC (Thu) by geertj (subscriber, #4116) [Link]
The way I think of containers is that they are a separate layer in the stack, not a replacement for virtualiziation. Containers can be used with virtualization, or without. The big benefit of containers is that they improve application manageability by making apps "transparent". For example:
- Running a command line with an attached console in the container.
- Getting log information from the container to the host.
- Passing file descriptors into the container (for socket activated apps)
- Injecting environment variables into the app (e.g. communicating which network port a daemon should use).
- Monitoring processes inside a container.
- Debugging an application running in a container.
True, there's also the efficiency benefits of containers like lower memory usage and shorter boot times. But in my view those are secondary.
Announcing qboot, a minimal x86 firmware for QEMU
Posted May 21, 2015 22:25 UTC (Thu) by sodabrew (subscriber, #95737) [Link]
Those concerns are primary, along with reduced CPU overhead, and are top reasons why large deployments are looking into containers in lieu of virtualization.
Announcing qboot, a minimal x86 firmware for QEMU
Posted May 22, 2015 17:44 UTC (Fri) by winden (subscriber, #60389) [Link]
http://research.google.com/pubs/pub43438.html
Announcing qboot, a minimal x86 firmware for QEMU
Posted May 22, 2015 0:25 UTC (Fri) by flewellyn (subscriber, #5047) [Link]
Announcing qboot, a minimal x86 firmware for QEMU
Posted May 22, 2015 13:38 UTC (Fri) by bradfitz (subscriber, #4378) [Link]
Announcing qboot, a minimal x86 firmware for QEMU
Posted May 22, 2015 4:21 UTC (Fri) by saipursnal (guest, #102702) [Link]
Announcing qboot, a minimal x86 firmware for QEMU
Posted May 22, 2015 6:28 UTC (Fri) by pbonzini (subscriber, #60935) [Link]
Announcing qboot, a minimal x86 firmware for QEMU
Posted Jun 5, 2015 6:56 UTC (Fri) by robbe (subscriber, #16131) [Link]
Do we need devicetrees for x86?
Announcing qboot, a minimal x86 firmware for QEMU
Posted May 24, 2015 12:02 UTC (Sun) by ibukanov (subscriber, #3942) [Link]
Announcing qboot, a minimal x86 firmware for QEMU
Posted Jun 5, 2015 6:52 UTC (Fri) by robbe (subscriber, #16131) [Link]
Would also help with the RAM sharing as discussed under https://lwn.net/Articles/646761/
Copyright © 2015, Eklektix, Inc.
Comments and public postings are copyrighted by their creators.
Linux is a registered trademark of Linus Torvalds