Dynamic Interrupt Moderation
Dynamic Interrupt Moderation (DIM) adjusts the interrupt moderation settings to optimize packet processing. For guest OS kernels older than version 6.8, DIM offloads this function to the DPU, reducing the interrupt rate from the guest OS.
By lowering the interrupt rate in high-bandwidth traffic scenarios, DIM enhances CPU utilization for both the hypervisor and guest VMs, while maintaining nearly the same bandwidth.
DIM is only supported on BlueField-3.
For example, the following table shows the benefit of using DIM:
Tx Interrupt Rate (K irq/s) |
Rx Interrupt Rate (K irq/s) |
Tx Throughput (Gb/s) |
Rx Throughput (Gb/s) |
|
DIM Enabled |
7.3 |
7.5 |
171 |
181 |
DIM Disabled |
7.5 |
23.7 |
175 |
181 |
The following test parameters:
Guest OS kernel version – 5.11.0
Number of virtio-net device – 1
Number of QPs – 31
Queue depth – 1024
MTU – 1500
Benchmark – iPerf with 31 streams
DIM is a per-device configuration. To enable or disable it, use this command:
[dpu]# virtnet modify -p <pf> [-v <vf>] device -dim {enable | disable}
Configuration example:
Unload drivers from the guest-OS side:
[host]# modprobe -rv virtio_net && modprobe -rv virtio_pci
Enable DIM:
[dpu]# virtnet modify -p 0 device -dim enable {'pf': '0x0', 'all': '0x0', 'subcmd': '0x0', 'dim_config': 'enable'} { "errno": 0, "errstr": "Success" }
InfoUsing
disable
disables DIM.Load the drivers:
[host]# modprobe -v virtio_pci && modprobe -v virtio_net
Query the device to verify
dim
is enabled:[dpu]# virtnet query -p 0 -b | grep -i dim "dim": "enabled"