I have been running opnsense on KVM for a while and noticed some random drops here and there, then after inspecting, I saw huge CPU spikes, with idle inside the virtual machine usually eating up more than half of the CPU.
I'm kinda at a loss because I couldn't find anything on the internet to help me, most threads on this forum regarding VM issues seem to get no answer at all.
I tried to follow the docs to a T while trying to adapt it to my needs, so I'll try to be more verbose about my config:
Opensuse 15.0, Linux 4.12.14, libvirt 4.0, qemu 2.11.2
1 Core pinned to the last physical core
1280M to the VM with Hugepages enabled
Disk mapped to physical LVM partition, as SATA
3 Virtual NICs pointed to bridges, one of them bridged to the LAN port, all e1000
2 Realtek 8168 cards, one of them is WAN on PCI passtrough
1 Intel card, which goes to another server, also on PCI passtrough
Usual QEMU/Libvirt devices (Serial port, VGA video, Keyb, Mouse, USB2)
So what I could try next? Maybe convert the virtual cards to virtio?
I'm running OPNsense on Proxmox (KVM).
Instead of PCI passthrough I'm using OpenvSwitch with a virtio NIC for each interface, vlan tag applied at the OpenvSwitch level.
I haven't seen any drops yet.
I have had issues in the past with Realtek NICs.
Guess I forgot to reply, I was running bare metal with Opensuse.
I've applied every kind of optimization I could then I gave up, I'm using Xen now which runs fine and without chokes.
The Realtek card still kind of doesn't work, I guess the driver is too bad or the card defective.