[SOLVED] KVM low 2D graphics performance

Questions about virtualization software
Forum rules
Before you post please read how to get help
Post Reply
powerhouse
Level 6
Level 6
Posts: 1066
Joined: Thu May 03, 2012 3:54 am
Location: Israel
Contact:

[SOLVED] KVM low 2D graphics performance

Post by powerhouse » Thu Aug 16, 2018 9:51 am

I'm running Windows 10 in a virtual machine using kvm with VGA passthrough (see my tutorial sticky). For the last 6 years I got nearly identical benchmarks when comparing to Windows on bare metal. Now my Windows 2D performance is down to a fraction of what it used to be.

I ran the Passmark 8 benchmark after I perceived some sluggishness in Lightroom. I can't tell when exactly this started, but it could be related either to the Linux Mint upgrade to 19, or the Windows 10 upgrade to 1803. Here the benchmark summary:
Capture-20180815-3.PNG
Passmark benchmarks summary
The red graph represents a benchmark done a year ago, giving the Windows VM 10 threads (5 core a 2 threads). At that time everything was fine.

The blue graph represents a recent benchmark of Windows 10 installed directly on the hardware I'm running (no VM). As you can see, it doesn't suffer from a performance drop in the 2D benchmark!

The yellow graph is a new Windows VM I created using virtlib / virt-manager (the graphical GUI). This represents the best result I got after manually tuning the xml config file.

The green graph is my Windows 10 VM restored from backup onto a new SSD. It is my current system, after I tried all the options I could think of.

As you can see, both the red and the blue benchmarks show no 2D issues. Only the two recent benchmarks show a severe performance drop in 2D graphics, and only there. All the other benchmarks are OK (the green memory benchmark, that is my latest benchmark on the current system, falls a little behind the others). Here the detailed 2D results:
Capture-20180815-3-2d.PNG
Passmark 2D benchmark - here is the problem
The results for Simple Vectors, Image Filters, and Direct 2D are OK. But Complex Vectors, Fonts and Text, and Windows Interface are bad. Finally Image Rendering speed literally sucks!

Here my hardware:
i7 3930k overclocked to 4.2 GHz
24GB RAM, thereof 16GB for the Windows VM using hugepages
Nvidia GTX 970 GPU passed to the Windows VM (VGA passthrough)
Samsung 850 EVO 250GB used for the first test (red graph)
Samsung 860 EVO 1TB used for all other benchmarks

Software:
Red benchmark: Linux Mint 18.3, qemu 2.5, Windows VM: Windows 10 Pro 1703
All other benchmarks: Linux Mint 19, qemu 2.11, Windows VM: Windows 10 Pro 1803
Yellow benchmark: libvirt 4.0.0, virt-manager 1.5.1, the rest same as above


I wonder if you made the same experience, or if this is a configuration problem on my system. Perhaps there is someone out there that has a solution.

Thanks!
Last edited by powerhouse on Fri Aug 17, 2018 8:32 pm, edited 1 time in total.
Asus Sabertooth X79, i7 3930K CPU, 8x4GB Kingston DDR3, Noctua NH-D14 CPU cooler, GTX 970 + Quadro 2000 GPU, Asus Xonar Essence STX, Sandisk 120GB + Samsung EVO 860 1TB SSD + 4 HDD, Corsair 500R, SeaSonic 660W Gold X PS https://heiko-sieger.info

powerhouse
Level 6
Level 6
Posts: 1066
Joined: Thu May 03, 2012 3:54 am
Location: Israel
Contact:

Re: KVM low 2D graphics performance

Post by powerhouse » Fri Aug 17, 2018 8:22 pm

Thanks to a member at the reddit r/VFIO group I found the reason for the low 2D graphics performance. It turns out the Spectre vulnerability protection update in Windows didn't play well with 2D graphics.

Since good 2D graphics performance is essential for photo editing under Windows, I disabled the Spectre protection. However, this does expose Windows to the various Spectre vulnerabilities and is normally not recommended. I hope with time someone finds a way to fix it.

Here is a detailed description of the issue and the workaround.
Asus Sabertooth X79, i7 3930K CPU, 8x4GB Kingston DDR3, Noctua NH-D14 CPU cooler, GTX 970 + Quadro 2000 GPU, Asus Xonar Essence STX, Sandisk 120GB + Samsung EVO 860 1TB SSD + 4 HDD, Corsair 500R, SeaSonic 660W Gold X PS https://heiko-sieger.info

Post Reply

Return to “Virtualization”