4

I can't figure out the difference between virtio, emulated-IO, direct I/O, I/O passthrough, SR-IOV, can anybody help

procr
  • 583
  • 1
  • 5
  • 14

2 Answers2

12
  • virtio is a virtualized driver that lives in the KVM Hypervisor.

  • An emulated-IO is for example the virtual Ethernet Controller that you will find in a Virtual Machine.

  • direct I/O is the concept of having a direct I/O operation inside a VM. An example can be a Direct Memory Access to the memory space of a VM.

  • I/O passthrough, or PCI-passthrough, is the technology to expose a
    physical device inside a VM, bypassing the management of the
    Hypervisor. The VM will see the physical hardware directly. For that the corresponding driver should be installed in the guest OS. As the hypervisor will be bypassed, the performance with this device inside the VM is way better than with an emulated device.

  • SR-IOV for Single Root-I/O Virtualization is a technology where you can expose a physical device in several copies, which can be used individualy. For example with a NIC (Network Interface Card), using SR-IOV you can create several copies of the same device. Therefore, you can use all those copies inside different VMs as if you had several physical device. The performance are increased as with a PCI-Passthrough.

Hope it helps a bit

Gabriel Laupre
  • 151
  • 1
  • 9
5

For example with a NIC (Network Interface Card), using SR-IOV you can create several copies of the same device.

It's not exactly a copy of the same device.

The goal of the PCI-SIG SR-IOV specification is to standardize on a way of bypassing the VMM’s involvement in data movement by providing independent memory space, interrupts, and DMA streams for each virtual machine. SR-IOV architecture is designed to allow a device to support multiple Virtual Functions (VFs) and much attention was placedon minimizing the hardware cost of each additional function. SR-IOV introduces two new function types:

Physical Functions (PFs):These are full PCIe functions that include the SR-IOV Extended Capability. The capability is used to configure and manage the SR-IOV functionality.

Virtual Functions (VFs): These are ‘lightweight’ PCIe functions that contain the resources necessary for data movement but have a carefully minimized set of configuration resources.

For more information see http://www.intel.com/content/www/us/en/pci-express/pci-sig-sr-iov-primer-sr-iov-technology-paper.html

  • Exactly, SR-IOV is a way of bypassing VMM/hypervisor involvement in data movement from NIC to guest. As I understand it, merely using PCI passthrough will still require some involvement by the hypervisor in copying packet data up to guest. With SR-IOV, NIC DMA:s data to a memory region that can be accessed by guest, guest then receives an interrupt on the SR-IOV virtual function (i.e. a limited interface seen by guest). Many guests can use their virtual function from one physical NIC on host. – Erik Alapää May 11 '16 at 07:23