0

I have an Arch Linux host which runs virtualised router.

When using a LXC guest 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 KVM. If I do not solve this problem, I will have to dump libvirt because such performance is unacceptable.

  • How can there be a "passthrough" virtio? Do you use macvtap maybe? In any case, it is normal for a fully virtualized guest to have more overhead than a container. You are also using very non-standard distros - BSD and Arch both. I would try to reproduce the issue on Centos as guest and host before anything else – dyasny Dec 19 '16 at 0:50
  • Yes, it is using macvtap. I realise full virtualisation has its overheads, but this overhead is much to large. If people had it, no-one would use pfSense as a VM, and many do. And sorry, but Arch is a very standard distro. Also, pfSense is just FreeBSD. If there is a problem on such a pure and barebone linux as Arch, there is no reasonable cause to think it might be not there on a something like Centos. – lockheed Dec 20 '16 at 9:42
  • Ok stay stubborn and slow if you wish – dyasny Dec 20 '16 at 13:39
1

This is to do with the FreeBSD drivers for Virtio, they are simply not up to the task to run as fast as Linux drivers.

https://forum.proxmox.com/threads/poor-virtio-network-performance-pfsense-guest-proxmox-3-4.23933/

^^ the above is a post that details a few things you can do to help suchas turning off Hardware Checksum Offload on the guest and host and also within pfSense settings (be sure to reboot VM before re-testing).

I have been trying to run pfSense on top of Proxmox (Debian base) and on gig interfaces on bare metal get 940-980 Mbps but on VM guest get a max of 650-700 Mbps.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.