Page MenuHomeVyOS Platform

Add VyOS CLI commands for NIC queue count and CPU affinity tuning
Open, NormalPublicFEATURE REQUEST

Description

Summary

Add native CLI support for NIC hardware queue configuration (ethtool combined channels) and RSS/IRQ affinity mapping.

Use case

Performance tuning is a fundamental step when deploying a software router in high-throughput or low-latency environments. Currently, VyOS lacks native commands to manage the hardware resources of the NIC, forcing users to rely on shell scripts.

Key use cases include:

  • Queue Alignment: Adjusting the number of combined channels to match the CPU core count or specific multi-queue requirements of the NIC.
  • Core Isolation: Binding IRQs/queues to specific cores (e.g., skipping Core 0 which often handles system interrupts) to prevent bottlenecks at the CPU level.
  • NUMA Optimization: In multi-socket systems, it is critical to bind a NIC's queues to the specific CPU socket (NUMA node) it is physically connected to. This avoids performance degradation caused by UPI/QPI traversal.

Additional information

While these settings can be applied via vyos-postconfig-bootup.script, this approach breaks the "Single Source of Truth" principle of the VyOS CLI. It makes configurations harder to backup, and migrate to new hardware.

Proposed CLI syntax for consideration:

# Set the number of combined queues (ethtool -L)
set interfaces ethernet eth0 hardware combined 16

# RSS Affinity: Specific core list (e.g., to avoid Core 0 or specific isolated cores)
set interfaces ethernet eth0 hardware rss core '2 4 6 8 10 12 14 16'

# RSS Affinity: Automatic mapping to a specific CPU socket (NUMA node)
set interfaces ethernet eth1 hardware rss node 1

Implementing this would bring VyOS closer to enterprise-grade NOS standards where hardware-level performance tuning is handled natively within the configuration model.

Details

Version
-
Is it a breaking change?
Perfectly compatible
Issue type
Feature (new functionality)
Forum thread
https://forum.vyos.io/t/how-to-set-txqueuelen-nic-queues-and-rss-in-vyos/17360