OVS Queue Selection Optimization
When a VM is configured with multiple queues, the CPU running the qperf tool may be different from the CPU handling virtio-net input interrupts. In this case, the VM may exit due to inter-processor interrupts (IPIs), increasing latency overhead. In latency-sensitive scenarios, the packet sending queue selection logic on the OVS can be modified to add a sending mode. When the PMD receives a network packet from the VM, it records the 5-tuple information and queue ID. When it sends packets to the VM later, it matches the queue ID based on the 5-tuple information. In this way, VM exits caused by IPIs and packet transmission latency can be reduced.
- Download DPDK 24.11 source code.
1git clone https://github.com/DPDK/dpdk.git -b v24.11
- Download the DPDK queue selection optimization patch.
1 2
git clone https://gitee.com/kunpeng_compute/boostkit_-virtualization.git cd boostkit_virtualization/dpdk/dpdk-24.11
- Apply the patch to the DPDK source code.
1 2 3
cp [Virtualization_Loss_Optimization]0001-Adding-a-new-transmission-mode-TXQ_REQ.patch ../../dpdk cd ../../dpdk patch -p1 < [Virtualization_Loss_Optimization]0001-Adding-a-new-transmission-mode-TXQ_REQ.patch
- Compile the DPDK.
1meson -Ddisable_drivers=mlx4 --prefix=/usr --libdir=/usr/lib64 --bindir=/usr/bin --sbindir=/usr/sbin --includedir=/usr/include/dpdk -Dc_args="-O2 -g -fstack-protector-strong" -Dc_link_args="-g -Wl,-z,relro,-z,now,-z,noexecstack" -Denable_kmods=true build
- Enable DPDK queue selection optimization.
1ovs-vsctl set Interface tap0 other_config:tx-steering=txfollowrx
To disable this optimization, run the following command:
1ovs-vsctl remove Interface tap0 other_config tx-steering
Parent topic: OVS+DPDK Optimization