Per-Core MRU Batching for Lock Contention

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

In multi-core and clustered computing environments, the contention for locks during data management operations leads to inefficiencies, particularly when demoting tracks from the Least Recently Used (LRU) list, resulting in slowed data processing and potential queueing of I/O operations due to the single-threaded demotion process.

Innovation Solution

Batching data operations requiring locks on a per-core basis and using a Most Recently Used (MRU) listing with a deferred MRU flush and track change characteristic algorithm to perform demotion scans, reducing lock contention and enabling concurrent demotion operations.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Reliability

If a single-threaded demotion process is used to maintain the LRU list, then data consistency is ensured, but lock contention increases and processing speed decreases

Engineering Contradiction:
Improvedata consistencyVSAvoidprocessing speed
Core Design Contradiction:
ReliabilityVSProductivity

Solution Approach 1:

The patent divides the LRU list management into per-core LRU lists, where each computing element has its own dedicated list. This segmentation eliminates the need for a single shared lock, allowing each core to independently manage its own list without contention, thereby improving processing speed while maintaining data consistency within each segment.

Inventive Principle:
Principle #1Segmentation

Solution Approach 2:

The patent transitions from a single-dimensional shared LRU list to a multi-dimensional structure where each computing element has its own LRU list. This dimensional change from one shared resource to multiple independent resources resolves the lock contention problem by providing parallel access paths.

Inventive Principle:
Principle #17Another dimension (Dimensionality change)

2Productivity

If multiple computing elements access a shared LRU list concurrently, then processing throughput increases, but lock contention increases causing I/O queueing

Engineering Contradiction:
Improveprocessing throughputVSAvoidlock acquisition time
Core Design Contradiction:
ProductivityVSLoss of time

Solution Approach 1:

By segmenting the shared LRU list into per-core LRU lists, the patent eliminates the bottleneck of a single shared lock. Each computing element can access its own list concurrently without waiting for others, maintaining high throughput while eliminating lock acquisition delays.

Inventive Principle:
Principle #1Segmentation

Solution Approach 2:

Each computing element independently manages its own LRU list without needing to acquire locks from other elements. This self-service approach allows each core to autonomously perform demotion operations on its own list, eliminating inter-element waiting time and lock contention.

Inventive Principle:
Principle #25Self-service

3Reliability

If frequent lock operations are performed on the LRU list, then data integrity is maintained, but system performance deteriorates due to overhead

Engineering Contradiction:
Improvedata integrityVSAvoidlock operation overhead
Core Design Contradiction:
ReliabilityVSDevice complexity

Solution Approach 1:

The patent extracts the lock operation requirement from the LRU list management by giving each computing element its own dedicated list. This removes the need for lock operations entirely, as each element operates independently on its own list, eliminating the overhead while maintaining data integrity through isolation.

Inventive Principle:
Principle #2Taking out (Extraction)

Solution Approach 2:

Each computing element independently manages its own LRU list without external coordination or locking mechanisms. This self-service model eliminates the complexity of lock management while ensuring data integrity through independent operation, reducing system overhead significantly.

Inventive Principle:
Principle #25Self-service

Data Source

PatentUS9652406B2MRU batching to reduce lock contention
Publication Date: 2017.05.16 MAPLEBEAR INC
  • US9652406B2 patent drawing
  • US9652406B2 patent drawing
  • US9652406B2 patent drawing

AI summary

Data operations, requiring a lock, are batched into a set of operations to be performed on a per-core basis under a single lock. A Most Recently Used (MRU) listing is used to conduct a demotion scan using an MRU flush, a processor identification (ID), and a track change characteristic algorithm.