KVM and Libvirt: Bad CPU/Network performance of pgSense guest
-
I have an Arch Linux host which runs virtualised router.
When using a LXC guest (linux) as router, everything is fine. I get 100MBits Up/Down and almost no CPU usage at all.
However, when I use libvirt gest (pfSense FreeBSD) as a router, whenever there is heavy network traffic going through the guest, the CPU usage goes unreasonably high (up to 100%) but the worst thing is that the network throughput is halved! I get 45-49Mbits max.
Host doesn’t support PCI pass through, so this is my config for the libvirtd VM:
Nic1 (wan) Network source: Direct ‘eth0’ Source mode: passthrough Device model: virtio Nic2 (lan) Bridge name: br0 Device model: virtio
I tried e1000 instead but it changes absolutely nothing.
Host CPU: AMD A4-5000 Kabini Guest CPU: default or Opteron_G3
Hardware polling in pfSense is disabled, and pfSense ifconfig shows this: http://storage5.static.itmages.com/i/16/1217/h_1481996196_8871112_a2f0d75655.png
This has been so since over a year now, since I started using pfSense as guest. If I do not solve this problem, I will have to dump libvirt/pfSense because such performance degradation is unacceptable.