2020-05-20T09:02:00Z

What is IOMMU?


Can you explain what an IOMMU is? How does it improve VM performance?

Guest
44 Answers

author avatar
Top 20User

IOMMU stands for Input-Output Memory Management Unit. It connects i/o devices to the DMA bus the same way processor is connected to the memory via the DMA bus - https://en.wikipedia.org/wiki/Input%E2%80%93output_memory_management_unit. To me although I am not an expert the advantages are speed and security.

2020-07-26T19:08:54Z
author avatar
User

The only way IOMMU will help is if you start assigning HW resources directly to the VM. Just having it available doesn't make things faster.

It would help to know exactly what Motherboard/CPU is advertising this feature. IOMMU is a system specific IO mapping mechanism and can be used with most devices.

IOMMU sounds like a generic name for Intel VT-d and AMD IOV. In which case I don't think you can multiplex devices, it's a lot like PCI passthrough before all these fancy virtualization instructions existed :). SR-IOV is different, the peripheral itself must carry the support. The HW knows it's being virtualized and can delegate a HW slice of itself to the VM. Many VMs can talk to an SR-IOV device concurrently with very low overhead.

The only thing faster than SR-IOV is PCI passthrough though in that case only one VM can make use of that device, not even the host operating system can use it. PCI passthrough would be useful for say a VM that runs an intense database that would benefit from being attached to a FiberChannel SAN.

Getting closer to the HW does have limitations however, it makes your VMs less portable for deployments that require live migration for example. This applies to both SR-IOV and PCI passthrough.

Default virtualized Linux deployments usually use VirtIO which is pretty fast to begin with

2020-05-27T02:49:08Z
author avatar
Top 20Consultant

DEEPEN DHULLA did explain well IOMMU. IOMMU have to be activated at the bios level. It exist on Intel and AMD platform. it is used a lot inside virtualization platform like VMware vsphere. It provide a direct access to the underlayer hardware for a VM.

https://docs.vmware.com/en/VMware-vSphere/6.5/com.vmware.vsphere.networking.doc/GUID-DD13D453-98B9-4D26-85EA-A738293AEE00.html?hWord=N4IghgNiBcIJIHkCySCqIC+Q

2020-05-27T00:44:25Z
author avatar
Top 5LeaderboardReal User

In virtualization, guest operating systems can use hardware that is not specifically made for virtualization. Higher performance hardware such as graphics cards use DMA to access memory directly; in a virtual environment all memory addresses are re-mapped by the virtual machine software, which causes DMA devices to fail. The IOMMU handles this re-mapping, allowing the native device drivers to be used in a guest operating system.

Read more technical :
https://en.wikipedia.org/wiki/Input%E2%80%93output_memory_management_unit and alos
https://wiki.archlinux.org/index.php/PCI_passthrough_via_OVMF#Setting_up_IOMMU
https://www.linux-kvm.org/page/How_to_assign_devices_with_VT-d_in_KVM

In plain language it help in using hardware resource in VM , as good as it had direct hardware full access., thus you use original driver and code in VM too and able to get best performance.

2020-05-26T10:08:49Z
Find out what your peers are saying about VMware, Proxmox, Microsoft and others in Server Virtualization Software. Updated: October 2020.
442,986 professionals have used our research since 2012.