TL;DR
This paper introduces a novel topology-aware distributed Reader-Writer (RMA-RW) lock designed for high-performance computing systems. It offers adjustable performance tradeoffs, outperforming existing solutions by up to 81% and accelerating critical distributed applications like hashtables.
What Problem Does This Paper Address?
Modern supercomputers and data centers are increasingly built on distributed-memory (DM) architectures with complex Non-Uniform Memory Access (NUMA) hierarchies. Efficiently synchronizing access to shared data in these systems is crucial, especially for workloads dominated by reads (like graph processing or key-value stores). Traditional locking mechanisms often struggle with the scale and hierarchical nature of these systems, leading to performance bottlenecks due to inter-node communication and a lack of awareness of the underlying hardware topology. Existing Reader-Writer locks, while good for read-heavy workloads, are typically designed for shared-memory systems and don't scale well to DM environments. This paper addresses the need for a distributed lock that is both topology-aware and efficiently handles the distinct access patterns of readers and writers in large-scale DM systems.
Methods
The core innovation is a topology-aware distributed Reader-Writer (RMA-RW) lock. Its design is modular, built upon three key distributed data structures:
- Distributed Counter (DC): Tracks active readers and writers. It's adjustable to favor either readers or writers, influencing latency and contention.
- Distributed Queues (DQs): Order writers waiting for the lock within specific machine elements (e.g., nodes, racks). These leverage a distributed MCS lock and incorporate thresholds to manage lock passing between elements, balancing fairness and throughput.
- Distributed Tree (DT): Connects all DQs across different memory hierarchy levels, forming a tree structure that mirrors the system's topology. This allows writers to traverse the hierarchy efficiently.
The lock uses non-blocking Remote Memory Access (RMA) techniques for high performance. A key aspect is the ability to tune parameters (TDC, TL,i, TR) to achieve specific performance characteristics, creating a three-dimensional parameter space for lock behavior. The authors also developed a topology-aware distributed MCS lock (D-MCS) as a building block.
Datasets
Not discussed in the paper. The evaluation uses microbenchmarks and a distributed hashtable workload.
Key Insights and Ideas
- Topology Awareness is Crucial: Simply ignoring the hierarchical structure of modern HPC systems leads to suboptimal performance. The RMA-RW lock explicitly leverages this topology to reduce communication overhead.
- Tunable Tradeoffs: The lock's modular design with adjustable parameters (favoring readers vs. writers, fairness vs. locality, latency vs. throughput) is a significant advantage, allowing users to tailor performance to specific workloads.
- RMA as a Foundation: The paper demonstrates the power of RMA for building high-performance distributed synchronization primitives, moving beyond traditional message-passing approaches.
- Reader-Writer Locks for DM: Extending the well-established Reader-Writer lock concept to distributed-memory environments is a valuable contribution, especially for read-heavy applications.
Key Results
- The proposed RMA-RW lock outperforms state-of-the-art MPI-3 RMA locking protocols by 81% and 73% in throughput and latency, respectively.
- The RMA-MCS lock (a component of RMA-RW) shows significant latency improvements over foMPI-Spin and D-MCS, with throughput advantages across various benchmarks.
- When integrated into a distributed hashtable (a representative workload), RMA-RW significantly accelerates its performance, outperforming foMPI variants by over 6x for P ≥ 64.
- The performance analysis highlights the importance of tuning parameters like TDC, TL,i, and TR for optimal results on specific hardware.
Limitations and Future Work
- Parameter Tuning: While the adjustable parameters offer flexibility, finding the optimal settings for a given machine and workload requires careful experimentation. The paper suggests that higher TL,i values might be beneficial for components with higher inter-component communication costs.
- Runtime Adaptability: The authors mention that RMA-RW could be extended with adaptive schemes for runtime selection and tuning of parameters, which would be beneficial for dynamic workloads.
- Fortran 2008 Support: Table 3 indicates that some RMA-RW protocols might need adjustments if the underlying atomic operations (like swap) are not available in a specific language/library.
- Model Checking Scope: While model checking with SPIN confirmed correctness for up to N=4 levels and 256 processes, larger-scale systems might require further verification.
Summary updated