[CentOS] Virtualization platform choice

Sun Mar 27 13:41:04 UTC 2011
Steve Thompson <smt at vgersoft.com>

On Sun, 27 Mar 2011, Jussi Hirvi wrote:

> KVM would be a natural way to go, I suppose, only it is too bad CentOS 6
> will not be out in time for me - I guess KVM would be more mature in
> CentOS 6.

I have been using Xen with much success for several years, now with two 
CentOS 5.5 x86_64 Dom0's, hosting 29 (mixed Linux and Windows) and 30 (all 
Windows) guests respectively, using only packages from the distro along 
with the GPLPV drivers on the Windows guests (so it's Xen 3.1, not the 
latest). A couple of weeks ago I decided (on the first of these hosts) to 
give KVM a look, since I was able to take the machine down for a while. 
All guests use LVM volumes, and were unchanged between Xen and KVM (modulo 
pv drivers). The host is a Dell PE2900 with 24 GB memory and E5345 
processors (8 cores). Bridged mode networking. What follows is obviously 
specific to my environment, so YMMV.

The short story is that I plan to keep using KVM. It has been absolutely 
solid and without any issues whatsoever, and performance is significantly 
better than Xen in all areas that I have measured (and also in the "feels 
good" benchmark). Migration from Xen to KVM was almost trivially simple.

The slightly longer story...

First. With Xen I was never able to start more than 30 guests at one time 
with any success; the 31st guest always failed to boot or crashed during 
booting, no matter which guest I chose as the 31st. With KVM I chose to 
add more guests to see if it could be done, with the result that I now 
have 36 guests running simultaneously.

Second. I was never able to keep a Windows 7 guest running under Xen for 
more than a few days at a time without a BSOD. I haven't seen a single 
crash under KVM.

Third. I was never able to successfully complete a PXE-based installation 
under Xen. No problems with KVM.

Fourth. My main work load consists of a series of builds of a package of 
about 1100 source files and about 500 KLOC's; all C and C++. Here are the 
elapsed times (min:sec) to build the package on a CentOS 5 guest (1 vcpu), 
each time with the guest being the only active guest (although the others 
were running). Sources come from NFS, and targets are written to NFS, with 
the host being the NFS server.

* Xen HVM guest (no pv drivers): 29:30
* KVM guest, no virtio drivers: 23:52
* KVM guest, with virtio: 14:38

Fifth: I love being able to run top/iostat/etc on the host and see just 
what the hardware is really up to, and to be able to overcommit memory.

Steve