SLOW bandwith with OPNSense running in KVM

Started by deajan, March 21, 2023, 08:03:51 PM

Previous topic - Next topic
Hello,

I have a couple of OPNSense VMs that I usually run in Linux KVM hosts.
I usually pass the PCIE Intel I211AT cards directly to the VM via pci passthrough, thus avoiding virt driver issues.

When downloading "big" files via curl or wget, I noticed that I get 20-50Mbps which quickly fall down to 1-2Mbps.
Downloading in front of an OPNSense will give me about 80Mbps.

I've fooled a bit around, trying to disable suricata, zenarmor, etc...
I've also played with hardware offloading on ethernet cards. No better results.

Finally, I've changed the timer settings in libvirtd to something like

<clock offset='utc'>
    <timer name='hpet' present='yes'/>
    <timer name='hypervclock' present='yes'/>
    <timer name='rtc' tickpolicy='catchup'/>
    <timer name='pit' tickpolicy='delay'/>
    <timer name='kvmclock' present='yes'/>
  </clock>


I've also replaced the pc440fx-rhel7.6.0 emulation type with pc-q35-rhel9.0.0.
Having done these, I now get "correct speeds", about 20-40Mbps.

Anyone has experienced same issues ?

PS: setup is a VM with 4 vCPU, 8Gb RAM, 30Gb disk on a i5-8365U 4core computer which doesn't use 10% of it's CPU.

Best regards.
The world has 6 strings, and I got a pick ;)