Slow kvm networking

Greetings,
I have a vm guest connected to a network bridge that is attached to a 10Gbe nic. When I do a bandwidth test between guest and host I am only getting 2Gbe. Any clues to what I could be missing?
I followed https://brooks.sh/2017/12/22/configuring-kvm-on-clear-linux/ guide for the most part.

Regards,

Interesting. Between host and guest on the same machine I would expect more throughput, and, this is definitely something we’d want to make sure users can get working.

I googled around a bit and found this:

https://www.linux-kvm.org/page/10G_NIC_performance:_VFIO_vs_virtio

It suggests that perhaps in the default configuration throughput is limited and you either want to switch to VFIO, or make sure the proper virtio commands are passed. I don’t know how this will look in libvirt speak, though - you’ll have to check that out yourself, or maybe others can chime in.

looks like the line: -device virtio-net-pci matters. I just don’t know how to add that to the vm defintion:
This is what I have for the vm:

<interface type='bridge'>
  <mac address=''/>
  <source bridge='lanbr'/>
  <model type='virtio'/>
  <address type='pci' domain='0x0000' bus='0x01' slot='0x00' function='0x0'/>
</interface>

https://wiki.libvirt.org/page/Virtio#Network_driver
I can see that virtio_pci is not loaded:

lsmod | grep virtio
  virtio_balloon         24576  0 
  virtio_net             49152  0
  net_failover           20480  1 virtio_net

I checked the processes qemu process and it does have that flag set so back to square one. Would running a non linux guest os cause slowness?

How do you test the bandwidth? Found this:

I used iperf3 on guest and host

so I switched to linux based vm and numbers look way better. So I guess that’s my solution :man_shrugging: