Honestly? Nothing's wrong with Xen. Most of the interesting things are done in hardware these days anyway so there isn't a huge difference between any hypervisor out there.
But what most people don't understand about Xen is that it's not "part of Linux". The bits that were merged into the kernel in recent years are guest-enablement features only. It's a full blown Operating System that has no relationship to Linux at all. It's a microkernel design based on an old research project (search for Nemesis Micorkernel if you're interested). Linux only runs as a guest under Xen.
Xen has its own scheduler, own MMU, own set of device drivers. By constrast, there is no such thing as the "KVM scheduler". KVM is just a small layer that adds virtualization support to Linux. *Linux is the hypervisor*.
I prefer KVM over Xen for the virtualization for the same reason I prefer Linux over FreeBSD for running Apache, or Linux over <insert custom OS> for whatever workload you can think of.
History has shown that collaborating on a general purpose OS wins time and time again over special purpose boutique OSes. That's why many of our cell phones and DVD players run Linux along with most of the Top 500 supercomputers.
You can always make the argument "but you can build a better scheduler for XYZ workloads". It's a short sighted world view that almost always loses over time.
Posted Oct 24, 2012 23:14 UTC (Wed) by LarsKurth (guest, #87439)
[Link]
I wanted to dive deeper into the point that Xen is not part of Linux. Although it is true that the Hypervisor is not part of the Linux Kernel, all the enablers that enable guests (DomU) and Xen hosts (Dom0) are in the Kernel. The Hypervisor itself doesn't need to be part of the kernel. As long as Xen is delivered via a a distro's package manager, I don't need to care whether Linux is the Hypervisor, or whether it is not. At the end of the day, Xen and KVM make different design decisions, leading to different trade-offs and thus one or the other setup will be better for different workloads.
The Xen Hypervisor delegates a lot of functionality to the Dom0 kernel (typically Linux, but can also be NetBSD). And although there are Xen specific drivers for the PV interface in the kernel, these are essentially just shims that call the device drivers in the Dom0 kernel and are part of the PV interface.
Amazon and Xen
Posted Oct 26, 2012 11:06 UTC (Fri) by dunlapg (subscriber, #57764)
[Link]
Xen is a part of Linux just as much as qemu-kvm is a part of Linux. A lot of interesting stuff is done in the kernel, but a whole lot more of the interesting stuff is done in qemu. Similarly, a lot of interesting stuff is done in the Xen hypervisor, but a lot of other interesting stuff is done in Linux itself -- the frontend/backend ring protocols, and so on.
Both Xen and qemu-kvm have interesting parts in Linux and interesting parts outside. So if KVM is Linux, then Xen is Linux; if Xen is not Linux, then KVM (at least qemu-kvm) is not Linux.
Amazon and Xen
Posted Oct 27, 2012 12:39 UTC (Sat) by pbonzini (subscriber, #60935)
[Link]
qemu-kvm just has some threads that represent virtual CPUs. These threads and their resources are managed by the Linux scheduler, the Linux virtual memory manager, the Linux power manager, etc. You can use the regular tools such as cgroups to tune VMs, to distribute
On Xen you have two levels of scheduling and two levels of memory management. Xen distributes CPU shares to all domains (including dom0), and dom0 distributes CPU shares among its processes. Xen assigns memory to all domains (including dom0), and dom0 distributes memory among its processes. It's much harder to use a Xen dom0 for non-VM-related tasks, because you can only partly control the resources that dom0 receives.
For power management, Xen has to ask dom0 to process ACPI tables and basically summarize them to the hypervisor. It's even more complicated when it comes to paging, because Xen doesn't do paging on its own---it asks dom0 to page stuff in and out.
Sure, the Xen architecture seems simpler (because you "just" have to handle VCPUs, not arbitrary tasks, and because you "just" have to share memory among a few dozen domains rather than thousands of arbitrary tasks). And to some extent it is, because inventing a new scheduler or memory manager trick is much easier on Xen than on Linux. But in the end I think KVM's performance and simplicity proves that it is not worthwhile, also because every improvement done to favor KVM (think of Andrea Arcangeli's transparent huge pages and AutoNUMA) will benefit every workload, and will effectively have double benefit if you can use it to speed up both the host and the guest.
Amazon and Xen
Posted Oct 27, 2012 12:40 UTC (Sat) by pbonzini (subscriber, #60935)
[Link]
Uh, I realized now to whom I was answering... hi George. :)
You knew already what I wrote, which makes me so much more eager to read what you think about it...