本文将深入探究VMDq(Virtual Machine Device Queue)相关内容。

Introduction

强烈建议观看视频Intel VMDq Explanation,非常清晰地介绍了VMDq,下面主要是视频中的概要总结,将以Without VMDq与With VMDq来做对比。

Without VMDq

A single core(you have one core that’s actually in charge of handling every packet before it determines which other core interrupt for the action, copy the data to the target vm) cannot keep up with 10 Gbps of data. Most packets coming in require two interrupts, one for the core assigned to handle Ethernet interrupts, followed by an interrupt of the core processing the VM where the packet is targetd for.

With VMDq

Receive Path

  • Data packets for different VMs get sorted at the Ethernet silicon based on MAC address/VLAN tags
  • Sorted data packets get parsed to the respective VMs
  • Data packets being received by respective VMs

Reduces overhead and increases throughput by sorting packets with the Intel Ethernet Controller and spreading the workload amongst multiple CPU cores.

Details

这节主要是mark下Intel® VMDq Technology white paper中的关键notes。

VMDq vs SR-IOV

  • VMDq
    VMM在服务器的物理网卡中为每个虚机分配一个独立的队列,这样虚机出来的流量可以直接经过软件交换机发送到指定队列上,软件交换机无需进行排序和路由操作。
    但是,VMM和虚拟交换机仍然需要将网络流量在VMDq和虚机之间进行复制。

  • SR-IOV
    对于SR-IOV来说,则更加彻底,它通过创建不同虚拟功能(VF)的方式,呈现给虚拟机的就是独立的网卡,因此,虚拟机直接跟网卡通信,不需要经过软件交换机,VF和VM之间通过DMA进行高速数据传输,SR-IOV的性能是最好的。

Unlike SR-IOV, which exposes a complete device interface to the virtual machine guest, VMDq only provides network queues to the virtual machine guest.

VMDq只是一个过渡性的技术,当前已经被SR-IOV所替代。


参考资料:

  1. Intel VMDq Explanation
  2. Intel® VMDq Technology white paper
  3. 网卡虚拟化技术:VMDq和SR-IOV
  4. CompSC: live migration with pass-through devices
  5. What is the difference between SR-IOV and VMDQ?