Efficient RDMA Communication Protocols

Konstantin Taranov, Fabian Fischer, Torsten HoeflerarXiv 2022 · DOI

Introduction

Remote Direct Memory Access (RDMA) has become a cornerstone of high-performance networking in modern data centers, enabling low-latency, high-throughput communication by bypassing the CPU. However, the low-level nature of RDMA "verbs" makes the design of efficient communication protocols exceptionally challenging. Developers often reinvent common data exchange patterns, frequently overlooking hardware-specific nuances like PCIe bus overhead or memory registration costs. This work addresses the lack of a definitive study on RDMA building blocks by providing a comprehensive taxonomy of protocols and introducing novel algorithms that minimize CPU overhead and memory footprint.

A Taxonomy of RDMA Protocols

The research categorizes 20 uni-directional data channel protocols into six primary families based on memory management and receiver signaling:

  1. Send/Recv: The traditional approach using pre-posted receive buffers.
  2. Write Slot: RDMA WRITEs to dedicated "mailbox" slots.
  3. Ring Buffer: Continuous writing to circular memory regions.
  4. Shared Ring Buffer: Multiple senders sharing a single receiver's buffer.
  5. Read Slot: Receiver-initiated "pull" using RDMA READs.
  6. Read Ring Buffer: A novel "passive" broadcast where readers pull from a sender's local ring.

Novel Optimizations

Three specific optimizations are introduced to push the performance boundaries of standard RDMA:

  • Inlined Bell without Zeroing: Standard ring buffers require receivers to "zero out" memory to detect new messages. This novel approach uses a "flip" trick where the sender's WRITE request unsets the "bell" for the subsequent message while writing the current one, eliminating zeroing overhead.
  • Shared N:1 Ring Buffers: Utilizing RDMA ATOMIC operations, multiple senders can safely reserve space in a single circular buffer, significantly reducing memory consumption compared to private per-sender buffers.
  • READ-centric Circular Buffers: This allows for "passive" senders. Messages are written to local memory, and remote readers fetch them via RDMA READ, removing the need for the sender to interact with its own NIC for transmission.

Performance Analysis and Key Insights

The evaluation utilized synthetic microbenchmarks on 100 Gb/sec Nvidia ConnectX5 NICs. A fundamental insight is the mandatory nature of zero-copy protocols. As shown in Figure 4, any protocol requiring CPU-side data copying suffers from significantly higher latency and lower throughput, particularly as message sizes increase.

Impact of zero-copy on latency and throughput.

The authors also advocate for measuring performance in Half-Round-Trips (HRTs), a metric that remains constant across hardware generations, unlike raw microsecond latency. Furthermore, the PCIe bus is identified as a critical bottleneck; moving synchronization variables to Device Memory (on-NIC memory) can bypass this bottleneck, yielding up to a 4x improvement in cumulative throughput for N:1 scenarios.

Key Results

The "inlined bell without zeroing" protocol consistently outperforms standard ring buffers. Figure 6 illustrates the latency characteristics of various protocols across a range of message sizes. The optimized ring buffer (purple line) maintains competitive low latency, especially for larger messages where the cost of zeroing memory would otherwise be prohibitive.

Latency comparison across different RDMA communication protocols.

Additionally, the evaluation of "Read Rings" revealed a bimodal latency distribution. This occurs because readers may require two RDMA READs—one for length and one for data—though the authors demonstrate that prefetching can effectively mitigate this cost.

Conclusion

This work provides a systematic framework for choosing and designing RDMA communication protocols. While optimizations like "inlined bell without zeroing" offer significant gains, they rely on in-order byte delivery, a constraint not met by all modern transports (e.g., Amazon’s EFA). Future work will explore the integration of these protocols into emerging SmartNIC architectures.

Summary updated

BibTeX
@misc{taranov2022efficient,
  author = {Konstantin Taranov and Fabian Fischer and Torsten Hoefler},
  title = {{Efficient RDMA Communication Protocols}},
  year = {2022},
  eprint = {2212.09134},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2212.09134},
}
Figure