Lock-Free RDMA B-Tree Key-Value Manager for Low CPU Utilization

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

Existing RDMA-based systems face challenges in scaling to handle large numbers of concurrent accesses due to CPU intervention in memory operations, leading to high latency and reduced throughput in distributed key-value stores.

Innovation Solution

A distributed and lock-free RDMA-based B-Tree key-value store manager that uses RDMA messaging to enable self-directed reads and writes across multiple servers, minimizing CPU utilization by employing RDMA reads, writes, and CAS operations without CPU intervention, and utilizing a reservation mechanism to prevent collisions.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Reliability

If CPU intervention is used in memory operations, then data integrity and control are improved, but latency increases and throughput decreases

Engineering Contradiction:
Improvedata integrityVSAvoidlatency
Core Design Contradiction:
ReliabilityVSLoss of time

Solution Approach 1:

The patent extracts CPU intervention from the memory operation path by implementing lock-free data structures that operate independently of CPU control. The reservation mechanism and version counters are maintained through atomic hardware operations rather than CPU-managed locks, removing the CPU as a bottleneck while preserving data integrity through the reservation bit and version validation.

Inventive Principle:
Principle #2Taking out (Extraction)

Solution Approach 2:

The patent introduces atomic hardware operations (compare-and-swap, test-and-set) as intermediaries between multiple processes and shared memory. These hardware-level atomic operations provide the necessary synchronization and consistency guarantees without requiring CPU intervention, acting as mediators that ensure data integrity while maintaining low latency.

Inventive Principle:
Principle #24Intermediary (Mediator)

2Reliability

If CPU intervention is used in memory operations, then control and coordination are improved, but throughput decreases

Engineering Contradiction:
ImprovecontrolVSAvoidthroughput
Core Design Contradiction:
ReliabilityVSProductivity

Solution Approach 1:

The patent implements self-service mechanisms where each process independently manages its own access to shared memory through version counters and reservation bits stored in the data structures themselves. Processes autonomously validate and update version information using atomic operations without requiring CPU-mediated control, enabling high throughput while maintaining coordination through the self-managed versioning system.

Inventive Principle:
Principle #25Self-service

3Reliability

If lock mechanisms are used for concurrent access, then data consistency is improved, but latency and CPU utilization increase

Engineering Contradiction:
Improvedata consistencyVSAvoidlatency
Core Design Contradiction:
ReliabilityVSLoss of time

Solution Approach 1:

The patent removes traditional lock mechanisms entirely and replaces them with lock-free data structures that use atomic hardware operations. The reservation bit and version counter provide consistency guarantees without the overhead of lock acquisition and release, eliminating the latency associated with CPU-mediated synchronization while maintaining data consistency through the reservation mechanism.

Inventive Principle:
Principle #2Taking out (Extraction)

4Reliability

If traditional RDMA with CPU notification is used, then memory operation control is improved, but CPU utilization increases

Engineering Contradiction:
ImprovecontrolVSAvoidCPU utilization
Core Design Contradiction:
ReliabilityVSUse of energy by moving object

Solution Approach 1:

The patent implements self-service RDMA operations where the RDMA engine autonomously performs memory operations using version counters and reservation bits embedded in the data structures. The system validates and coordinates access through atomic hardware operations without notifying or requiring CPU intervention, reducing CPU utilization while maintaining control through the self-managed versioning and reservation mechanism.

Inventive Principle:
Principle #25Self-service

Data Source

PatentUS10713210B2Distributed self-directed lock-free RDMA-based B-tree key-value manager
Publication Date: 2020.07.14 MICROSOFT TECHNOLOGY LICENSING LLC
  • US10713210B2 patent drawing
  • US10713210B2 patent drawing
  • US10713210B2 patent drawing

AI summary

A “Key-Value Manager” applies an RDMA-based memory allocator to implement a distributed and lock-free B-Tree based key-value store. In various implementations, the Key-Value Manager is implemented as a standalone library running concurrently on large numbers of networked computing devices. The RDMA-based memory allocator of the Key-Value Manager allocates and accesses the memory of the key-value store via various sequences of RDMA messages (e.g., RDMA reads, RDMA writes, and RDMA atomic compare and swap (CAS) operations). As such, CPUs of computing devices hosting the memory of the key-value store do not need to be notified of or involved in RDMA-based reads and writes to that memory. Consequently, CPU utilization for any computing device that hosts any portion of the key-value store is minimal, thereby enabling the Key-Value Manager to scale to very large numbers of concurrent accesses by very large numbers of computing devices.