The Anatomy of an AllReduce Synchronization Incast
PFC XOFF threshold, the switch generates an 802.1Qbb pause frame back to the transmitting NIC or upstream spine. The sender must halt transmission on that specific CoS (Class of Service) priority queue, typically Priority 3 for RDMA, until an XON frame is received.
When multiple ranks send to a single aggregation target, the receiver's ingress buffer exhausts rapidly. If your switch headroom buffer is sized improperly, two catastrophic failure modes emerge: packet drop (inducing RoCEv2 Go-Back-N retransmission penalties of several milliseconds) or buffer bloat, where sustained pause frames turn the switch fabric into a cascading credit deadlock.
Calculating 800G Headroom on Broadcom Tomahawk 5
TEXT
Headroom = (2 × T_cable + T_transceiver + T_switch_mac + T_nic_rx_delay) × Bandwidth + 2 × MTU- Fiber propagation delay (
T_cable): Light through silica fiber travels at roughly 5 ns per meter. For a 50m cable, round-trip time is2 × 50m × 5 ns/m = 500 ns. - Optical transceiver and SerDes latency (
T_transceiver): DSP-based 800G PAM4 transceivers introduce serialization, deserialization, and forward error correction (KP4 FEC) latency, averaging roughly 110 ns per optical engine (≈ 220 nsround-trip). - Switch MAC-to-MAC processing (
T_switch_mac): Time to detect queue watermark, schedule, and emit the 802.1Qbb frame, roughly 400 ns on Tomahawk 5. - NIC response time (
T_nic_rx_delay): The PCIe NIC MAC must parse the pause frame, identify the priority queue, and halt the direct memory engine, which takes roughly 350 ns.
1,470 ns × 100 B/ns = 147,000 bytes (147 KB). Adding headroom safety margin for two jumbo MTU packets (typically 2 × 9,216 bytes ≈ 18.4 KB) yields a strict baseline of at least 166 KB of headroom buffer per port, per priority queue.
If you provision only 90 KB—a carryover setting from 400G configurations—the in-flight bytes will overflow the headroom before the remote NIC can stop transmitting. The switch drops packets silently inside the lossless queue, triggering RoCEv2 Go-Back-N recovery. The sender must retransmit the entire window from the lost packet onward, blowing tail latency from 2 microseconds to 15 milliseconds.
The Trap of Oversized Headroom and Buffer Bloat
BASH
# Inspect PFC pause frame rates and buffer drops on Linux hosts
ethtool -S eth0 | grep -E 'pfc_requests_rx|pfc_requests_tx|out_of_buffer'
# Query RoCEv2 hardware drop and retransmission counters
rdma -s link show mlx5_0/1pfc_requests_tx on the host increments rapidly alongside out_of_buffer drops on the switch, your headroom is undersized. Conversely, if pfc_requests_rx climbs steadily while switch packet drops stay at zero and training throughput degrades, you are suffering from buffer bloat and cascaded pause propagation.
Calibrating DCQCN and ECN Thresholds Against PFC
Kmin) and probability increases linearly up to a maximum threshold (Kmax). The destination NIC returns a Congestion Notification Packet (CNP) back to the source NIC, which scales back its transmission rate via an internal alpha/beta rate limiter.
The operational failure in most training clusters is that Kmin and Kmax are configured too close to the PFC XOFF threshold. If ECN marking occurs at 80% of queue capacity and PFC XOFF is set at 85%, the round-trip delay of the CNP packet prevents the sender from throttling down before the switch hits the hard PFC ceiling. PFC fires, the link halts, and the fabric oscillates violently between complete standstill and sudden burst.
The operational rule for stable 800G training networks is simple: separate your ECN and PFC thresholds aggressively. Set Kmin low (around 15% to 20% of queue depth) so subtle queuing triggers immediate, gentle rate trimming via DCQCN. Set Kmax around 50% to ensure 100% of packets carry the CE mark well before the queue reaches critical mass. Reserve PFC XOFF at 75% to 80%, leaving the remaining 20% strictly for the mathematically calculated in-flight headroom.
By enforcing this gap, the software transport layer throttles flows gracefully at the host level. The switch buffers remain unclogged, the headroom absorbs unexpected transient spikes without loss, and your distributed AllReduce steps execute with the microsecond-level determinism that ultra-scale AI training actually demands.