Help us improve your experience.

Let us know what you think.

Do you have time for a two-minute survey?

 
 

Queue-Pair Hashing for RDMA Flows

Overview

Load balancing algorithms use hashing mechanisms to select the best outgoing interface from a link aggregation group (LAG) or ECMP bundle. Most load balancing algorithms hash (that is, divide the traffic load among links) based on 5-tuple information. The 5-tuple information covers Layer 2 (L2), which includes the source and destination MAC addresses; Layer 3 (L3), which includes the source and destination IP addresses; and Layer 4 (L4), which includes the TCP/UDP ports. However, in AI-ML training networks, most traffic uses Remote Direct Memory Access (RDMA) over Converged Ethernet version 2 (RoCEv2) for transport. ROCEv2 traffic might not have variance on L4 ports. This leads to less entropy and could result in less efficient load balancing.

In a network that uses RoCEv2 for application traffic transport, an RDMA connection sends traffic on a send queue and receives traffic on a receive queue. These queues form the RDMA connection. Together, the send queue and receive queue are referred to as a queue pair. Each queue pair has an identifiable prefix. ROCEv2 uses the destination queue pair as the flow identification field.

You can enhance load balancing on your AI-ML training network by including the destination queue pair in the hash calculation. This is called queue-pair hashing. Adding the destination queue pair to the hash calculation increases the entropy of the system and improves the overall load balancing efficiency. On devices and releases that support this feature, queue-pair hashing is enabled by default for all ROCEv2 traffic.

Note:

When you enable dynamic load balancing (DLB) on your device, queue-pair hashing is automatically disabled on link aggregation group (LAG) interfaces.

Configuration

Verify Queue-Pair Hashing

By default, the load balancing algorithm includes the RDMA queue pair as part of the hash calculation for RDMA traffic (both IPv4 and IPv6). No configuration is required.

To confirm the feature is enabled, use the following command and confirm that the “RDMA Queue Pair” field in the output is marked “yes”:

Disable Queue-Pair Hashing

To exclude the queue pair from the load balancing hash calculation, configure the following:

  1. Check the hash mode configured on your device using the show forwarding-options enhanced-hash-key command.
    In this example, the hash mode is the default layer2-payload. The output has been shortened for clarity.
  2. Configure the hash mode using the hash-mode statement.

    Even though the device already recognizes layer2-payload as the hash mode in this example as shown in the previous step, you must still configure it in the CLI. Otherwise, the commit fails.

  3. Configure the no-queue-pair option for either IPv4 or IPv6.
  4. Commit the configuration.

Platform Support

See Feature Explorer for platform and release support.