Installing latest VMM & libvirt on CentOS + performance tests
Linux - Virtualization and CloudThis forum is for the discussion of all topics relating to Linux Virtualization and Linux Cloud platforms. Xen, KVM, OpenVZ, VirtualBox, VMware, Linux-VServer and all other Linux Virtualization platforms are welcome. OpenStack, CloudStack, ownCloud, Cloud Foundry, Eucalyptus, Nimbus, OpenNebula and all other Linux Cloud platforms are welcome. Note that questions relating solely to non-Linux OS's should be asked in the General forum.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
Installing latest VMM & libvirt on CentOS + performance tests
Any thoughts on whether I would be able to install the latest VMM/libvirt on CentOS 6.2 and whether there are any other modules which would also need updating?
I need to use some of the latest virtualization feattures like
USB support which is not available by default in the versions used in CentOS.
The reason for choosing CentOS for the virtualization Host is explained below:
I have run some hypervisor speed tests based on the time Win 7 Pro install takes to complete 'Expanding Windows files', which as many of you know can be very sloww using KVM on many distros. These were all run with two CPU's active and 2Gb RAM except the native ones which had 8Gb RAM.
Code:
mins : secs
Fedora / KVM - 29:40
Native from DVD - 14:00
MS Hyper-V - 12:30
Native from HDD - 7:20 (setup started from Server 2k8)
CentOS / KVM - 7:00
Have all these benchmarks been done on the same hardware, under similar conditions? For example, there's a huge difference especially during windows VM installation, between usinf an actual CD and an ISO image, and the mount options of the mountpoint where the ISO is located also matter. a lot.
In any case, RHEL and derivatives definitely do have the best packaged and most polished builds of kvm and libvirt - this is where they are intended to run. This comes at a cost of raw edge features that make it into RHEL only when they become stable enough
Have all these benchmarks been done on the same hardware, under similar conditions? For example, there's a huge difference especially during windows VM installation, between usinf an actual CD and an ISO image, and the mount options of the mountpoint where the ISO is located also matter. a lot.
In any case, RHEL and derivatives definitely do have the best packaged and most polished builds of kvm and libvirt - this is where they are intended to run. This comes at a cost of raw edge features that make it into RHEL only when they become stable enough
Yes same hardware all the way through. You can see the difference between 'Native from DVD - 14:00' and 'Native from HDD - 7:20' which was from an iso. What different mount options are possible? All of these tests were done using standard (GUI) mounts with whatever default mount options that particular distro uses. Are there any specific mount options I should be looking for to ensure these results are comparible?
well, comparing native DVD passthrough into a VM and an ISO file or a loop mount is not correct. There are very different drivers involved in accessing this data, the one for ISO files and loop mounts being more efficient because it has no need to issue so many ioctl()'s, which in turn cause a vm_exit().
The typical mount options to speed up performance is "noatime" and "nodiratime", using elevator=deadline on the host side.
As for why Fedora was slow for you, that needs to be investigated, probably something to do with disk caching or VM misconfiguration, it should definitely be as fast as a RHEL machine, or at least close, if not actually faster. This comes at the price of stability though.
Just to try Fedora again I have just done a clean install of Fedora 17. Install the necessary, copied the iso locally and tried to install a Win 7 virtual machine from that loacl iso. Windows installer Expanding files took over an hour! This compared to just seven minutes with CentOS as the VM host. There must be a reason for this difference but I can't see any obvious cause apart from Fedora using the workstation kernel and CentOS using the server kernel.
workstation kernel? server kernel? what does it mean anyway?
There must be a reason, and it can be found, but that requires investigation
When I was originally looking into using Ubuntu for virtualization I was informed that there were both generic and server kernels. Maybe that isn't correct then?
If there is a reason how do I go about finding it. There are no differences that I can see in the virtualization environments between the different distros. But there is obviously something going on to make CentOS perform ten times faster than others! Where else can I look to find this difference?
There are many reports in both the Fedora and Ubuntu world about Win 7 being extremely slow at Expanding Files, unfortunately no solutions that I have found yet. As I said also same issue in Fedora 17 which was why I was surprised to find CentOS install Win 7 at almost native speed. I agree there must be a difference but have no idea how to go about finding the cause of it, if you have any ideas let me know.
I'd start with kvm_stat, and with monitoring the host for io bottlenecks during the VM setup.
As for kernels, well, centos is a RHEL clone, and RHEL is specifically built optimized for server loads. There is no such thing as a "server" or "desktop" kernel as such, but Linux is very flexible, and specific sets of drivers, compiled and patched properly, can definitely increase performance under specific loads, and this is what happens in RHEL - the kernel is built to accomodate serious hardware performing serious tasks. On the other hand, this means that in order to keep the kernel small and directed towards the right type of hardware, less relevant stuff is removed. I doubt for example, that a RHEL kernel contains joystick drivers.
Leaving philosophy aside, if centos works for you - great, that only shows how much better RHEL is built than other distros.
I'd start with kvm_stat, and with monitoring the host for io bottlenecks during the VM setup.
As for kernels, well, centos is a RHEL clone, and RHEL is specifically built optimized for server loads. There is no such thing as a "server" or "desktop" kernel as such, but Linux is very flexible, and specific sets of drivers, compiled and patched properly, can definitely increase performance under specific loads, and this is what happens in RHEL - the kernel is built to accomodate serious hardware performing serious tasks. On the other hand, this means that in order to keep the kernel small and directed towards the right type of hardware, less relevant stuff is removed. I doubt for example, that a RHEL kernel contains joystick drivers.
Leaving philosophy aside, if centos works for you - great, that only shows how much better RHEL is built than other distros.
Sad to say that although it is multiple times faster than everything else as a virtualization host, CentOS just doesn't quite work for me. A couple of small unsolved bugs that I could live with at a push but biggest drwaback is that it only has older versions of virt-manager/qemu-kvm/libvirt available which do not support USB in the VMs. Hence the reason I am still searching for an alternative but all the alternatives seem to suffer from this same incredibly slow windows expanding files problem.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.