LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Virtualization and Cloud
User Name
Password
Linux - Virtualization and Cloud This 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


Reply
  Search this Thread
Old 02-05-2015, 06:01 AM   #1
Holering
Member
 
Registered: Feb 2010
Distribution: Slackware - Gentoo - Debian
Posts: 197

Rep: Reputation: 22
Qemu KVM vga passthrough slow cpu speed


Slackware 64 14.1 and Qemu 2.0.

I'm using vga passthrough for Windows 7 x64 guest and CPU performance is slow. Is this because I'm using the default 440FX chipset (machine type PC)? I'm using "host" for cpu type, and qemu-kvm.

Heard reports of 95% native performance possible but find it hard to believe. I think I'm getting around %40-%60 and maybe slower in some cases.

Last edited by Holering; 02-05-2015 at 09:27 AM.
 
Old 02-05-2015, 08:45 AM   #2
smallpond
Senior Member
 
Registered: Feb 2011
Location: Massachusetts, USA
Distribution: Fedora
Posts: 4,150

Rep: Reputation: 1264Reputation: 1264Reputation: 1264Reputation: 1264Reputation: 1264Reputation: 1264Reputation: 1264Reputation: 1264Reputation: 1264
VGA passthrough requires an IOMMU and VT-d (Intel) or Vi (AMD) support to allow the guest VM to directly access your second graphics card. When using VGA passthrough the guest controls the actual card, not an emulated i440FX, so it will run at full speed. Instead of using -machine you will need to give the individual options to qemu including the PCI location of the VGA controller that you are passing through.

http://www.linux-kvm.org/page/How_to...th_VT-d_in_KVM
 
1 members found this post helpful.
Old 02-05-2015, 09:33 AM   #3
Holering
Member
 
Registered: Feb 2010
Distribution: Slackware - Gentoo - Debian
Posts: 197

Original Poster
Rep: Reputation: 22
Okay I will try without specifying -machine.

Other things I tried: Set host cpu governor to performance but it doesn't help. Also, when I run Windows 98 guest, I have a constant %100 cpu usage during idle with sluggish response. I thought maybe this had something with the watchdog timer?

EDIT:
Tried with hugetlbfs and 2048 hugepages (4GB guest ram). Didn't notice any improvement (still sluggish cpu). Also used cache=none for "Windows 7 x64" raw img file, but this slows down boot time quite a bit. I can't play HD movies without choppy performance.

Any help is greatly appreciated!

Last edited by Holering; 02-05-2015 at 12:34 PM.
 
Old 02-07-2015, 01:16 PM   #4
Holering
Member
 
Registered: Feb 2010
Distribution: Slackware - Gentoo - Debian
Posts: 197

Original Poster
Rep: Reputation: 22
Changed i/o scheduler to deadline, nested paging off, and virtual HD to vfio with cache=none. Still no improvement (maybe a hair better performance).

Also installed CPU scheduler patch for bulldozer CPU in Windows 7 x64, and disabled core parking in registry. Very minimal improvement but still terrible CPU use (hovers around %20 each core at most with demanding applications). I have a 7.4 CPU score in "Windows Experience" which doesn't seem bad IMO.

I don't understand why I get much better speeds natively? I hear claims of 95+% native performance with kvm, but this clearly isn't happening on my end. CPU consumption stays low and my GPU clearly becomes bottlenecked.

Forgot to mention I'm using piledriver with a Radeon HD 7750. Guest has 4gb RAM and 2048 hugetlbfs.
 
Old 02-08-2015, 04:55 PM   #5
Holering
Member
 
Registered: Feb 2010
Distribution: Slackware - Gentoo - Debian
Posts: 197

Original Poster
Rep: Reputation: 22
Still get bad performance.

Native Windows 7 x64 I try a FPS demo-game "Alien Rage". It gets 60FPS constant. In KVM it gets only around 30-40FPS no matter how low in-game performance settings are; also, cpu usage hovers around %25. Also tried the q35 chipset, and connecting vfio GPU to ioh3420 device (wasn't using ioh3420 before). How are others getting almost native speed https://www.youtube.com/watch?v=37D2bRsthfI?

Forgot to mention I'm using FX 6300 piledriver CPU. Guest "Windows 7 x64" has 4GB of ram.

Last edited by Holering; 02-08-2015 at 05:06 PM.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
qemu/kvm: permissions for pci-passthrough insectiod Linux - Virtualization and Cloud 1 08-20-2014 02:33 PM
LXer: Set up qemu-kvm-1.0+noroms as spice enabled qemu server vs qemu-kvm-spice on Ubuntu Precise LXer Syndicated Linux News 0 05-26-2012 07:41 AM
[Debian/Qemu/KVM] Why qemu --enable-kvm works but not kvm directly? gb2312 Linux - Virtualization and Cloud 2 03-21-2011 02:05 PM
LXer: Attempt of qemu-kvm-0.14 patching via Gerd’s Hoffmann “spice/qxl: locking fix for qemu-kvm” on LXer Syndicated Linux News 0 03-14-2011 01:20 PM
USB Passthrough Problem with KVM/QEMU on FC12 wdsnyc Linux - Virtualization and Cloud 1 02-23-2010 09:49 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Virtualization and Cloud

All times are GMT -5. The time now is 01:12 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration