
RoCE v2 Configuration for AI Training Clusters: Best Practices
RoCE v2 brings RDMA performance to Ethernet-based AI training clusters, but misconfigured priority flow control and congestion management will silently destroy throughput. This guide covers the end-to-end RoCE v2 configuration best practices that production AI clusters depend on.
RDMA over Converged Ethernet version 2 (RoCE v2) extends RDMA semantics to standard IP/UDP routed networks, making it the primary mechanism for high-performance GPU-to-GPU communication on Ethernet-based AI clusters. When configured correctly, RoCE v2 delivers throughput within 5–10% of native InfiniBand for many workloads. When misconfigured — and the configuration surface area is significant — it degrades silently into lossy TCP-equivalent performance while appearing to function normally.
Priority Flow Control: The Foundation
RoCE v2 requires a lossless transport layer because RDMA operations cannot tolerate packet drops — a single dropped packet causes a queue pair to enter error state, requiring reconnection overhead that destroys latency characteristics. Priority Flow Control (PFC, IEEE 802.1Qbb) provides per-priority-class pause frames that prevent queue overflow without dropping packets. Configure RoCE traffic on a dedicated DSCP value (typically DSCP 26, mapped to PFC priority 3) and enable PFC only on that priority class to avoid head-of-line blocking for non-RDMA traffic.
- Enable PFC on switches and NICs for RoCE priority class only — not globally
- Set ECN marking thresholds at 30–50% of queue depth for early congestion signaling
- Configure DCQCN on all ConnectX NICs: CNP generation enabled, RP/NP timer tuning
- MTU: set 4096 or 9000 bytes (jumbo frames) end-to-end for throughput efficiency
- Disable adaptive routing at the NIC level; use static routing within a training job
- Verify PFC watchdog timers are enabled to recover from PFC deadlock scenarios
DCQCN: Explicit Congestion Notification for RoCE
Data Center Quantized Congestion Notification (DCQCN) is the standard congestion control algorithm for RoCE v2 at scale. Switches mark packets with ECN bits when queues exceed configured thresholds. Destination NICs generate Congestion Notification Packets (CNPs) back to senders. Senders react by reducing their transmission rate using a multiplicative decrease / additive increase algorithm. Proper DCQCN tuning requires coordinating ECN marking thresholds on switches with NIC-side rate reduction parameters — mismatched configurations cause either over-throttling (reducing throughput) or under-reaction (allowing queue buildup and PFC storms).
Switch Configuration Checklist
On your Ethernet switches (Arista 7050X, Cisco Nexus 9300, or similar), configure DSCP-to-queue mapping to place RoCE traffic in a lossless queue with PFC enabled. Set ECN minimum threshold to 150KB and maximum to 1.5MB for a typical 256KB NIC buffer environment. Enable WRED on non-RDMA queues to provide active queue management for TCP traffic sharing the fabric. Validate configuration with a traffic generator before placing GPUs in production — a misconfigured switch upstream of 16 DGX systems can throttle an entire training job while appearing healthy in monitoring dashboards.
PFC storms are the most common failure mode in production RoCE deployments. A single congested port can propagate pause frames across an entire fabric, halting all RDMA traffic within milliseconds. PFC watchdog timers are non-optional in production.
How Nexus Compute Helps
Nexus Compute pre-validates RoCE v2 configurations across the GPU server and switch combinations we ship. Our configurations include documented PFC, DCQCN, and ECN settings verified for each NIC and switch pairing in our portfolio. We provide RDMA performance validation scripts and offer on-site commissioning services for clusters where misconfiguration risk is unacceptable. Contact our infrastructure team to discuss RoCE configuration support for your AI training environment.
Planning a hardware investment?
Tell us what you're trying to build. A procurement specialist will help you specify and quote the right configuration — within 48 business hours, no obligation.