Bookmarks

RoCE — RDMA over Ethernet

RDMA over Converged Ethernet

A protocol that carries RDMA from the InfiniBand fabric onto ordinary Ethernet: network adapters write data directly into another node’s memory across standard switches.

Also: RoCEv2, RoCE v2, routable RoCE

checked 9 Nov

All terms

RoCE is a way of keeping RDMA while moving from a dedicated InfiniBand fabric to Ethernet: the same low latency and CPU offload, with the network built from the standard switches used by the rest of the data centre. The RoCE specifications are maintained by the InfiniBand Trade Association — the same body behind InfiniBand itself: RoCE takes the transport layer of the InfiniBand architecture and places it on top of Ethernet frames.

How the versions differ

The first version of RoCE appeared in 2010 as Annex A16 to the InfiniBand specification and worked at layer 2: RDMA packets travelled inside Ethernet frames with a separate ethertype, so there was no routing — only within a single L2 segment. In RoCEv2 the packets are wrapped in UDP/IP and routed between segments; IANA has assigned port 4791 to them, which is why RoCEv2 is sometimes called routable RoCE.

VersionTransportWhere it runs
RoCEv1Ethernet frames (L2)a single segment, no routing
RoCEv2UDP/IP, port 4791routable L3 network

A lossless network

RDMA tolerates packet loss poorly: a lost packet has to be sent again, and throughput drops sharply. RoCE is therefore designed for a lossless network. The classic approach is Data Center Bridging: Priority Flow Control (PFC) halts the sender when congestion builds up on a particular traffic class, while ECN marks packets as congestion begins, and the adapters respond with CNP messages, slowing their pace. The PFC and ECN settings must be agreed on every node and every switch along the path: a mismatch on even one device breaks the whole fabric.

Where it is used

The second use case after neural network training is fast storage networking: NVMe-oF and distributed file systems serve data over RoCE with latencies close to those of local disks. On NVIDIA Ethernet platforms (Spectrum-X), RoCEv2 is a way to connect the GPU nodes of a cluster while staying within the familiar Ethernet setup. To a developer, RoCE looks like ordinary RDMA: the same verbs interface, the same programs as on InfiniBand.

RoCE can also run without specialised hardware: Soft-RoCE (the RXE driver in the Linux kernel) implements RDMA on top of an ordinary network adapter — fine for development and testing, but usually not for production.

bashSoft-RoCE: RDMA on an ordinary Ethernet adapter
sudo modprobe rdma_rxe && rdma link add rxe0 type rxe netdev eth0

Sources

the term is written from these pages

Verified 9 Nov

Not to be confused with

what it is mixed up with and how it differs

  • IBInfiniBand

    InfiniBand is a separate network with its own adapters and switches; RoCE is the same RDMA transport, but over Ethernet.

  • RDMAremote direct memory access

    RDMA is the direct memory access mechanism itself; RoCE is one way of delivering it, alongside InfiniBand and iWARP.

In depth in the references

where the topic is covered in detail