[vfio-users] KVM options and the effect on performance

Ryan Flagler ryan.flagler at gmail.com
Fri Nov 13 21:02:56 UTC 2015


I finally got my server to a state that I can start doing some performance
testing. While researching the best way to handle network adapters, I came
across the following.

I'm currently using the following settings to utilize a bridge on my
machine named br0
-net bridge,br=br0 -net nic,macaddr=52:54:00:81:08:AB,model=virtio

Doing some more reading, it looks like this might actually have better
performance
-netdev bridge,br=br0,id=vnet0 -device
virtio-net-pci,netdev=vnet0,mac=52:54:00:81:08:AB,id=nic1

The 2nd command works, however passwing the mac address does not. It always
defaults to the generic mac. Am I doing something wrong? If I try to use
macaddr as the parameter I can an error that it isn't valid. Does anyone
know if there is even a functional difference between these two?

Lastly, my system has 4 NIC cards. Would it be faster or more efficient to
pass through the nic itself? From what I read, it the 2nd option above
should be just as fast as a physical NIC.

On Fri, Oct 30, 2015 at 9:05 PM Dan Ziemba <zman0900 at gmail.com> wrote:

> I'm using a 7850 for the host and a R9 280x (same as 7970) for the VM.
>  i7 3770 cpu.  I used to use the 7850 for the VM before I got the 280x,
> but I think that might have been only back when I was using Xen.  Setup
> works great for me, except for the ACS issues requiring the patch.
>
> -----Original Message-----
> From: Ryan Flagler <ryan.flagler at gmail.com>
> To: Dan Ziemba <zman0900 at gmail.com>, Mark Weiman <mark.weiman at markzz.co
> m>, vfio-users at redhat.com
> Subject: Re: [vfio-users] KVM options and the effect on performance
> Date: Fri, 30 Oct 2015 14:13:00 +0000
>
> Thanks for the config examples. What GPU's do you guys use? I'm
> struggling with 2 different AMD Radeon models (7850 and R9 380). Early
> on in my research I noticed people saying Radeons were easier to get
> working, but the deeper I dig, it seems nVidia cards have some initial
> quirks, but are more stable. Hopefully next week I'll get some time to
> tweak my setup more.
>
> On Thu, Oct 29, 2015 at 11:15 PM Dan Ziemba <zman0900 at gmail.com> wrote:
> > I'll also throw in the scripting I used to use before switching to
> > libvirt a month or so back.  The latest version is with the default
> > i440 machine, but if you look back in the history some you can see
> > how
> > I was using q35 before.
> >
> > https://github.com/zman0900/qemu-vifo
> >
> > -----Original Message-----
> > From: Mark Weiman <mark.weiman at markzz.com>
> > To: Ryan Flagler <ryan.flagler at gmail.com>, vfio-users at redhat.com
> > Subject: Re: [vfio-users] KVM options and the effect on performance
> > Date: Fri, 30 Oct 2015 00:00:21 -0400
> >
> > To be honest, I have found little to no real noticeable difference
> > between many of them.  My VMs usually use a qcow2 image that are
> > mounted via virtio.
> >
> > As for a CPU, I use an i7-4970K and it works beautifully.  It really
> > boils down to when you choose your hardware whether or not you've
> > done
> > the research beforehand so you can have a good time rather than
> > fighting it.  If I were to build my main rig again, I would have
> > looked
> > closer into the motherboard so I wouldn't have to patch my kernel,
> > although it really is not a problem to do with that CPU (I also
> > provide
> > a slightly modified version of Dan Ziemba's PKGBUILD [1] that
> > includes
> > the i915 and acs patch from my Arch Linux repository [2]).
> >
> > As for your Wiki idea, since this all is open source software, there
> > is
> > nothing preventing you from contributing to documentation on
> > this.  The
> > Arch Linux Wiki does provide a lot of information on how to do all of
> > this [3] and can guide you even if you aren't using Arch Linux.  Just
> > change the Arch specific bits to whatever distribution you use.
> >
> > If it helps, this is the script I use when I run my Windows 10 VM
> > [4].  It's really sloppy, but it seems to work for me.
> >
> > As for using btrfs to store images, I use it to store my images and I
> > have had no issue.  It just has to be pointed out that btrfs is still
> > under development, so you should just put that under consideration.
> >
> > Didn't want to leave ya hangin,
> > Mark Weiman
> >
> > [1] https://aur.archlinux.org/packages/linux-vfio-lts
> > [2] https://wiki.archlinux.org/index.php/Unofficial_user_repositories
> > #m
> > arkzz
> > [3] https://wiki.archlinux.org/index.php/PCI_passthrough_via_OVMF
> > [4] http://info.markzz.com/kvm-start.sh
> >
> > On Thu, 2015-10-29 at 16:50 +0000, Ryan Flagler wrote:
> > > Hey everyone, sorry if I'm doing this wrong, this is my first time
> > > using a mailing list. (Side note, if anyone has a better way to
> > view
> > > historical emails than the web page, please let me know)
> > >
> > > I've been tinkering with KVM for a bit on my system and had some
> > > general performance questions to ask. I see a lot of people doing
> > VGA
> > > passthrough using the q35 chipset instead of the i440FX chipset.
> > I've
> > > personally had no luck getting q35 to be stable for me, and I've
> > seen
> > > some people say it's not worth the headache. But the big question
> > to
> > > me, is there a performance difference with CPU, VGA, memory etc.
> > > using q35? I'm not looking for specifics, but I'm curious about the
> > > following qemu parameters.
> > >
> > > Which chipset emulation performs better and in what areas?
> > > q35 vs i440fx
> > >
> > > What is the best way to pass a disk through to a VM to get the most
> > > performance?
> > > .img file, /dev/sd[x] disk, virtio-scsi, etc.
> > >
> > > What is the best way to handle networking?
> > > virtio-nic, hardware passthrough, bridge, nat, etc.
> > >
> > > What is the best way to assign CPUs?
> > > cpu pinning, assigning host cpu parameters, etc.
> > >
> > > Does the BIOS have an effect on performance?
> > > seabios vs OVMF?
> > >
> > > CPU/Chipset IOMMU support - Not necessarily performance related,
> > but
> > > stability?
> > > e5 vs e3 vs i7 vs cpu architecture etc. What things are good to
> > look
> > > for, what are bad? Etc.
> > >
> > > What would be interesting, especially as a new KVM/Qemu user, would
> > > be to see an entire wiki/performance page with examples and
> > > specifics. It's hard to filter through all the various pages of VM
> > > options where people don't really explain why they're doing
> > something
> > > the way they are.
> > >
> > > Examples:
> > >
> > > Disk Options
> > > Best
> > > -device virtio-scsi-pci,id=scsi
> > > -drive file=/dev/sd[x],id=disk,format=ls raw,if=none -device scsi-
> > > hd,drive=disk
> > >
> > > Better
> > > -device virtio-scsi-pci,id=scsi
> > > -drive file=/opt/[vm_name].img,id=disk,format=raw -device scsi-
> > > hd,drive=disk
> > >
> > > Good
> > > -drive file=/opt/[vm_name].img,id=disk,format=raw -device ide-
> > > hd,bus=ide.0,drive=disk
> > >
> > > And maybe an overall explanation of why one is better over the
> > other.
> > > I know this may not exist and I'm not asking a single person to do
> > > the leg work, but being new to this, it's hard to focus on the
> > pieces
> > > that matter vs just using the first thing I find that works. If
> > there
> > > is a "right" place to start something like this I'd be happy to
> > setup
> > > a generic page where more experienced people could easily
> > contribute.
> > >
> > > Thanks - Ryan
> > >
> > >
> > > _______________________________________________
> > > vfio-users mailing list
> > > vfio-users at redhat.com
> > _______________________________________________
> > vfio-users mailing list
> > vfio-users at redhat.com
> > https://www.redhat.com/mailman/listinfo/vfio-users
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://listman.redhat.com/archives/vfio-users/attachments/20151113/87799f39/attachment.htm>


More information about the vfio-users mailing list