advanced26 min studyLesson 227 in Engineering

RoCEv2, loss recovery, and congestion response

Separate transport recovery, ECN-based rate control, and optional link protection in a specified deployment.

On this page

What you’ll understand

  • Distinguish routable RoCEv2 transport from a congestion-control policy.
  • Explain the different roles of recovery, DCQCN, and PFC.
  • Calculate retransmission traffic overhead without claiming a complete transport prediction.

RoCEv2 carries RDMA transport over an IP-routable Ethernet network. The protocol name does not specify the entire deployment's loss recovery, queue policy, or congestion-controller settings. Early large deployments often combined protected priorities with ECN-driven control; later hardware and designs also support lossy operation under stated conditions. Ask what the actual NIC, firmware, transport mode, and fabric configuration guarantee rather than declaring PFC either universally mandatory or universally harmless to remove.

Name each responsibility

The selected reliable transport detects and recovers from missing or otherwise invalid progress according to its implementation and configured retry behavior. Congestion control changes the offered sending rate to avoid persistent overload. PFC applies hop-by-hop priority pausing to protect buffers under its assumptions. These mechanisms can interact, but they solve different problems. A network that does not drop packets can still suffer long queues or stalls, while a network that permits loss needs recovery that performs acceptably for the workload.

RoCEv2's IP and UDP encapsulation enables routed fabrics and can supply fields for forwarding decisions. It does not make the RDMA operation behave like an arbitrary application UDP datagram, nor does it inherit TCP's congestion controller. Verify actual path MTU, addressing, priority classification, and endpoint support. A mismatch can cause failures that look like congestion but are configuration or reachability problems. Begin with correctness and compatible endpoint state before interpreting bandwidth numbers.

ηpayload=DusefulDuseful+Dretransmit+Doverhead\eta_{\rm payload}=\frac{D_{\rm useful}}{D_{\rm useful}+D_{\rm retransmit}+D_{\rm overhead}}
All D terms are bytes counted at the same selected boundary, with nonoverlapping categories. The ratio is dimensionless. It accounts for traffic efficiency, not recovery latency, fairness, or the probability of a completion error.↔ Scroll wide equations horizontally.

DCQCN is a feedback loop, not a losslessness proof

DCQCN uses congestion indications to adjust sender behavior in RoCE deployments. In the original design, switch marking, receiver-generated congestion notifications, and a sender-side rate-control process form a loop. Notification timing, rate limits, and parameter choices affect its response. Naming DCQCN does not establish that switches mark at suitable thresholds, notifications return on a functioning path, or the sender's actual settings match the intended controller. Inspect the implemented version rather than copying constants from another cluster.

PFC can suppress some congestion drops while that loop reacts, yet can also introduce blocking and cyclic dependencies. It is not a fundamental semantic prerequisite for every possible RDMA transport design: supported lossy RoCE configurations and alternative recovery designs exist. Removing it from a particular system still requires a validated loss and recovery budget, not a generic claim that Ethernet handles everything. Evaluate short-message tails, sustained collectives, incast, and receiver pressure under representative faults and traffic mixes.

ttraffic≥Duseful+Dretransmit+DoverheadBt_{\rm traffic}\geq\frac{D_{\rm useful}+D_{\rm retransmit}+D_{\rm overhead}}{B}
B is an actual upper rate at the same byte-counting boundary, in bytes/s; the bound is seconds. It assumes those bytes must traverse that bottleneck. Feedback delay, idle gaps, and processing can make elapsed time larger than the traffic lower bound.↔ Scroll wide equations horizontally.

A small transfer test is not a cluster certificate

Test clean point-to-point operation first, then introduce multiple senders, mixed directions, and synchronized collectives. Record loss, retransmission, ECN, congestion-notification, and pause counters with their device-specific definitions. Compare end-to-end completion and error status with those signals. A receiver that cannot drain its local resources can trigger upstream symptoms even when switch links are not over-subscribed. Preserve the actual receiver and memory path used by the AI workload instead of benchmarking a faster substitute.

The queue lab demonstrates only the need to match offered work with service. Reset and set both λ=4, μ=2; predict growing backlog and Step. For an independent lower-load case Reset and re-set λ=2, μ=4 before predicting and stepping. The fluid trajectory begins at four jobs and control edits retain time unless reset. It has no RoCE packets, retransmissions, DCQCN state, ECN notifications, or PFC. Use it to state the rate imbalance, then identify which missing feedback and recovery measurements the real deployment needs.

Traffic cost of retransmission

A hypothetical transfer has 1 decimal GB of unique payload and 0.25 GB of retransmitted bytes at the chosen bottleneck. Ignore all headers for this isolated calculation and assume an upper rate of 20 GB/s.

  1. Total required traffic in this accounting is 1+0.25=1.25 GB. Payload efficiency is 1/1.25=0.8, or 80%.

  2. The traffic time lower bound is 1.25/20=0.0625 seconds, or 62.5 ms. With no retransmission under the same assumptions, the bound is 1/20=50 ms.

  3. The bound grows by 12.5 ms, or 25%, despite an 80% useful-byte fraction. Real recovery can add idle waits and feedback delay, so actual elapsed time and tail impact may be worse than this traffic-only calculation.

The result

Retransmission consumes bottleneck capacity and may add independent waiting. Traffic efficiency is not a complete loss-recovery model.

Explore the model

Interactive lab

Interactive lab · queue

Rate pressure without a transport controller

Reset and set λ=4, μ=2, predict growth, then Step. Reset and re-set λ=2, μ=4 for a separate declining case. This fluid queue does not implement RoCEv2, retries, DCQCN, ECN, or PFC.

Rate pressure without a transport controllerFluid backlog starts at 4 and follows max(0, 4 + (λ − μ)t). The separate M/M/1 residence-time formula assumes Poisson arrivals, exponential service and λ < μ. Current readings: Fluid backlog: 4; Net rate · λ − μ: −1 /s; M/M/1 mean residence: 1 s. All parameters are adjustable with the labeled controls below.02.557.51001.534.56Elapsed time · sFluid backlogλ < μ
Fluid backlogCurrent time
Fluid backlog
4
Net rate · λ − μ
−1 /s
M/M/1 mean residence
1 s
t = 0 s

Fluid backlog starts at 4 and follows max(0, 4 + (λ − μ)t). The separate M/M/1 residence-time formula assumes Poisson arrivals, exponential service and λ < μ. Parameter changes pause playback and recompute the model at the current elapsed time. Reset restores both parameters and returns time to zero. Playback starts paused. Adjust either parameter, then choose Play or Step.

Look forIdentify offered-load pressure separately from the mechanisms that recover losses and change future sending rates.

Check your understanding

Which statement best describes PFC in relation to RoCEv2?

Try it yourself

A transfer sends 2 GB of unique payload, 0.4 GB of retransmissions, and 0.1 GB of other counted overhead across a 25 GB/s bottleneck. Find useful-byte efficiency and the traffic-time lower bound.

Take a moment to make a prediction or work it out on paper. Open a hint when you need one.

Give me a hint

Use categories at the same boundary and add them before dividing.

Compare with the solution

Total traffic is 2.5 GB. Efficiency is 2/2.5=0.8, or 80%, and the traffic lower bound is 2.5/25=0.1 seconds. These figures exclude idle recovery gaps and other bottlenecks. They also require the three byte categories to avoid overlap; a NIC counter already including retransmissions must not be added to those same bytes again.

Take it with you

  • RoCEv2 encapsulation does not specify every recovery or control policy.
  • DCQCN, transport recovery, and PFC have different responsibilities.
  • Validate loss behavior and tail completion for the actual endpoint and collective workload.

Read further

Original sources and deeper explanations to follow at your own pace.

Optional progress, saved in this browser when available. Revisit any lesson at any time.

Lesson not marked complete.