PMD Load Balancing
OVS automatically collects task load statistics on each PMD polling core and measures their task processing pressure. This information is used to re-distribute tasks evenly across these PMD polling cores to balance single-core load pressure and avoid performance bottlenecks, thereby enhancing overall performance of the virtualization stack.
- Determine whether to enable PMD load balancing.
ovs-appctl dpif-netdev/pmd-rxq-show -secs 5
You are advised to enable this optimization if a single PMD handles multiple workloads and the overhead usage exceeds 70%.
- Configure OVS PMD load balancing.
ovs-vsctl --no-wait set Open_vSwitch . \ other_config:pmd-auto-lb="true" \ other_config:pmd-auto-lb-improvement-threshold="25" \ other_config:pmd-auto-lb-load-threshold="70" \ other_config:pmd-auto-lb-rebal-interval="1"
other_config:pmd-auto-lb="true" indicates that automatic load balancing is enabled.
other_config:pmd-auto-lb-improvement-threshold="25" indicates that rebalancing is performed when the load variance reaches 25%.
other_config:pmd-auto-lb-load-threshold="70" indicates that load balancing can be started when the PMD load reaches 70%.
other_config:pmd-auto-lb-rebal-interval="1" indicates that the automatic load balancing interval is set to 1 minute.