[svlug] (forw) KVM vs Xen
newmans at sonic.net
Wed Oct 14 11:15:39 PDT 2015
On 10/14/2015 12:32 AM, Rick Moen wrote:
> Forwarded with permission from the main mailing list of Linux Users of
> Victoria (Melbourne).
> ----- Forwarded message from Russell Coker <russell at coker.com.au> -----
> Date: Wed, 14 Oct 2015 16:20:13 +1100
> From: Russell Coker <russell at coker.com.au>
> To: luv-main at luv.asn.au
> Subject: KVM vs Xen
> Xen has been widely regarded as the best performance VM for Linux for a long
> time. Oracle has been one of the advocates of Xen claiming very close to
> native hardware performance.
> # 300% improvement in UnixBench score, with a KVM Linode vs a Xen Linode
> # 28% faster at compiling a Linux kernel with a KVM Linode vs a Xen Linode
> # Boot and shutdown times are greatly improved
> Now Linode (one of the largest Xen sites) is moving to KVM, they list the
> above as benefits of KVM which surprises me. My experience of Xen is that the
> only way anything could be 300% faster is if it's an issue of disk IO
> scheduling on hard drives (as multiple virtual machines on the same spinning
> media causes contention and/or fragmentation issues depending on how you do
> it. But given that Linode was already using SSD for all storage that's
> obviously not what they are doing.
> The last time I tried KVM on my laptop the performance was a lot slower than
> native performance as opposed to Xen which was near enough to native hardware
> performance that the difference didn't matter. I've never even tested KVM on a
> server because the performance on my laptop (admittedly a couple of years ago)
> was very disappointing. Last time I tested KVM performance was not only
> noticably worse (EG compiles of selinux-policy-default taking about 50%
> longer) but the increase in CPU use was an issue of cooling.
> Has KVM improved a lot recently? How can anything be so much better than Xen
> when Xen has been so close to native performance for so long?
As was pointed out in the original thread, the hardware needs to have virtualization hardware extensions enabled and available for KVM to be fast
enough and the original poster may not have had them available.
Xen in PVHVM mode http://wiki.xen.org/wiki/Xen_Overview#PVHVM and KVM are both using QEMU and some virtualization aware drivers and should have, or be
capable of, similar performance, though I have not tested myself. To my best knowledge Linode always used paravirtualized xen, which for 64 bit
systems will often have worse performance than PVHVM mode
http://wiki.xen.org/wiki/Virtualization_Spectrum#Problems_with_paravirtualization:_AMD_and_x86-64 Amazon also points this out
The Xen developers are working on PVH mode http://wiki.xen.org/wiki/Xen_Overview#PVH which should have at least equal, if not superior, performance
and it does not need to use QEMU.
More information about the svlug