HI, I am seeing super low performance when running an application inside a QEMU VM hosted on my physical machine with an AMD processor. My physical machine with an Intel processor gets 55X higher throughput with the same application and workload, which seems like an absurd difference!
To describe my setup a bit better, the application inside the VM reads and writes to the IVSHMEM region and then an application on the host consumes that data from the IVSHMEM region. I use vfio-pci in the guest to map bar 2 of the IVSHMEM region to the application. I did some profiling with perf, and it showed that the functions accessing the IVSHMEM are the bottleneck (the time I spend in these function is way smaller when I profile things on the Intel machine). Is there a known bug, issue, or specialized configuration that has to be addressed to prevent this level of performance degradation in AMD machines? To sanity check things, I also ran the same application on the bare machine, and the performance is quite similar to the Intel machine. I also ran a sysbench memory and cpu benchmark inside the VM and the performance was also similar to the Intel machine. The problem seems to be only when I read and write to IVSHMEM. QEMU Start Command This command is the same in both the AMD and Intel machine qemu-system-x86_64 \ -snapshot \ -nographic -monitor none -serial stdio \ -machine accel=kvm,type=q35 \ -cpu host \ -smp 11\ -m 4G \ -device virtio-net-pci,netdev=net0 \ -netdev user,id=net0,hostfwd=tcp::2220-:22 \ -chardev socket,path="/run/proxy",id=“proxy" \ -device ivshmem-doorbell,vectors=1,chardev=“proxy" \ -drive if=virtio,format=raw,file=base.img \ -drive if=virtio,format=raw,file=seed.img \ Setup Guest kernel: 6.11.0-29-generic Guest distribution: 24.10 Host kernel: 6.1.126.1.amd64-smp Host distribution: Debian 12 AMD CPU: AMD EPYC 7702 64-Core Processor Intel CPU: Intel(R) Xeon(R) Gold 6152