Xen or KVM: Open-source hypervisors compared
When it comes to open-source virtualisation and the question of whether to use KVM or Xen as the hypervisor, the answer may at first glance seem obvious. KVM appears to have won the race, which was long a neck-and-neck contest — not least since it became an integral part of Red Hat Linux. That said, the question is not quite that clear-cut: Xen should not be dismissed in open-source virtualisation, as it certainly offers advantages. We examine the topic in somewhat greater depth.
The rise of KVM
It is fair to say that KVM has established itself on the market as the hypervisor for open-source virtualisation. One must also acknowledge the claim that KVM has now become the de facto standard. However, it is clearly not true that Xen therefore plays no role at all or that there are no use cases and, above all, no advantages remaining.
Key differences and potential advantages of Xen
One of Xen's fundamental differences is that it is clearly and indisputably a Type-1 hypervisor. With KVM this is by no means so clear — experts disagree about which type of hypervisor KVM actually is. We have already covered more about hypervisor types and the fundamental differences in server virtualisation in our guide.
Significant consequences arise from this single, fundamental difference. As a Type-1 hypervisor, Xen allocates server resources far more efficiently to guest systems via paravirtualisation; the device drivers installed in the VM obtain direct access to the hardware. This results — compared with differently designed systems — in markedly better performance. Today, in an era of vast available server resources, this may at first glance seem less important (in the early 2000s, during Xen's heyday, server performance looked very different) — nevertheless, better performance and more efficient use of server resources in open-source virtualisation can never hurt.
Also see the difference to container virtualisation in the case of LXC vs KVM.
How this plays out in practice can, however, only be tested on an individual system: in theory the performance is better; whether this actually affects your own server in practice will need to be tested.
More about KVM servers and some providers of server solutions:
KVM VPS providers compared
KVM cloud server providers compared
On top of that: if a virtual machine goes rogue under KVM, it will almost inevitably affect the entire server and usually all other VMs, because the host kernel always sees the whole hardware. With Xen this is simply impossible, since the hypervisor manages the hardware. Problems with a VM therefore remain confined to that VM. Depending on the use case for your chosen open-source virtualisation, this can be an important consideration.
When "passing through" (passthrough) the server hardware to the VMs, Xen is a little more thorough; however, the advantage is no longer so significant, as both actually handle it quite well. You are unlikely to notice major differences between the two systems in this respect for open-source virtualisation.
More about Xen servers and some providers of server solutions:
KVM vs Xen: Conclusion
KVM is the de facto standard, no question. However, Xen still proves to be a good and in many cases advantageous alternative; it is equally future-proof and can now be installed and configured with almost as little effort. Whether Xen's potential advantages will have an impact on your own server can only be determined on a case-by-case basis.
You should definitely test it — and certainly consider Xen as a valid alternative to KVM.
Our article is based on our own experience and research as well as information from external sources.
Sources & further reading on the topic:
https://www.linux-kvm.org/page/Main_Page (Official KVM community wiki)
https://www.redhat.com/de/topics/virtualization/what-is-KVM (Information from the owner of the KVM developer)
https://xenproject.org/ (Official Xen project website)
https://www.linux-magazin.de/ausgaben/2017/12/xen/ (Article about Xen in Linux Magazin)
Image credit:
Gerd Altmann on Pixabay
Write a comment
- Virtualisierung
Tags for this article
More web hosts
More interesting articles
KVM or VMware: Which Hypervisor is Better?
Here we take a closer look at the differences between KVM and VMware.