Tuning PFC and ECN on SONiC for AI back-end fabrics

, by SelectLogic Engineering

ai-fabricsroceqos

GPU training traffic is bursty and synchronized, which makes it unforgiving of packet loss. On SONiC, a lossless RoCEv2 fabric comes down to priority flow control, ECN marking and buffer profiles working together.

The three settings that matter most

  1. PFC on a single lossless priority, usually priority 3, applied consistently on every hop.
  2. ECN thresholds set low enough that senders slow down before PFC pauses kick in.
  3. Buffer profiles sized for your cable lengths and port speeds.

Treat PFC as the safety net and ECN as the steering wheel. If PFC pauses are frequent, ECN is set too high.

Verify, then tune

admin@leaf01:~$ show pfc counters
admin@leaf01:~$ show queue counters Ethernet0

Watch pause frames and ECN-marked packets under a real training job, not a synthetic benchmark, before locking settings in.

Back to all articles