Session

Interrupt moderation approaches for virtio device

Speakers

Parav Pandit
Dragos Tatulea
Lijun Yu
Jun Deng
Kailiang Zhou

Label

Nuts and Bolts

Session Type

Talk

Contents

Description

Interrupt moderation is a key contributor to reduce CPU utilization across low to high packet rates for network device transmission and reception queues. A virtio network device currently has at least three mechanisms for interrupt moderation.

  1. The first method is based on continuously moving queue indices,
  2. The second, more modern approach, is based on packet rate and timeout.
  3. The third approach is based on the device’s internal implementation. The first two methods introduce their own limitations depending on platform and guest VMs. The indices-based method is extremely hard for the PCI hardware devices, while the second method is impractical for VMs that may not support it. Furthermore, the third, device-based moderation is too complex and resource-intensive for non-virtio devices that are merely emulating virtio data path.

In our talk, we introduce a novel approach that overcomes these system-level & guest VM limitations. We achieve this by utilizing the dynamic interrupt moderation library of the hypervisor kernel to moderate the guest VM interrupts. This approach makes the vDPA device implementation lightweight in nature yet achieve desired interrupt moderation using fraction of hypervisor compute resource. We further extend to offload the Linux kernel netdim library to virtio PCI hardware devices and discuss the performance results.