Introduction
High-performance computing (HPC) applications often rely on distributed data structures like hash tables and queues to share data across thousands of nodes. Developers typically choose between two communication paradigms: one-sided RDMA (Remote Direct Memory Access) and two-sided RPC (Remote Procedure Call). While RDMA is known for low latency by bypassing the target CPU, RPC offers greater expressivity by executing logic directly on the target node. This paper quantifies the trade-offs between these styles, particularly for irregular applications with unpredictable access patterns.
Methodology
The researchers compared RDMA-based implementations using the Berkeley Container Library (BCL) against RPC-based versions (Active Messages) using the GASNet-EX framework. They developed an analytical cost model to decompose complex operations into primitive components, such as put, get, and atomic compare-and-swap. Benchmarks were conducted on the Cori supercomputer (a Cray XC40) to measure raw component latency and full data structure performance across up to 128 nodes.
The Attentiveness Penalty
A critical finding of the study is the "attentiveness" penalty associated with RPC. Because RPCs require the target CPU to process requests, latency increases significantly if the target is busy with local computation. In contrast, RDMA operations are handled by the Network Interface Card (NIC) hardware, maintaining relatively constant latency regardless of CPU load.
As illustrated in the figure above, RPC latency (AM Queue Insertion) grows linearly as the remote compute time increases, whereas RDMA remains stable. However, RPCs can be more efficient in terms of network round-trips; a complex operation might require multiple RDMA calls to ensure atomicity, while a single RPC can handle the logic on the target node.
Key Results
The study found that RDMA-based "Find" operations in hash tables significantly outperform RPC versions due to lower raw overhead. For "Insert" operations, however, the performance gap narrows. This is because RDMA requires more complex coordination and multiple round-trips to ensure thread safety in a concurrent environment.
The analytical model proved highly effective at predicting which communication style would be faster for specific scenarios. While raw RDMA put latency was measured at approximately 3.0 μs compared to 8.0 μs for RPC (Active Messages), the "smart" nature of RPCs can offset this raw speed advantage in multi-step operations or high-contention scenarios.
Conclusion and Future Work
The choice between RDMA and RPC depends heavily on the "attentiveness" of the remote CPU and the complexity of the operation. While RDMA offers superior raw performance and resilience to CPU load, RPC's expressivity can reduce network overhead for complex logic. The authors suggest that their cost model can guide hardware architects in designing new RDMA primitives, such as indirect memory access, to further bridge the gap between these two paradigms. Future work will involve extending the model to account for high-network-congestion environments and different interconnect hardwares like InfiniBand.
Summary updated