Photo by Scott Rodgerson on Unsplash
RDMA: Zero-Copy Remote Memory Access
Traditional network I/O forces every packet through a gauntlet of copies and context switches. Data arrives at a network interface card, gets copied into kernel buffers, then copied again into application memory. The CPU orchestrates each step, and every transition between kernel and user space burns microseconds. For high-throughput, low-latency workloads like distributed storage, HPC clusters, and real-time analytics, this overhead becomes the bottleneck.
RDMA (Remote Direct Memory Access) sidesteps the entire stack. It allows a network adapter to read from or write to application memory directly, without involving the CPU or kernel. The result is single-digit microsecond latencies and multi-gigabyte-per-second throughput with minimal CPU load.
How RDMA Works
RDMA operates by establishing memory regions that both the application and the network adapter can access. An application registers a buffer with the RDMA-capable NIC, which pins those pages in physical memory and creates a mapping the hardware can use. When a remote system wants to read or write that buffer, it sends RDMA commands directly to the NIC.
The NIC performs DMA operations to transfer data between the registered memory and the network, entirely in hardware. The CPU only gets involved to set up the memory regions and post work requests to the NIC’s queue. The actual data movement happens without CPU intervention, freeing cycles for computation.
There are several RDMA verbs that applications use. RDMA_READ allows a remote node to pull data from your memory. RDMA_WRITE lets a remote node push data into your memory. SEND and RECEIVE provide a two-sided communication model where both endpoints explicitly participate. All of these bypass the kernel’s network stack.
Protocol Layers
RDMA isn’t a single protocol but a set of capabilities supported by different transports. InfiniBand was the original purpose-built fabric for RDMA, offering ultra-low latency in specialized networks. RoCE (RDMA over Converged Ethernet) brings RDMA semantics to standard Ethernet networks, with RoCEv2 using UDP/IP encapsulation for better routing support. iWARP layers RDMA over TCP, trading some performance for compatibility with existing IP infrastructure.
Each transport has tradeoffs. InfiniBand delivers the lowest latency but requires dedicated hardware. RoCE achieves near-InfiniBand performance on Ethernet but is sensitive to packet loss and requires lossless Ethernet configurations with priority flow control. iWARP works on standard TCP networks but adds overhead from TCP’s reliability mechanisms.
Memory Registration and Protection
Memory registration is expensive. The kernel must pin physical pages to prevent them from being swapped out or moved during DMA operations, and it must set up translation tables that map virtual addresses to physical addresses the NIC can use. For large buffers or frequent registrations, this overhead can negate RDMA’s benefits.
Modern RDMA stacks use memory registration caches to reuse previously registered regions, and some NICs support on-demand paging, which allows the hardware to handle page faults and work with virtual addresses directly. This eliminates upfront registration costs but adds complexity to the hardware.
Protection keys ensure that remote nodes can only access memory they’re authorized to use. Each memory region gets a key, and remote operations must include a matching key to succeed. This prevents accidental or malicious access but relies on applications managing keys correctly.
Where RDMA Matters
Distributed storage systems use RDMA to replicate blocks between servers at near-memory speeds. Traditional TCP-based replication struggles to saturate high-speed links without burning CPU, but RDMA can push tens of gigabytes per second with negligible CPU overhead. This matters for disaggregated storage architectures where compute and storage nodes communicate constantly.
High-frequency trading platforms use RDMA to minimize latency between trading engines and market data feeds. Every microsecond counts, and eliminating kernel involvement can shave critical time off the path.
Machine learning training across multiple GPUs leverages RDMA for gradient synchronization. Moving multi-gigabyte tensors between nodes with minimal latency keeps GPUs fed and reduces training time.
The Complexity Tax
RDMA’s performance comes with operational complexity. Applications must be rewritten to use RDMA verbs instead of sockets. Memory management becomes manual and error-prone, as the kernel can’t transparently handle paging or protection. Network configuration requires careful tuning, especially for RoCE, where packet loss can stall entire flows.
The ecosystem remains fragmented. Different vendors implement RDMA features differently, and software that works on one fabric may not port cleanly to another. This friction keeps RDMA confined to specialized domains where the performance gains justify the engineering investment.
RDMA represents a fundamental architectural shift: moving data without moving it through the CPU. For workloads bottlenecked on network I/O rather than computation, it unlocks performance that traditional stacks simply cannot reach. But it requires rethinking how applications interact with memory and networks, trading familiar abstractions for raw speed.