SR-IOV and virtio
In short: virtio and SR-IOV make virtual machines faster: virtio through standardised, lean virtual devices, SR-IOV through direct hardware slices.
In more detail: A fully emulated network card or disk costs a lot of compute time. Both methods save that effort in different ways.
In Depth
- virtio: The guest knows it is virtual and uses drivers for simple virtual devices (virtio-net, virtio-blk) with shared queues in memory. Standard with KVM/QEMU, built into Linux. On Windows you need the virtio drivers.
- SR-IOV: A PCIe card (usually a network card) splits into several “virtual functions” that are assigned directly to one VM each. The VM talks to hardware almost without a software detour, with very low latency.
- Downside of SR-IOV: Live migration is hard, features such as virtual switch rules are limited, it needs hardware and BIOS support (IOMMU).
- GPU passthrough: With VFIO a whole graphics card can be given to a VM, the principle is the same.
- Choice: virtio for general use, SR-IOV or passthrough for peak performance.
See also: virtualisation with KVM and QEMU