Differences between KVM and Xen

Note that this is a forwarded version from serverfault.com, and the original post is here

Xen is an hypervisor that runs on metal (the pc / server) and then hosts virtual machines called domains.

A Xen PV domain is a paravirtualized domain, that means the operating system (usually we’re talking linux here) has been modified to run under Xen, and there’s no need to actually emulate hardware. This should be the most efficient way to go, performance wise.

A Xen HVM domain is hardware emulated domain, that means the operating system (could be Linux, Windows, whatever) has not been modified in any way and hardware gets emulated. This is rather slow, so usually you install PV drivers in the guest os for critical hardware (usually disk and network), so the guest as a whole will run fully virtualized but the most performance-critical pieces of hardware will run paravirtualized. Recent linux systems have pv drivers for both disk and network in the kernel, and there exist various PV drivers for Windows too. With all the development on HVM in recent years there usually is little difference in performance between HVM and PV for standard workloads.

KVM is not Xen, it is another virtualization platform built inside the Linux kernel. From a guest point of view it resembles Xen HVM: the guest runs fully virtualized and there are specific driver to run some parts paravirtualized (again, disk and network).

Both Xen HVM and Linux KVM need hardware assisted virtualization support (Intel VT-x, AMD AMD-V), whereas Xen PV does not but can’t run operating systems without PV support (you can’t run Windows on Xen PV).

Both Xen HVM and Linux KVM will use parts of the qemu virtualization software to emulate actual hardware for devices not using PV drivers in the guest system.

Xen (both PV and HVM) can do live migration of a running guest from one physical server to another, and KVM supports it too.

Both Xen and KVM cannot overcommit memory so you usually get “true RAM”, while other platforms like VMware can swap part of the guest ram to disk.

There are differences but usually apply to specific installations and not to the generic virtual private server for sale to other people. For example recent Xen hypervisors support transcendent memory that could improve memory utilization and guest performance if the guest has support for it (linux kernels >= 3.x).

All those technologies will give you a great experience if they are implemented correctly, and will not make a big difference from your point of view. Of course, there are a thousand ways things can go wrong and that’s not related to the specific virtualization solution (i.e., your guest could be stored on slow disks and that would hurt your performance).

Share Button

Leave a comment

Your email address will not be published. Required fields are marked *