InfiniBand vs RoCE v2 Transport Mechanics
Distributed deep learning requires lossless network fabrics. Unlike standard TCP/IP where packet drops are resolved via slow retransmission timeouts, AI fabrics use either native InfiniBand (with hardware credit-based flow control) or RoCE v2 (RDMA over Converged Ethernet with Priority Flow Control and Explicit Congestion Notification).
Hardware Credit-Based Flow Control (InfiniBand)
InfiniBand switches maintain credit buffers for each receiver. A sender only transmits packets when receiver buffer credits are available, guaranteeing zero packet drops in the fabric with microsecond latency.
Priority Flow Control (PFC) & ECN (RoCE v2)
RoCE v2 runs on Ethernet. Priority Flow Control (IEEE 802.1Qbb) sends PAUSE frames when switch ingress buffers cross high watermarks. Explicit Congestion Notification (ECN / RFC 3168) marks packets (CE) to trigger sender-side rate reduction (DCQCN).
PFC Deadlocks & Headroom Sizing
If PAUSE frames propagate upstream in a circular dependency across multiple switches, the entire fabric experiences a PFC deadlock, freezing all training jobs cluster-wide until switches are rebooted.
For a 100-meter fiber cable (500ns propagation each way) running 400 Gbps (50 GB/s) with 400ns switch processing time, buffer headroom must be >= (1400ns * 50 GB/s) * 1.5 = ~105 KB per port to prevent packet drops before the PAUSE frame halts the sender.
- In RoCE v2 clusters, enable Dynamic ECN tuning and monitor PFC pause frame counters; nonzero PFC storms require immediate buffer threshold adjustments.
- InfiniBand Subnet Manager (OpenSM) topology routing should use fat-tree routing (ftree) or adaptive routing (ar) to ensure collision-free collective paths.
- Use rdma-core and ibv_rc_pingpong to verify raw RDMA latency (< 1.5 microseconds) before starting multi-node training.