Ubuntu – IOMMU and will it improve the VM performance

performancevirtualboxvirtualization

My Motherboard's chipset supports this feature IOMMU, i've read (but not really understand) that it improves the VM performance by letting the VM make use of the actual physical hardware instead of the Virtual hardware.

Does this really bring a performance improvement in the VM? and if it does how can I make Virtualbox benefit from that?.

Best Answer

So long story short, the only way an IOMMU will help you is if you start assigning HW resources directly to the VM. Just having it 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.