Curriculum / Part 5 · The GPU data path: RDMA and GPUDirect
Lesson 22

RDMA for storage

RDMA for storage traffic: RoCEv2 vs InfiniBand, NFS over RDMA, NVMe-oF over RDMA, Lustre o2ib, and the tools to check them.

⏱ 40 min5-question quiz

The simple version

Normally a letter goes through the mailroom, where clerks open it, log it and pass it on. RDMA is a direct pneumatic tube between two offices: the sender drops it in and it lands on the right desk without anyone in between handling it.

RDMA in one paragraph

Remote Direct Memory Access lets a NIC read or write another machine's registered memory without either side's CPU copying data or the kernel network stack handling each packet. That means lower latency and far less CPU per gigabyte, which is why storage protocols for AI clusters use it.

InfiniBandRoCEv2
NetworkInfiniBand switches and subnet managerEthernet; RDMA carried in UDP (port 4791)
Loss handlingCredit-based, lossless by designUsually PFC/ECN-based congestion control tuned for low loss

Storage protocols over RDMA

ProtocolRDMA formNotes
NFSNFS over RDMAMount with -o rdma,port=20049
NVMe-oFNVMe/RDMAPort 4420 (Lesson 8)
LustreLNet o2ibNIDs look like 10.10.0.21@o2ib
SMBSMB DirectWindows/SMB environments

Checking the RDMA path

$ ibv_devices                 # RDMA devices present
$ ibv_devinfo -d mlx5_8       # port state, link layer (InfiniBand or Ethernet), MTU
$ rdma link show              # RDMA links and their netdevs
$ ib_write_bw -d mlx5_8 <server>   # perftest: raw RDMA write bandwidth between two hosts

Measure the raw RDMA path first. If ib_write_bw can't reach line rate, no storage protocol on top of it will.

Tools

ibv_devices / ibv_devinfo
List RDMA devices and port state (rdma-core).
rdma link show
RDMA link state (iproute2).
ib_write_bw / ib_read_bw
Raw RDMA bandwidth tests (perftest).
mount -t nfs -o rdma,port=20049
Mount NFS over RDMA.

Quiz

Lab

Related lab

Lab 6.1 · One TCP stream

Loading a 140 GiB model from the NAS (/nas/models/llm-70b/weights.safetensors) runs at about 2.2 GB/s. Someone already tried mount -o remount,nconnect=8 /nas and saw no change.

Start lab 6.1 →

Try it now in the simulator (opens with the command ready; press Enter):

$ mount | grep lustre