RX IRQs triggering for network traffic processing in multiqueue-enabled virtual machines
This document (000021267) is provided subject to the disclaimer at the end of this document.
Environment
SUSE Linux Enterprise Server 12 Service Pack 5
Situation
- Setup a QEMU/KVM environment [1];
- Install openvswitch supporting dpdk (>= 2.14.2);
- On openvswitch, configure a bridge including two dpdkvhostuserclient interfaces as described in [2], enabling multiqueue support on them;
- Configure two SLES VMs, each one having a vNIC attached to the bridge described above and setup with multiple queues in a virtio-net / vhostuser configuration [3];
Resolution
The number of RX IRQs being triggered is related to the number of Poll Mod Drivers (PMDs) being run by Openvswitch.
Their configuration can be shown by running the command :
ovs-appctl dpif-netdev/pmd-rxq-show
To fine tune them, the pmd-cpu-mask configuration parameter is available, which specifies the CPU mask for setting the CPU affinity of the PMD threads.
The value is specified in hexadecimal (hex) format: when not specified, only one PMD thread is created per each NUMA node and, by default, pinned to any available CPU on the NUMA node.
For example, the following command assigns CPUs 2, 5, and 8 to PMDs handling:
ovs-vsctl set Open_vSwitch . other_config:pmd-cpu-mask=" 0x124"
The wider the bitmask, the more CPUs dedicated to PMDs, the more distinct RX IRQs can be triggered in the VMs.
Moreover, it is worth explicitly remarking that the RX queues being assigned to non-dedicated PMDs will not be polled.
Additional Information
[1] https://documentation.suse.com/sles/15-SP5/html/SLES-all/cha-qemu-host.html#
[2] https://docs.openvswitch.org/en/latest/topics/dpdk/vhost-user/
[3] https://libvirt.org/formatdomain.html#vhost-user-interface
Disclaimer
This Support Knowledgebase provides a valuable tool for SUSE customers and parties interested in our products and solutions to acquire information, ideas and learn from one another. Materials are provided for informational, personal or non-commercial use within your organization and are presented "AS IS" WITHOUT WARRANTY OF ANY KIND.
- Document ID:000021267
- Creation Date: 06-Nov-2023
- Modified Date:07-Nov-2023
-
- SUSE Linux Enterprise Server
For questions or concerns with the SUSE Knowledgebase please contact: tidfeedback[at]suse.com