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

Blank Field ihatethisfield at gmail.com
Thu Oct 29 20:50:51 UTC 2015


There is an awesome redhat guide, it helped me a lot.
https://access.redhat.com/documentation/en-US/Red_Hat_Enterprise_Linux/7/pdf/Virtualization_Tuning_and_Optimization_Guide/Red_Hat_Enterprise_Linux-7-Virtualization_Tuning_and_Optimization_Guide-en-US.pdf
It is also available as a web page. There are other performance related
guides too.
I'm interested in this too.  I think the things to focus on might be
virtio, networking, accel, and cpu options.  As far as I can tell, the
'chipset' doesn't relate to performance.  All it does is pre-configure a
bunch of -device ...bus entries so that you can assume those buses are
there instead of adding the buses yourself.  I switched to starting with
-nodefaults and defining the buses myself.  Right now, when I have a game
running with high video and cpu usage, things are running real smoothly.
But when a game is downloading and patching, things get really bad and my
sound starts skipping.  I'm thinking it's the ahci sata device that's to
blame.  I'll try to do something like vioscsi and keep you posted.

I just read through http://www.linux-kvm.org/page/Tuning_KVM and it says
not to use btrfs for storing image files, but it doesn't say why.  I'm not
sure I'm willing to give up btrfs just yet, though.  Maybe I'll test with
chattr +C on the image files and play with some of the tuning like the
extent sizes.

-Eric Hattemer


On 10/29/2015 09:50 AM, 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
listvfio-users at redhat.comhttps://www.redhat.com/mailman/listinfo/vfio-users



_______________________________________________
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/20151029/576ca849/attachment.htm>


More information about the vfio-users mailing list