Abstract
Traditional distributed lock managers are frequently throttled by server-side CPU overhead associated with network interrupt handling. This paper investigates the use of Remote Direct Memory Access (RDMA) to bypass the server CPU, allowing clients to manage locks directly via one-sided atomic operations. Experimental results demonstrate that this client-centric architecture can improve performance by nearly an order of magnitude compared to traditional TCP/IP-based centralized lock managers.
Introduction
In distributed systems such as databases and file systems, lock managers are essential for ensuring data consistency across multiple machines. Traditionally, a centralized lock manager handles all requests. However, as the number of clients scales, the central server becomes a primary bottleneck. Interestingly, the limitation is rarely the logic of lock granting itself; rather, it is the overhead of the network stack. In a typical TCP/IP setup, the server's CPU spends over 90% of its cycles handling message processing, context switching, and interrupts. Even with high-speed networks like InfiniBand, a server-centric model still requires the CPU to process every incoming request.
Architectural Designs
The researchers evaluated three distinct architectural designs to address high-concurrency locking:
- Traditional TCP/IP (Server-Centric): The baseline model where clients send requests via standard sockets and the server manages lock logic in software.
- RDMA Send/Receive (Two-Sided): This model offloads network processing to hardware, but still requires the server CPU to "receive" messages and execute locking logic.
- Pure Client-Centric (One-Sided): In this novel approach, the server is passive. It simply allocates a lock table in its memory and stays out of the way. Clients use one-sided RDMA verbs—specifically
Compare-and-Swap(CAS) andFetch-and-Add(FA)—to modify the lock table directly.
To manage shared and exclusive locks, the paper utilizes 64-bit memory regions where the first 32 bits represent the Exclusive Lock holder (via CAS) and the remaining 32 bits track the count of Shared Lock holders (via FA). To handle contention, a "Backoff" strategy was implemented where clients wait before retrying a failed RDMA operation.
Experimental Evaluation
The performance of these architectures was tested on a cluster of seven machines, each equipped with 40-core processors. The workload involved each client issuing 100,000 lock/release requests while varying the number of clients and the contention rate.
Key Results
- Throughput Explosion: The traditional TCP/IP design reached a maximum of approximately 40,880 locks per second. Moving to RDMA Send/Receive provided a massive jump to 1.4 million locks per second, confirming that the software network stack is the primary enemy of scalability.
- Client-Centric Superiority: The pure RDMA approach (labeled as "Backoff" in results) outperformed the Send/Receive model by a significant margin. It scaled linearly with the number of clients, reaching several million locks per second.
- Contention Sensitivity: While the client-centric design maintains a lead, its performance decreases as the contention rate increases and more clients fight for the same lock. Interestingly, the authors found that a "zero-second" backoff (immediate retry) often yielded the best results in their environment.
Limitations and Future Work
Despite the performance gains, the client-centric design faces challenges. RDMA requires maintaining "Queue Pairs" (connections), and as client counts grow into the thousands, the memory overhead on the Network Interface Card (NIC) can become a bottleneck. Additionally, moving logic to the client increases system complexity and makes debugging more difficult. The authors conclude that while this extreme client-centric model is a major improvement, future research should explore hybrid designs that balance one-sided RDMA efficiency with the coordination benefits of an active server.
Summary updated