SR-IOV

Also known as: Single Root I/O Virtualization

On this page 7

SR-IOV, short for Single Root I/O Virtualization, is a PCI Express specification that lets one physical device, usually a network adapter, appear as many independent virtual devices that can be assigned directly to virtual machines or containers. In virtualization, it removes the hypervisor from the data path of network and storage traffic, which delivers near-native throughput and latency with far less CPU overhead than software emulation.

The standard is maintained by the PCI-SIG, and it is widely used in cloud data centers, telecom network functions and high-performance computing, where every microsecond and every host CPU core matters.

How SR-IOV splits one device into many

SR-IOV works by dividing a capable device into one physical function and many virtual functions. The physical function (PF) is a full PCIe function with complete configuration space; the host driver uses it to manage the device and to create virtual functions. Each virtual function (VF) is a lightweight PCIe function with its own queues, interrupts and memory-mapped registers, but limited configuration rights.

A VF is handed to a guest through PCI passthrough. The guest loads a VF driver and talks to the hardware directly, so packets move by direct memory access (DMA) between the adapter and guest memory without passing through a virtual switch. The IOMMU, such as Intel VT-d or AMD-Vi, translates and restricts those DMA addresses so that a VF can reach only the memory of its own guest.

The table below summarizes the components involved and the role each plays.

ComponentRoleControlled by
Physical functionDevice management, VF creation and policyHost driver
Virtual functionData path with its own queues and registersGuest driver
IOMMUDMA address translation and isolationHost firmware and kernel
Embedded switchForwards traffic between VFs and the wirePF driver configuration
HypervisorAssigns VFs and sets MAC, VLAN and rate limitsHost administrator
Components of an SR-IOV setup

Key parameters and requirements

SR-IOV only works when every layer supports it: the device, the system firmware, the processor, the host operating system and the guest driver. A missing layer is the most frequent reason why VFs cannot be created or assigned.

ParameterTypical value or rangeWhat it affects
VFs per port8 to 256, depending on the adapterNumber of directly attached guests
Queues per VF1 to 16 queue pairsMulti-core throughput in the guest
Firmware settingsSR-IOV and VT-d or AMD-Vi enabledWhether VFs appear at all
ACS supportRequired for clean IOMMU groupsIsolation between assigned devices
Per-VF rate limitConfigured in Mbit/s or Gbit/sFair sharing of port bandwidth
Typical SR-IOV parameters and limits

On Linux, VFs are usually created by writing a number to the sriov_numvfs attribute of the PF in sysfs. Hypervisors such as KVM, VMware ESXi and Hyper-V expose the same capability through their own management tools, and the PF driver applies MAC address, VLAN and spoof-check policies to each VF.

SR-IOV compared with other I/O virtualization methods

SR-IOV is one of several ways to give virtual machines network and storage access, and it trades flexibility for performance. Fully emulated devices are the most portable, paravirtualized devices such as virtio balance speed and features, and SR-IOV gives the shortest data path while tying the guest to physical hardware.

ApproachPerformanceCPU overheadLive migration
Emulated deviceLowHighFully supported
Paravirtualized deviceGoodModerateFully supported
SR-IOV virtual functionNear nativeLowLimited or vendor-specific
Full device passthroughNativeVery lowUsually not supported
I/O virtualization approaches compared

Compared with full device passthrough, SR-IOV shares one adapter among many guests instead of dedicating it to one. Compared with a virtual switch, it bypasses software forwarding, which lowers latency but also removes the hypervisor’s ability to inspect, filter or mirror traffic in software.

Where SR-IOV is used in practice

SR-IOV is chosen when predictable low latency and high packet rates matter more than operational flexibility. Typical cases include network function virtualization (NFV) for routers, firewalls and mobile core functions, latency-sensitive trading systems, HPC clusters using RDMA, and storage traffic over NVMe or iSCSI.

Public cloud providers also use the same principle. Their enhanced networking instance types expose VF-style interfaces to guests, while newer designs move the management side onto SmartNICs or DPUs so that policies still apply without consuming host cores. In Kubernetes, an SR-IOV device plugin and a CNI plugin allocate VFs to pods.

SituationRecommended choiceReason
Packet rates above several million per secondSR-IOVSoftware switching saturates host cores
Frequent live migration requiredParavirtualized deviceVFs complicate migration
Deep traffic inspection on the hostVirtual switchSR-IOV bypasses host filtering
Telecom data plane functionsSR-IOV with DPDKLow and stable latency
When to choose SR-IOV

Limitations and common mistakes

The main limitation of SR-IOV is that it binds a guest to specific hardware. Because the guest driver holds hardware state, live migration requires either vendor-specific support or a bonding workaround in which the guest fails over to a paravirtualized interface during the move.

  • Overcommitting VFs without rate limits lets one noisy guest consume the port bandwidth of others.
  • Forgetting to enable VT-d or AMD-Vi in firmware leaves VFs visible but impossible to assign safely.
  • Skipping spoof checking and trust settings allows a guest to send traffic with forged MAC addresses.
  • Mismatched PF and VF driver versions cause link failures and unexplained packet loss.
  • Expecting host-level firewalls and monitoring to see VF traffic, which bypasses the software switch.

Security also deserves attention. The IOMMU isolation is strong when correctly configured, but firmware bugs in the adapter or weak ACS support can merge devices into shared IOMMU groups and weaken separation between tenants.

The idea in brief

Imagine one busy post office counter where every letter for every tenant in a building must be sorted by one clerk. SR-IOV gives each tenant a private mailbox slot built into the wall, so letters go straight in without waiting for the clerk.

The building still has one physical wall, but each slot is separate and locked. The key takeaway is speed through direct access: virtual machines get almost the full speed of the hardware, at the cost of being harder to move to another building.

A practical scenario

A mobile network operator runs its packet core as virtual network functions on servers with dual-port 25 Gbit/s adapters. With a software virtual switch, each server needed six CPU cores just for packet forwarding and still showed latency spikes under load.

The team enables VT-d in firmware, creates 16 VFs per port, and assigns two VFs to each user plane virtual machine, which uses a DPDK driver inside the guest. Each VF receives a fixed VLAN, spoof checking and a bandwidth limit.

After the change, the forwarding cores return to application work, throughput per server rises close to line rate on both ports, and latency becomes stable. Because these VMs can no longer be live-migrated freely, the operator schedules maintenance by draining traffic to redundant nodes instead.