[SOLVED] GPU passthrough laggy/slow

Grieol

New Member
Jul 13, 2022
4
0
1
Hello,

I am quite a noob with linux / proxmox and made a few KVM including a win 10 gaming machine with GPU passthrough. Unfortunatly for me, this machine is very slow/laggy and cannot really be used to play. The performance are a worse than on my 6 years old laptop.

novabench laptop : https://novabench.com/view/2576198
novabench gaming machine : https://novabench.com/view/2576196

I have read as much as I could on this problem and on the setting of this kind of virtual machine, tried differents settings but couldn't find a solution. I am using parsec to connect to the machine.

I mainly used those tutorials to make the GPU passthrough
https://github.com/lucduke/proxmox/blob/main/3-vm-gaming.md (in french)
https://3os.org/infrastructure/prox...virtual-machine-gpu-passthrough-configuration


Here are some informations on the proxmox server and the virtual machine:

Proxmox machine configuration:
  • CPU : AMD Ryzen 7 2700x
  • motherboard : aorus B450 M
  • Ram : 32 Gigs RAM
  • Drive : Aorus M.2 Gen 4 Black - 1 To
  • GPU : Asus GeForce RTX 2060 Dual EVO 6G (with a HDMI Displayport Dummy Plug - pass to the gaming machine)
    • MSI GT 710
Code:
# pveversion -v
proxmox-ve: 7.2-1 (running kernel: 5.15.39-1-pve)
pve-manager: 7.2-7 (running version: 7.2-7/d0dd0e85)
pve-kernel-5.15: 7.2-6
pve-kernel-helper: 7.2-6
pve-kernel-5.15.39-1-pve: 5.15.39-1
pve-kernel-5.15.35-3-pve: 5.15.35-6
pve-kernel-5.15.30-2-pve: 5.15.30-3
ceph-fuse: 15.2.16-pve1
corosync: 3.1.5-pve2
criu: 3.15-1+pve-1
glusterfs-client: 9.2-1
ifupdown2: 3.1.0-1+pmx3
ksm-control-daemon: 1.4-1
libjs-extjs: 7.0.0-1
libknet1: 1.24-pve1
libproxmox-acme-perl: 1.4.2
libproxmox-backup-qemu0: 1.3.1-1
libpve-access-control: 7.2-3
libpve-apiclient-perl: 3.2-1
libpve-common-perl: 7.2-2
libpve-guest-common-perl: 4.1-2
libpve-http-server-perl: 4.1-3
libpve-storage-perl: 7.2-5
libspice-server1: 0.14.3-2.1
lvm2: 2.03.11-2.1
lxc-pve: 5.0.0-3
lxcfs: 4.0.12-pve1
novnc-pve: 1.3.0-3
proxmox-backup-client: 2.2.3-1
proxmox-backup-file-restore: 2.2.3-1
proxmox-mini-journalreader: 1.3-1
proxmox-widget-toolkit: 3.5.1
pve-cluster: 7.2-1
pve-container: 4.2-1
pve-docs: 7.2-2
pve-edk2-firmware: 3.20210831-2
pve-firewall: 4.2-5
pve-firmware: 3.4-2
pve-ha-manager: 3.3-4
pve-i18n: 2.7-2
pve-qemu-kvm: 6.2.0-11
pve-xtermjs: 4.16.0-1
qemu-server: 7.2-3
smartmontools: 7.2-pve3
spiceterm: 3.2-2
swtpm: 0.7.1~bpo11+1
vncterm: 1.7-1
zfsutils-linux: 2.1.4-pve1

Code:
# qm config 400
agent: 1
args: -cpu 'host,-hypervisor,hv_spinlocks=0x1fff,hv_vapic,hv_time,hv_reset,hv_vpindex,hv_runtime,hv_relaxed'
balloon: 0
bios: ovmf
boot: order=scsi0;ide2
cores: 8
cpu: host,hidden=1,flags=+ibpb;+virt-ssbd;+amd-ssbd;+amd-no-ssb
efidisk0: local-lvm:vm-400-disk-0,efitype=4m,pre-enrolled-keys=1,size=4M
hostpci0: 0000:07:00,pcie=1,x-vga=1
ide0: none,media=cdrom
ide2: none,media=cdrom
machine: pc-q35-6.2
memory: 16384
meta: creation-qemu=6.2.0,ctime=1657136236
name: Win10Gaming
net0: virtio=4D:5F:5A:AD:BC:6F,bridge=vmbr0,firewall=1
numa: 0
ostype: win10
scsi0: local-lvm:vm-400-disk-1,cache=writeback,discard=on,size=600G,ssd=1
scsihw: virtio-scsi-pci
smbios1: uuid=c620b278-3260-4577-ae63-de62e573ec4e
sockets: 1
tablet: 0
vmgenid: 7ce6e525-2b8f-4e7a-bd71-5204a98658b3
the args are for a game that won't work otherwise but I am not sure that they are all needed

Code:
# lscpu
Architecture:                    x86_64
CPU op-mode(s):                  32-bit, 64-bit
Byte Order:                      Little Endian
Address sizes:                   43 bits physical, 48 bits virtual
CPU(s):                          16
On-line CPU(s) list:             0-15
Thread(s) per core:              2
Core(s) per socket:              8
Socket(s):                       1
NUMA node(s):                    1
Vendor ID:                       AuthenticAMD
CPU family:                      23
Model:                           8
Model name:                      AMD Ryzen 7 2700X Eight-Core Processor
Stepping:                        2
Frequency boost:                 enabled
CPU MHz:                         3700.000
CPU max MHz:                     3700.0000
CPU min MHz:                     2200.0000
BogoMIPS:                        7385.93
Virtualization:                  AMD-V
L1d cache:                       256 KiB
L1i cache:                       512 KiB
L2 cache:                        4 MiB
L3 cache:                        16 MiB
NUMA node0 CPU(s):               0-15
Vulnerability Itlb multihit:     Not affected
Vulnerability L1tf:              Not affected
Vulnerability Mds:               Not affected
Vulnerability Meltdown:          Not affected
Vulnerability Mmio stale data:   Not affected
Vulnerability Spec store bypass: Mitigation; Speculative Store Bypass disabled via prctl and seccomp
Vulnerability Spectre v1:        Mitigation; usercopy/swapgs barriers and __user pointer sanitization
Vulnerability Spectre v2:        Mitigation; Retpolines, IBPB conditional, STIBP disabled, RSB filling
Vulnerability Srbds:             Not affected
Vulnerability Tsx async abort:   Not affected
Flags:                           fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush mmx fxsr sse sse2 ht syscall nx mmxex
                                 t fxsr_opt pdpe1gb rdtscp lm constant_tsc rep_good nopl nonstop_tsc cpuid extd_apicid aperfmperf rapl pni pclmulqdq m
                                 onitor ssse3 fma cx16 sse4_1 sse4_2 movbe popcnt aes xsave avx f16c rdrand lahf_lm cmp_legacy svm extapic cr8_legacy
                                 abm sse4a misalignsse 3dnowprefetch osvw skinit wdt tce topoext perfctr_core perfctr_nb bpext perfctr_llc mwaitx cpb
                                 hw_pstate ssbd ibpb vmmcall fsgsbase bmi1 avx2 smep bmi2 rdseed adx smap clflushopt sha_ni xsaveopt xsavec xgetbv1 xs
                                 aves clzero irperf xsaveerptr arat npt lbrv svm_lock nrip_save tsc_scale vmcb_clean flushbyasid decodeassists pausefi
                                 lter pfthreshold avic v_vmsave_vmload vgif overflow_recov succor smca sme sev sev_es



I have actually no idea how to solve this, so can anyone help me on fixing this problem ?

Thanks in advance
 
can you test the benchmark without the 'args' line? (just to test)

aside from that, the config looks ok, so maybe there is some hint in the host log (journal/dmesg) or in the guest log?
 
I test without the argument and it's a little better :
https://novabench.com/view/2576481

I don't find how to read the file in journal directory

Code:
# dmesg
[134434.374502] kvm [256427]: ignored rdmsr: 0xc0010299 data 0x0
[134434.375622] kvm [256427]: ignored rdmsr: 0xc001029b data 0x0
[134434.376905] kvm [256427]: ignored rdmsr: 0xc0010299 data 0x0
[134434.378055] kvm [256427]: ignored rdmsr: 0xc001029a data 0x0
[134434.379179] kvm [256427]: ignored rdmsr: 0xc0010293 data 0x0
[134434.380363] kvm [256427]: ignored rdmsr: 0xc0010299 data 0x0
[134434.381482] kvm [256427]: ignored rdmsr: 0xc001029a data 0x0
[134434.382580] kvm [256427]: ignored rdmsr: 0xc0010293 data 0x0
[134434.383718] kvm [256427]: ignored rdmsr: 0xc0010299 data 0x0
[134434.384818] kvm [256427]: ignored rdmsr: 0xc001029a data 0x0
[134439.427155] kvm_msr_ignored_check: 220 callbacks suppressed

.
.
.

[134789.154902] kvm_msr_ignored_check: 220 callbacks suppressed
[134789.154912] kvm [256427]: ignored rdmsr: 0xc0010299 data 0x0
[134789.156044] kvm [256427]: ignored rdmsr: 0xc001029b data 0x0
[134789.157421] kvm [256427]: ignored rdmsr: 0xc0010299 data 0x0
[134789.158518] kvm [256427]: ignored rdmsr: 0xc001029a data 0x0
[134789.159596] kvm [256427]: ignored rdmsr: 0xc0010293 data 0x0
[134789.170198] kvm [256427]: ignored rdmsr: 0xc0010299 data 0x0
[134789.171367] kvm [256427]: ignored rdmsr: 0xc001029a data 0x0
[134789.172462] kvm [256427]: ignored rdmsr: 0xc0010293 data 0x0
[134789.173680] kvm [256427]: ignored rdmsr: 0xc0010299 data 0x0
[134789.174790] kvm [256427]: ignored rdmsr: 0xc001029a data 0x0
[134795.307923] fwbr400i0: port 2(tap400i0) entered disabled state
[134795.328193] fwbr400i0: port 1(fwln400i0) entered disabled state
[134795.328273] vmbr0: port 3(fwpr400p0) entered disabled state
[134795.328447] device fwln400i0 left promiscuous mode
[134795.328452] fwbr400i0: port 1(fwln400i0) entered disabled state
[134795.349364] device fwpr400p0 left promiscuous mode
[134795.349367] vmbr0: port 3(fwpr400p0) entered disabled state
[135015.940804] device tap400i0 entered promiscuous mode
[135015.979038] vmbr0: port 3(fwpr400p0) entered blocking state
[135015.979042] vmbr0: port 3(fwpr400p0) entered disabled state
[135015.979142] device fwpr400p0 entered promiscuous mode
[135015.979174] vmbr0: port 3(fwpr400p0) entered blocking state
[135015.979175] vmbr0: port 3(fwpr400p0) entered forwarding state
[135015.984950] fwbr400i0: port 1(fwln400i0) entered blocking state
[135015.984955] fwbr400i0: port 1(fwln400i0) entered disabled state
[135015.985026] device fwln400i0 entered promiscuous mode
[135015.985118] fwbr400i0: port 1(fwln400i0) entered blocking state
[135015.985121] fwbr400i0: port 1(fwln400i0) entered forwarding state
[135015.990177] fwbr400i0: port 2(tap400i0) entered blocking state
[135015.990183] fwbr400i0: port 2(tap400i0) entered disabled state
[135015.990297] fwbr400i0: port 2(tap400i0) entered blocking state
[135015.990300] fwbr400i0: port 2(tap400i0) entered forwarding state
[135018.689220] vfio-pci 0000:07:00.0: vfio_ecap_init: hiding ecap 0x1e@0x258
[135018.689244] vfio-pci 0000:07:00.0: vfio_ecap_init: hiding ecap 0x19@0x900
[135046.925776] kvm_msr_ignored_check: 36 callbacks suppressed
[135046.925788] kvm [397005]: ignored rdmsr: 0xc0010299 data 0x0
[135046.958812] kvm [397005]: ignored rdmsr: 0xc001029b data 0x0
[135046.974138] kvm [397005]: ignored rdmsr: 0xc0010299 data 0x0
[135046.975299] kvm [397005]: ignored rdmsr: 0xc001029a data 0x0
[135046.976400] kvm [397005]: ignored rdmsr: 0xc0010293 data 0x0
[135046.977912] kvm [397005]: ignored rdmsr: 0xc0010299 data 0x0
[135046.979097] kvm [397005]: ignored rdmsr: 0xc001029a data 0x0
[135046.980220] kvm [397005]: ignored rdmsr: 0xc0010293 data 0x0
[135046.981506] kvm [397005]: ignored rdmsr: 0xc0010299 data 0x0
[135046.982634] kvm [397005]: ignored rdmsr: 0xc001029a data 0x0
[135052.837698] kvm_msr_ignored_check: 197 callbacks suppressed

.
.
.

[135893.076170] kvm_msr_ignored_check: 220 callbacks suppressed
[135893.076174] kvm [397005]: ignored rdmsr: 0xc0010299 data 0x0
[135893.077281] kvm [397005]: ignored rdmsr: 0xc001029b data 0x0
[135893.078480] kvm [397005]: ignored rdmsr: 0xc0010299 data 0x0
[135893.079586] kvm [397005]: ignored rdmsr: 0xc001029a data 0x0
[135893.080691] kvm [397005]: ignored rdmsr: 0xc0010293 data 0x0
[135893.081834] kvm [397005]: ignored rdmsr: 0xc0010299 data 0x0
[135893.083132] kvm [397005]: ignored rdmsr: 0xc001029a data 0x0
[135893.084391] kvm [397005]: ignored rdmsr: 0xc0010293 data 0x0
[135893.085687] kvm [397005]: ignored rdmsr: 0xc0010299 data 0x0
[135893.086796] kvm [397005]: ignored rdmsr: 0xc001029a data 0x0
[135898.129149] kvm_msr_ignored_check: 220 callbacks suppressed
[135898.129152] kvm [397005]: ignored rdmsr: 0xc0010299 data 0x0
[135898.130270] kvm [397005]: ignored rdmsr: 0xc001029b data 0x0
[135898.131514] kvm [397005]: ignored rdmsr: 0xc0010299 data 0x0
[135898.132634] kvm [397005]: ignored rdmsr: 0xc001029a data 0x0
[135898.133730] kvm [397005]: ignored rdmsr: 0xc0010293 data 0x0
[135898.134904] kvm [397005]: ignored rdmsr: 0xc0010299 data 0x0
[135898.136024] kvm [397005]: ignored rdmsr: 0xc001029a data 0x0
[135898.137113] kvm [397005]: ignored rdmsr: 0xc0010293 data 0x0
[135898.138230] kvm [397005]: ignored rdmsr: 0xc0010299 data 0x0
[135898.139331] kvm [397005]: ignored rdmsr: 0xc001029a data 0x0

Code:
# tail /var/log/messages
Jul 14 10:21:57 aorus kernel: [136566.902283] kvm_msr_ignored_check: 220 callbacks suppressed
Jul 14 10:22:02 aorus kernel: [136572.006316] kvm_msr_ignored_check: 220 callbacks suppressed
Jul 14 10:22:07 aorus kernel: [136577.041528] kvm_msr_ignored_check: 220 callbacks suppressed
Jul 14 10:22:12 aorus kernel: [136582.082299] kvm_msr_ignored_check: 220 callbacks suppressed
Jul 14 10:22:17 aorus kernel: [136587.132234] kvm_msr_ignored_check: 220 callbacks suppressed
Jul 14 10:22:22 aorus kernel: [136592.187795] kvm_msr_ignored_check: 220 callbacks suppressed
Jul 14 10:22:27 aorus kernel: [136597.225870] kvm_msr_ignored_check: 220 callbacks suppressed
Jul 14 10:22:32 aorus kernel: [136602.260830] kvm_msr_ignored_check: 220 callbacks suppressed
Jul 14 10:22:38 aorus kernel: [136607.328400] kvm_msr_ignored_check: 220 callbacks suppressed
Jul 14 10:22:43 aorus kernel: [136612.371377] kvm_msr_ignored_check: 220 callbacks suppressed

Code:
# less /var/log/syslog
Jul 10 00:08:02 aorus pvedaemon[1270]: <adminlogin@pam> successful auth for user 'Userlogin@pve'
Jul 10 00:08:07 aorus rrdcached[1106]: handle_request_update: Could not read RRD file.
Jul 10 00:08:07 aorus pmxcfs[1121]: [status] notice: RRDC update error /var/lib/rrdcached/db/pve2-node/aorus: -1
Jul 10 00:08:07 aorus pmxcfs[1121]: [status] notice: RRD update error /var/lib/rrdcached/db/pve2-node/aorus: mmaping file '/var/lib/rrdcached/db/pve2-node/aorus': Invalid argument
Jul 10 00:08:17 aorus rrdcached[1106]: handle_request_update: Could not read RRD file.
Jul 10 00:08:17 aorus pmxcfs[1121]: [status] notice: RRDC update error /var/lib/rrdcached/db/pve2-node/aorus: -1
Jul 10 00:08:17 aorus pmxcfs[1121]: [status] notice: RRD update error /var/lib/rrdcached/db/pve2-node/aorus: mmaping file '/var/lib/rrdcached/db/pve2-node/aorus': Invalid argument
Jul 10 00:08:27 aorus rrdcached[1106]: handle_request_update: Could not read RRD file.
Jul 10 00:08:27 aorus pmxcfs[1121]: [status] notice: RRDC update error /var/lib/rrdcached/db/pve2-node/aorus: -1
Jul 10 00:08:27 aorus pmxcfs[1121]: [status] notice: RRD update error /var/lib/rrdcached/db/pve2-node/aorus: mmaping file '/var/lib/rrdcached/db/pve2-node/aorus': Invalid argument
Jul 10 00:08:32 aorus pvedaemon[1270]: <adminlogin@pam> successful auth for user 'Userlogin@pve'
Jul 10 00:08:37 aorus rrdcached[1106]: handle_request_update: Could not read RRD file.
Jul 10 00:08:37 aorus pmxcfs[1121]: [status] notice: RRDC update error /var/lib/rrdcached/db/pve2-node/aorus: -1
Jul 10 00:08:37 aorus pmxcfs[1121]: [status] notice: RRD update error /var/lib/rrdcached/db/pve2-node/aorus: mmaping file '/var/lib/rrdcached/db/pve2-node/aorus': Invalid argument
Jul 10 00:08:47 aorus rrdcached[1106]: handle_request_update: Could not read RRD file.
Jul 10 00:08:47 aorus pmxcfs[1121]: [status] notice: RRDC update error /var/lib/rrdcached/db/pve2-node/aorus: -1
Jul 10 00:08:47 aorus pmxcfs[1121]: [status] notice: RRD update error /var/lib/rrdcached/db/pve2-node/aorus: mmaping file '/var/lib/rrdcached/db/pve2-node/aorus': Invalid argument
Jul 10 00:08:57 aorus rrdcached[1106]: handle_request_update: Could not read RRD file.
Jul 10 00:08:57 aorus pmxcfs[1121]: [status] notice: RRDC update error /var/lib/rrdcached/db/pve2-node/aorus: -1
Jul 10 00:08:57 aorus pmxcfs[1121]: [status] notice: RRD update error /var/lib/rrdcached/db/pve2-node/aorus: mmaping file '/var/lib/rrdcached/db/pve2-node/aorus': Invalid argument
Jul 10 00:09:03 aorus pvedaemon[1269]: <adminlogin@pam> successful auth for user 'Userlogin@pve'
Jul 10 00:09:07 aorus rrdcached[1106]: handle_request_update: Could not read RRD file.
Jul 10 00:09:07 aorus pmxcfs[1121]: [status] notice: RRDC update error /var/lib/rrdcached/db/pve2-node/aorus: -1
Jul 10 00:09:07 aorus pmxcfs[1121]: [status] notice: RRD update error /var/lib/rrdcached/db/pve2-node/aorus: mmaping file '/var/lib/rrdcached/db/pve2-node/aorus': Invalid argument
Jul 10 00:09:17 aorus rrdcached[1106]: handle_request_update: Could not read RRD file.
Jul 10 00:09:17 aorus pmxcfs[1121]: [status] notice: RRDC update error /var/lib/rrdcached/db/pve2-node/aorus: -1
Jul 10 00:09:17 aorus pmxcfs[1121]: [status] notice: RRD update error /var/lib/rrdcached/db/pve2-node/aorus: mmaping file '/var/lib/rrdcached/db/pve2-node/aorus': Invalid argument
Jul 10 00:09:27 aorus rrdcached[1106]: handle_request_update: Could not read RRD file.
Jul 10 00:09:27 aorus pmxcfs[1121]: [status] notice: RRDC update error /var/lib/rrdcached/db/pve2-node/aorus: -1
Jul 10 00:09:27 aorus pmxcfs[1121]: [status] notice: RRD update error /var/lib/rrdcached/db/pve2-node/aorus: mmaping file '/var/lib/rrdcached/db/pve2-node/aorus': Invalid argument
Jul 10 00:09:34 aorus pvedaemon[1269]: <adminlogin@pam> successful auth for user 'Userlogin@pve'


Thanks
 
how do you connect to the vm? with rdp? built-in vnc? have you tried to connect a real monitor and use that?
 
well somethings wrong then with either the plug or what it does to the vm... maybe it does not register correctly? i know some things (i think parsec too) have problems when they have no monitor connected...
 
Thanks a lot for your help.

I think that I will have to find another solution to the HDMI dummy plug because parsec is not working without it.
 

About

The Proxmox community has been around for many years and offers help and support for Proxmox VE, Proxmox Backup Server, and Proxmox Mail Gateway.
We think our community is one of the best thanks to people like you!

Get your subscription!

The Proxmox team works very hard to make sure you are running the best software and getting stable updates and security enhancements, as well as quick enterprise support. Tens of thousands of happy customers have a Proxmox subscription. Get yours easily in our online shop.

Buy now!