RoCEv2 Congestion Control Playbook (PFC + ECN + DCQCN)

2026-03-17 · systems

RoCEv2 Congestion Control Playbook (PFC + ECN + DCQCN)

Date: 2026-03-17
Category: knowledge

Why this matters

RoCEv2 can deliver very low latency and high throughput, but only if the congestion loop is tuned as a system, not as isolated knobs.

Most outages in RDMA fabrics are not caused by one broken switch setting; they come from bad interaction between:

If this loop is misaligned, you get familiar symptoms:


1) The mental model: three control planes

Think in layers:

  1. Endpoint control (DCQCN/TIMELY/HPCC)

    • controls send rate over time.
  2. Queue signal (ECN)

    • marks packets before loss to say “slow down soon”.
  3. Emergency brake (PFC)

    • per-priority pause when buffers approach unsafe levels.

Healthy design principle:

Mark before pause, pause before drop.

If PFC fires before ECN can provide early feedback, you end up with pause-heavy behavior and unstable tails.


2) Quick algorithm selection matrix

A) Default, production-safe RoCEv2 in mixed datacenter traffic

Start with: DCQCN + ECN + bounded PFC

Why:

B) RTT-sensitive fabrics with strong timestamp fidelity and NIC support

Try: TIMELY

Why:

Caveat: noisy RTT measurement can destabilize control.

C) INT-capable fabrics seeking near-zero queue behavior

Try: HPCC

Why:

Caveat: requires stronger fabric feature assumptions and validation discipline.


3) Baseline observability (before tuning anything)

Collect these per-priority and per-port metrics first:

Without this baseline, tuning is guesswork.


4) Tuning order that avoids most failures

Step 1 — Traffic class hygiene

Many "mystery" problems are just classification drift.

Step 2 — ECN thresholds before PFC thresholds

Set ECN/WRED mark region to engage earlier than PFC headroom exhaustion.

Goal:

If PFC activates frequently while ECN marks are low, your marking starts too late.

Step 3 — PFC headroom correctness

Over-broad PFC is how small congestion turns into fabric-wide pain.

Step 4 — Endpoint controller tuning

For DCQCN fabrics:

For TIMELY/HPCC fabrics:


5) Practical health states (operator-friendly)

Use a simple state model:

GREEN

Action: normal operation.

AMBER

Action:

RED

Action:

SAFE_RECOVERY

Action: stepwise recovery with rollback gates.


6) Incast test plan (must-have)

Before rollout, run these repeatedly:

  1. N:1 short-flow incast (RPC-like)
  2. Elephant + mice coexistence
  3. Asymmetric path contention
  4. Failure drill (one switch under constrained buffers)

Promotion gate (example):

If only throughput improved but p99 worsened, reject.


7) Fast diagnosis cheatsheet

Symptom: PFC high, ECN low

Likely cause:

First action:

Symptom: ECN very high, throughput collapses, PFC low

Likely cause:

First action:

Symptom: one sender dominates, others starve

Likely cause:

First action:

Symptom: tail latency random spikes despite good averages

Likely cause:

First action:


8) Rollout strategy (safe)

  1. Lab calibration with realistic traffic mix.
  2. Canary rack(s) with full telemetry.
  3. Diurnal validation (at least 24h, ideally 72h).
  4. Gradual expansion with automatic rollback trigger.
  5. Post-change audit: ensure config drift detection is active.

Never roll congestion policy globally in one shot.


9) Common mistakes

  1. Treating PFC as normal flow control

    • PFC is emergency protection, not daily traffic shaping.
  2. Tuning only average throughput

    • user pain lives in p99 tails and fairness collapse.
  3. Ignoring classification correctness

    • perfect thresholds cannot fix wrong traffic class mapping.
  4. No canary rollback criteria

    • congestion changes without hard rollback gates are outage bait.
  5. Cross-vendor knob translation by name only

    • same label can have different semantics; validate behavior, not wording.

10) Minimal default stance (good starting point)

If you need a pragmatic baseline:

Then iterate with measured evidence.


References