Jatin Davey
2015-Apr-14 12:33 UTC
Re: [libvirt-users] VM Performance using KVM Vs. VMware ESXi
Thanks Dominique & Daniel. Looks like i need to upgrade my VMs kernel to make it aware of virtio. Found this information from this link: http://wiki.libvirt.org/page/Virtio#Disk_.28block.29_device_driver I tried without upgrading the Kernel and as soon as i start my VM it got into Kernel Panic. I will try using virtio after upgrading my VMs kernel. Thanks for all the responses and pointers. Thanks Jatin On 4/14/2015 5:08 PM, Dominique Ramaekers wrote:> Please read: https://libvirt.org/formatdomain.html > > > -----Oorspronkelijk bericht----- > Van: Jatin Davey [mailto:jashokda@cisco.com] > Verzonden: dinsdag 14 april 2015 13:39 > Aan: Daniel P. Berrange > CC: Dominique Ramaekers; libvirt-users@redhat.com > Onderwerp: Re: [libvirt-users] VM Performance using KVM Vs. VMware ESXi > > On 4/14/2015 4:58 PM, Daniel P. Berrange wrote: >> On Tue, Apr 14, 2015 at 04:53:52PM +0530, Jatin Davey wrote: >>> On 4/14/2015 4:42 PM, Dominique Ramaekers wrote: >>>> About Spice: I think it’s good practice to use spice because it >>>> improves the performance of the VM in general by improving screen >>>> performance. If your VM is constantly displaying output, you’ll >>>> probably will notice a difference. >>>> >>> [Jatin] Ok, This is not my concern as of now. I will take a look at >>> it sometime later. >>>> About virtio: You can see it in the settings. Better yet, it’s in >>>> your XML. If you post your XML, we can take a look… >>>> >>> Here is the xml associated with my VM: >>> >>> ******************************** >>> <domain type='kvm'> >>> <devices> >>> <emulator>/usr/libexec/qemu-kvm</emulator> >>> <disk type='file' device='disk'> >>> <driver name='qemu' type='qcow2' cache='none'/> >>> <source file='/var/lib/libvirt/images/****.qcow2'/> >>> <target dev='hda' bus='ide'/> >>> <address type='drive' controller='0' bus='0' target='0' unit='0'/> >>> </disk> >> This disk is configured to use IDE, so performance of anything that >> does disk I/O is going to be terrible. You really want to be using virtio. >> >>> <interface type='bridge'> >>> <mac address='52:54:00:c9:58:c9'/> >>> <source bridge='br332'/> >>> <address type='pci' domain='0x0000' bus='0x00' slot='0x03' function='0x0'/> >>> </interface> >> This doesn't have any model listed at all, so it will be falling back >> to a generic emulated NIC. Again performance of this is likely going >> to be terrible for anything doing network I/O. You want to be using >> virtio for this too. >> >> Regards, >> Daniel > How do i make use of virtio for the both disk and network that you have mentioned above ? > Any pointers to it would be helpful. > > Thanks > Jatin--------------080300030508050503090808 Content-Type: text/html; charset="utf-8" Content-Transfer-Encoding: 8bit <html> <head> <meta content="text/html; charset=utf-8" http-equiv="Content-Type"> </head> <body bgcolor="#FFFFFF" text="#000000"> <font face="Times New Roman">Thanks Dominique & Daniel.<br> <br> Looks like i need to upgrade my VMs kernel to make it aware of virtio.<br> <br> Found this information from this link:<br> <br> <a class="moz-txt-link-freetext" href="http://wiki.libvirt.org/page/Virtio#Disk_.28block.29_device_driver">http://wiki.libvirt.org/page/Virtio#Disk_.28block.29_device_driver</a><br> <br> I tried without upgrading the Kernel and as soon as i start my VM it got into Kernel Panic. I will try using virtio after upgrading my VMs kernel.<br> <br> Thanks for all the responses and pointers.<br> <br> Thanks<br> Jatin<br> </font><br> <div class="moz-cite-prefix">On 4/14/2015 5:08 PM, Dominique Ramaekers wrote:<br> </div> <blockquote cite="mid:5CFBD7F4A5E6214CAAA69C03E2E1CD195451BB4E04@cmsrv5.cometal.be" type="cite"> <pre wrap="">Please read: <a class="moz-txt-link-freetext" href="https://libvirt.org/formatdomain.html">https://libvirt.org/formatdomain.html</a> -----Oorspronkelijk bericht----- Van: Jatin Davey [<a class="moz-txt-link-freetext" href="mailto:jashokda@cisco.com">mailto:jashokda@cisco.com</a>] Verzonden: dinsdag 14 april 2015 13:39 Aan: Daniel P. Berrange CC: Dominique Ramaekers; <a class="moz-txt-link-abbreviated" href="mailto:libvirt-users@redhat.com">libvirt-users@redhat.com</a> Onderwerp: Re: [libvirt-users] VM Performance using KVM Vs. VMware ESXi On 4/14/2015 4:58 PM, Daniel P. Berrange wrote: </pre> <blockquote type="cite"> <pre wrap="">On Tue, Apr 14, 2015 at 04:53:52PM +0530, Jatin Davey wrote: </pre> <blockquote type="cite"> <pre wrap="">On 4/14/2015 4:42 PM, Dominique Ramaekers wrote: </pre> <blockquote type="cite"> <pre wrap="">About Spice: I think it’s good practice to use spice because it improves the performance of the VM in general by improving screen performance. If your VM is constantly displaying output, you’ll probably will notice a difference. </pre> </blockquote> <pre wrap="">[Jatin] Ok, This is not my concern as of now. I will take a look at it sometime later. </pre> <blockquote type="cite"> <pre wrap="">About virtio: You can see it in the settings. Better yet, it’s in your XML. If you post your XML, we can take a look… </pre> </blockquote> <pre wrap="">Here is the xml associated with my VM: ******************************** <domain type='kvm'> <devices> <emulator>/usr/libexec/qemu-kvm</emulator> <disk type='file' device='disk'> <driver name='qemu' type='qcow2' cache='none'/> <source file='/var/lib/libvirt/images/****.qcow2'/> <target dev='hda' bus='ide'/> <address type='drive' controller='0' bus='0' target='0' unit='0'/> </disk> </pre> </blockquote> <pre wrap="">This disk is configured to use IDE, so performance of anything that does disk I/O is going to be terrible. You really want to be using virtio. </pre> <blockquote type="cite"> <pre wrap=""> <interface type='bridge'> <mac address='52:54:00:c9:58:c9'/> <source bridge='br332'/> <address type='pci' domain='0x0000' bus='0x00' slot='0x03' function='0x0'/> </interface> </pre> </blockquote> <pre wrap="">This doesn't have any model listed at all, so it will be falling back to a generic emulated NIC. Again performance of this is likely going to be terrible for anything doing network I/O. You want to be using virtio for this too. Regards, Daniel </pre> </blockquote> <pre wrap="">How do i make use of virtio for the both disk and network that you have mentioned above ? Any pointers to it would be helpful. Thanks Jatin </pre> </blockquote> <br> </body> </html> --------------080300030508050503090808--
Sven Schwedas
2015-Apr-14 12:50 UTC
Re: [libvirt-users] VM Performance using KVM Vs. VMware ESXi
On 2015-04-14 14:33, Jatin Davey wrote:> Thanks Dominique & Daniel. > > Looks like i need to upgrade my VMs kernel to make it aware of virtio.Unless their kernels are very old, you only need to rebuild your initrd as documented in the wiki (or similarly for other distributions).> > Found this information from this link: > > http://wiki.libvirt.org/page/Virtio#Disk_.28block.29_device_driver > > I tried without upgrading the Kernel and as soon as i start my VM it got > into Kernel Panic. I will try using virtio after upgrading my VMs kernel. > > Thanks for all the responses and pointers. > > Thanks > Jatin > > On 4/14/2015 5:08 PM, Dominique Ramaekers wrote: >> Please read: https://libvirt.org/formatdomain.html >> >> >> -----Oorspronkelijk bericht----- >> Van: Jatin Davey [mailto:jashokda@cisco.com] >> Verzonden: dinsdag 14 april 2015 13:39 >> Aan: Daniel P. Berrange >> CC: Dominique Ramaekers; libvirt-users@redhat.com >> Onderwerp: Re: [libvirt-users] VM Performance using KVM Vs. VMware ESXi >> >> On 4/14/2015 4:58 PM, Daniel P. Berrange wrote: >>> On Tue, Apr 14, 2015 at 04:53:52PM +0530, Jatin Davey wrote: >>>> On 4/14/2015 4:42 PM, Dominique Ramaekers wrote: >>>>> About Spice: I think it’s good practice to use spice because it >>>>> improves the performance of the VM in general by improving screen >>>>> performance. If your VM is constantly displaying output, you’ll >>>>> probably will notice a difference. >>>>> >>>> [Jatin] Ok, This is not my concern as of now. I will take a look at >>>> it sometime later. >>>>> About virtio: You can see it in the settings. Better yet, it’s in >>>>> your XML. If you post your XML, we can take a look… >>>>> >>>> Here is the xml associated with my VM: >>>> >>>> ******************************** >>>> <domain type='kvm'> >>>> <devices> >>>> <emulator>/usr/libexec/qemu-kvm</emulator> >>>> <disk type='file' device='disk'> >>>> <driver name='qemu' type='qcow2' cache='none'/> >>>> <source file='/var/lib/libvirt/images/****.qcow2'/> >>>> <target dev='hda' bus='ide'/> >>>> <address type='drive' controller='0' bus='0' target='0' unit='0'/> >>>> </disk> >>> This disk is configured to use IDE, so performance of anything that >>> does disk I/O is going to be terrible. You really want to be using virtio. >>> >>>> <interface type='bridge'> >>>> <mac address='52:54:00:c9:58:c9'/> >>>> <source bridge='br332'/> >>>> <address type='pci' domain='0x0000' bus='0x00' slot='0x03' function='0x0'/> >>>> </interface> >>> This doesn't have any model listed at all, so it will be falling back >>> to a generic emulated NIC. Again performance of this is likely going >>> to be terrible for anything doing network I/O. You want to be using >>> virtio for this too. >>> >>> Regards, >>> Daniel >> How do i make use of virtio for the both disk and network that you have mentioned above ? >> Any pointers to it would be helpful. >> >> Thanks >> Jatin > > > > _______________________________________________ > libvirt-users mailing list > libvirt-users@redhat.com > https://www.redhat.com/mailman/listinfo/libvirt-users >-- Mit freundlichen Grüßen, / Best Regards, Sven Schwedas Systemadministrator TAO Beratungs- und Management GmbH | Lendplatz 45 | A - 8020 Graz Mail/XMPP: sven.schwedas@tao.at | +43 (0)680 301 7167 http://software.tao.at
Tom Hughes
2015-Apr-14 13:02 UTC
Re: [libvirt-users] VM Performance using KVM Vs. VMware ESXi
On 14/04/15 13:33, Jatin Davey wrote:> Thanks Dominique & Daniel. > > Looks like i need to upgrade my VMs kernel to make it aware of virtio. > > Found this information from this link: > > http://wiki.libvirt.org/page/Virtio#Disk_.28block.29_device_driver > > I tried without upgrading the Kernel and as soon as i start my VM it got > into Kernel Panic. I will try using virtio after upgrading my VMs kernel.As somebody has already said it would have to be a really old kernel to not handle virtio-block, and it's more likely that your bootloader and/or initrd are confused by sda becoming vda. However if your kernel supports it then virtio-scsi should be even better than virtio-block and shouldn't cause the device name to change. Tom -- Tom Hughes (tom@compton.nu) http://compton.nu/
Jatin Davey
2015-Apr-14 13:16 UTC
Re: [libvirt-users] VM Performance using KVM Vs. VMware ESXi
On 4/14/2015 6:32 PM, Tom Hughes wrote:> On 14/04/15 13:33, Jatin Davey wrote: > >> Thanks Dominique & Daniel. >> >> Looks like i need to upgrade my VMs kernel to make it aware of virtio. >> >> Found this information from this link: >> >> http://wiki.libvirt.org/page/Virtio#Disk_.28block.29_device_driver >> >> I tried without upgrading the Kernel and as soon as i start my VM it got >> into Kernel Panic. I will try using virtio after upgrading my VMs >> kernel. > > As somebody has already said it would have to be a really old kernel > to not handle virtio-block, and it's more likely that your bootloader > and/or initrd are confused by sda becoming vda. > > However if your kernel supports it then virtio-scsi should be even > better than virtio-block and shouldn't cause the device name to change. > > Tom >My VM is using the kernel 2.6.18-164.el5 [root@localhost ~]# uname -a Linux localhost 2.6.18-164.el5 #1 SMP Thu Sep 3 03:28:30 EDT 2009 x86_64 x86_64 x86_64 GNU/Linux Should this be fine ? Thanks Jatin
Matt Schumacher
2015-Apr-14 16:18 UTC
Re: [libvirt-users] VM Performance using KVM Vs. VMware ESXi
Jatin, Using qemu without the virtio scsi and nic drivers is like running vmware with ide disks and e1000 nic instead of LSI disks and vmxnet3 nics, it forces the system to emulate completely different hardware. In linux the virtio drivers are implemented in the kernel, so you either need a new kernel or the virtio kernel modules. I'm not sure which for RHEL5, but I suspect you can get what you need with the kmod-virtio package, then rebuilding the initrd image to load the modules at boot. Keep in mind that sda will change to vda, which on some linux distros requires updates to the bootloader and inittab, but redhat uses filesystem labels if I remember correctly, so it should just work. Please let us know how the benchmarks look after you get virtio working, I'm curious... schu On 4/14/2015 5:33 AM, Jatin Davey wrote:> Thanks Dominique & Daniel. > > Looks like i need to upgrade my VMs kernel to make it aware of virtio. > > Found this information from this link: > > http://wiki.libvirt.org/page/Virtio#Disk_.28block.29_device_driver > > I tried without upgrading the Kernel and as soon as i start my VM it > got into Kernel Panic. I will try using virtio after upgrading my VMs > kernel. > > Thanks for all the responses and pointers. > > Thanks > Jatin > > On 4/14/2015 5:08 PM, Dominique Ramaekers wrote: >> Please read:https://libvirt.org/formatdomain.html >> >> >> -----Oorspronkelijk bericht----- >> Van: Jatin Davey [mailto:jashokda@cisco.com] >> Verzonden: dinsdag 14 april 2015 13:39 >> Aan: Daniel P. Berrange >> CC: Dominique Ramaekers;libvirt-users@redhat.com >> Onderwerp: Re: [libvirt-users] VM Performance using KVM Vs. VMware ESXi >> >> On 4/14/2015 4:58 PM, Daniel P. Berrange wrote: >>> On Tue, Apr 14, 2015 at 04:53:52PM +0530, Jatin Davey wrote: >>>> On 4/14/2015 4:42 PM, Dominique Ramaekers wrote: >>>>> About Spice: I think it's good practice to use spice because it >>>>> improves the performance of the VM in general by improving screen >>>>> performance. If your VM is constantly displaying output, you'll >>>>> probably will notice a difference. >>>>> >>>> [Jatin] Ok, This is not my concern as of now. I will take a look at >>>> it sometime later. >>>>> About virtio: You can see it in the settings. Better yet, it's in >>>>> your XML. If you post your XML, we can take a look... >>>>> >>>> Here is the xml associated with my VM: >>>> >>>> ******************************** >>>> <domain type='kvm'> >>>> <devices> >>>> <emulator>/usr/libexec/qemu-kvm</emulator> >>>> <disk type='file' device='disk'> >>>> <driver name='qemu' type='qcow2' cache='none'/> >>>> <source file='/var/lib/libvirt/images/****.qcow2'/> >>>> <target dev='hda' bus='ide'/> >>>> <address type='drive' controller='0' bus='0' target='0' unit='0'/> >>>> </disk> >>> This disk is configured to use IDE, so performance of anything that >>> does disk I/O is going to be terrible. You really want to be using virtio. >>> >>>> <interface type='bridge'> >>>> <mac address='52:54:00:c9:58:c9'/> >>>> <source bridge='br332'/> >>>> <address type='pci' domain='0x0000' bus='0x00' slot='0x03' function='0x0'/> >>>> </interface> >>> This doesn't have any model listed at all, so it will be falling back >>> to a generic emulated NIC. Again performance of this is likely going >>> to be terrible for anything doing network I/O. You want to be using >>> virtio for this too. >>> >>> Regards, >>> Daniel >> How do i make use of virtio for the both disk and network that you have mentioned above ? >> Any pointers to it would be helpful. >> >> Thanks >> Jatin > > > > _______________________________________________ > libvirt-users mailing list > libvirt-users@redhat.com > https://www.redhat.com/mailman/listinfo/libvirt-users
Nikki VonHollen
2015-Apr-14 20:51 UTC
Re: [libvirt-users] VM Performance using KVM Vs. VMware ESXi
Hi Jatin, The RedHat documentation on this is extremely helpful. It's so helpful that I use it as a reference on completely different distributions. VMWare does a pretty good job of guiding you and giving you defaults that are sensible. With Libvirt/QEMU/KVM, you need to get an idea of those and enable them yourself. For example, I see that you are using qcow2 files, but if you don't need the features it provides, then using block devices (usually logical volumes in a volume group) directly for VM disks may be significantly faster. It also depends on how caching is configured. The manuals will step you through all of that. Pay special attention to storage, because it's the first bottleneck a lot of applications hit. Check out the manuals under the virtualization section here: https://access.redhat.com/documentation/en-US/Red_Hat_Enterprise_Linux/ Specifically: https://access.redhat.com/documentation/en-US/Red_Hat_Enterprise_Linux/7/html/Virtualization_Tuning_and_Optimization_Guide/index.html Good luck! Nikki On Tue, Apr 14, 2015 at 9:18 AM, Matt Schumacher <matt.s@aptalaska.com> wrote:> Jatin, > > Using qemu without the virtio scsi and nic drivers is like running vmware > with ide disks and e1000 nic instead of LSI disks and vmxnet3 nics, it > forces the system to emulate completely different hardware. > > In linux the virtio drivers are implemented in the kernel, so you either > need a new kernel or the virtio kernel modules. I'm not sure which for > RHEL5, but I suspect you can get what you need with the kmod-virtio > package, then rebuilding the initrd image to load the modules at boot. > > Keep in mind that sda will change to vda, which on some linux distros > requires updates to the bootloader and inittab, but redhat uses filesystem > labels if I remember correctly, so it should just work. > > Please let us know how the benchmarks look after you get virtio working, > I'm curious... > > schu > > > > On 4/14/2015 5:33 AM, Jatin Davey wrote: > > Thanks Dominique & Daniel. > > Looks like i need to upgrade my VMs kernel to make it aware of virtio. > > Found this information from this link: > > http://wiki.libvirt.org/page/Virtio#Disk_.28block.29_device_driver > > I tried without upgrading the Kernel and as soon as i start my VM it got > into Kernel Panic. I will try using virtio after upgrading my VMs kernel. > > Thanks for all the responses and pointers. > > Thanks > Jatin > > On 4/14/2015 5:08 PM, Dominique Ramaekers wrote: > > Please read: https://libvirt.org/formatdomain.html > > > -----Oorspronkelijk bericht----- > Van: Jatin Davey [mailto:jashokda@cisco.com <jashokda@cisco.com>] > Verzonden: dinsdag 14 april 2015 13:39 > Aan: Daniel P. Berrange > CC: Dominique Ramaekers; libvirt-users@redhat.com > Onderwerp: Re: [libvirt-users] VM Performance using KVM Vs. VMware ESXi > > On 4/14/2015 4:58 PM, Daniel P. Berrange wrote: > > On Tue, Apr 14, 2015 at 04:53:52PM +0530, Jatin Davey wrote: > > On 4/14/2015 4:42 PM, Dominique Ramaekers wrote: > > About Spice: I think it’s good practice to use spice because it > improves the performance of the VM in general by improving screen > performance. If your VM is constantly displaying output, you’ll > probably will notice a difference. > > > [Jatin] Ok, This is not my concern as of now. I will take a look at > it sometime later. > > About virtio: You can see it in the settings. Better yet, it’s in > your XML. If you post your XML, we can take a look… > > > Here is the xml associated with my VM: > > ******************************** > <domain type='kvm'> > <devices> > <emulator>/usr/libexec/qemu-kvm</emulator> > <disk type='file' device='disk'> > <driver name='qemu' type='qcow2' cache='none'/> > <source file='/var/lib/libvirt/images/****.qcow2'/> > <target dev='hda' bus='ide'/> > <address type='drive' controller='0' bus='0' target='0' unit='0'/> > </disk> > > This disk is configured to use IDE, so performance of anything that > does disk I/O is going to be terrible. You really want to be using virtio. > > > <interface type='bridge'> > <mac address='52:54:00:c9:58:c9'/> > <source bridge='br332'/> > <address type='pci' domain='0x0000' bus='0x00' slot='0x03' function='0x0'/> > </interface> > > This doesn't have any model listed at all, so it will be falling back > to a generic emulated NIC. Again performance of this is likely going > to be terrible for anything doing network I/O. You want to be using > virtio for this too. > > Regards, > Daniel > > How do i make use of virtio for the both disk and network that you have mentioned above ? > Any pointers to it would be helpful. > > Thanks > Jatin > > > > > _______________________________________________ > libvirt-users mailing listlibvirt-users@redhat.comhttps://www.redhat.com/mailman/listinfo/libvirt-users > > > > _______________________________________________ > libvirt-users mailing list > libvirt-users@redhat.com > https://www.redhat.com/mailman/listinfo/libvirt-users >-- Nikki VonHollen Goobuntu Team <https://goto.google.com/goobuntu> 540-553-1904