LowEndBox - Cheap VPS, Hosting and Dedicated Server Deals

OpenVZ, Xen, and KVM – the differences, the advantages, a comparison

This editorial has been written by Anthony Smith from Inception Hosting. Thank you, Anthony, for your valued contribution to LowEndBox!

This overview is intended to be just that, this is just the first installment and is not intended as a fine detail technical paper simply a no nonsense overview to help in your decision making.

While this may be old news some some the subject comes up time and time again, what is the difference, which one is faster, which one should I use and so on so initially let’s start with a non exhaustive comparison table:

KVM

KVM is full hardware virtualisation, you can run almost any operating system as a guest BSD/Windows/Linux and with virtio driver you will get near native performance, some experiments have shown only 3% loss on native hardware under ideal circumstances.

It does support installation from ISO and also template based installation, it comes with good separation in terms of privacy, it can suffer I/O lag under heavy load which impacts the guest operating systems and the host operating system.

Each guest (VM) runs as a process on the host node while this is great for discovering which guest is causing issues when required it can also cause problems if the host is under heavy load all guests suffer.

You can over allocate Ram with little effort however in most cases unless the host is full SSD this is unlikely to happen due to the overhead it puts on the host node and subsequent and obvious performance issues.

Due to KVM being native in most modern kernels it does lend a performance advantage over others in some circumstances and is still fairly new and under very active development.

Most people select KVM for excellent performance and flexibility although perhaps not quite as stable as Xen due to maturity.

XEN

Xen comes in 2 flavors but can run simultaneously on the same physical host, Xen PV (paravirtualisation) and HVM (full hardware virtualisation)

Xen PV guests (in the hosting industry) tend to be template based for repid deployment and snappy performance, you can run your own kernel in Xen PV and this is pretty much default these days, you can only run Linux on Xen PV (BSD with additional configuration is possible but not common).

Xen HVM runs much like KVM it has better drivers for Linux based distributions as PV has been available by default since around 2006 in most kernels so you do not need to install virtio for a performance boost however NetBSD and windows perform poorly on Xen HVM compared to KVM, while you can over come this to some degree on Windows with Xen PV drivers for Windows it does not run as well as KVM out of the box so to speak.

Xen is quite old now and very mature, most people select Xen for good performance with exceptional stability.

Xen hosts will usually pre-allocate Ram and CPU cores to the xen hypervisor so it has its own dedicated resources that guests cannot impact on to achieve stability.

OpenVZ

OpenVZ is hugely popular in the hosting industry due to its rapid deployment and very high density, it achieves this as the host kernel is shared with the guests along with ram, cpu and disk, with fairly basic separation between guest and host the I/O bottleneck is almost none existent.

In terms of disk access speed and disk latency OpenVZ is a clear winner when compared to KVM and Xen however this comes at the cost of lack of separation in terms of privacy and also in terms of how much impact 1 guest OS can have on both the host node and other guests, all individual processes are visible to the host node and you cannot encrypt your data.

OpenVZ supports Linux only (unless using the commercial parallels which will support windows in a fashion)

OpenVZ can also be nested inside Xen or KVM to achieve even greater density, due to the volume of containers you can run on a single host node this keeps the price of OpenVZ much more competitive than KVM and Xen.

Jon Biloh

5 Comments

  1. ValdikSS:

    You forgot the main thing, that KVM and XEN are visualization technologies while OpenVZ is a containerization technology. OpenVZ will work only for people who use only userspace applications as you can’t change the kernel and most of the time the owner of your VPS won’t load new modules for you.

    January 1, 2017 @ 10:25 am | Reply
  2. Anthony Smith:

    What… I wrote this about 2 years ago, much has changed and this should be ignored.

    January 4, 2017 @ 11:38 pm | Reply
    • Anthony Smith:

      Actually having re-read it most of it still stands up, ignore my previous comment.

      January 4, 2017 @ 11:42 pm | Reply
  3. Julcar:

    XEN and KVM uses mainly QEMU kernel

    January 24, 2017 @ 1:03 pm | Reply
  4. Skype has established its web-dependent client beta on the entire world, right after introducing it extensively within the Usa and You.K.

    previous this 30 days. Skype for Website also now supports Chromebook
    and Linux for instant text messaging connection (no
    voice and video yet, individuals demand a connect-in installing).

    The expansion of your beta contributes assist for a longer set of
    spoken languages to aid reinforce that international user
    friendliness

    June 28, 2017 @ 8:37 pm | Reply

Leave a Reply

Some notes on commenting on LowEndBox:

  • Do not use LowEndBox for support issues. Go to your hosting provider and issue a ticket there. Coming here saying "my VPS is down, what do I do?!" will only have your comments removed.
  • Akismet is used for spam detection. Some comments may be held temporarily for manual approval.
  • Use <pre>...</pre> to quote the output from your terminal/console, or consider using a pastebin service.

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