NUMA-Aware Cohort Locks Reduce Coherence Traffic

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

Current locking mechanisms in multiprocessor environments, particularly in NUMA and CC-NUMA architectures, face issues with excessive coherence traffic and poor scalability due to frequent lock migration and contention, leading to performance degradation.

Innovation Solution

The implementation of NUMA-aware cohort locks, which use a composite lock structure with a top-level thread-oblivious global lock and node-level or cluster-specific locks to manage lock ownership and passing, reducing lock migration by allowing ownership to remain resident on a single NUMA node and promoting local thread execution.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Productivity

If traditional locking mechanisms are used in NUMA architectures, then lock acquisition is simple, but coherence traffic increases and scalability deteriorates

Engineering Contradiction:
Improvesystem throughputVSAvoidcoherence traffic
Core Design Contradiction:
ProductivityVSLoss of energy

Solution Approach 1:

The patent segments the single global lock into multiple cohort-specific locks, where each cohort (group of threads from the same NUMA node) has its own lock. This segmentation allows threads within a cohort to acquire locks independently without generating inter-node coherence traffic, while still providing mutual exclusion when threads from different cohorts access the same resource.

Inventive Principle:
Principle #1Segmentation

Solution Approach 2:

The patent implements local locks at each NUMA node that can be acquired without remote coherence operations. Threads preferentially acquire locks from their local cohort, ensuring that lock operations remain local to the NUMA node and avoid generating remote coherence traffic, thus improving performance and reducing energy consumption.

Inventive Principle:
Principle #3Local quality

2Adaptability or versatility

If lock ownership migrates frequently between NUMA nodes, then thread scheduling flexibility improves, but performance deteriorates due to excessive coherence traffic

Engineering Contradiction:
Improvethread scheduling flexibilityVSAvoidsystem performance
Core Design Contradiction:
Adaptability or versatilityVSProductivity

Solution Approach 1:

The patent introduces dynamic cohort assignment where threads are assigned to cohorts based on their NUMA node affiliation. The locking mechanism dynamically selects which lock to acquire based on the thread's cohort membership, allowing the system to adapt to different workload patterns while maintaining optimal performance by keeping lock operations local to the NUMA node.

Inventive Principle:
Principle #15Dynamics

3Device complexity

If a single global lock is used, then implementation simplicity is maintained, but scalability deteriorates under high load

Engineering Contradiction:
Improvelock implementation complexityVSAvoidscalability
Core Design Contradiction:
Device complexityVSProductivity

Solution Approach 1:

The patent segments the global lock into multiple cohort-specific locks, where each cohort (group of threads from the same NUMA node) has its own lock instance. This segmentation reduces contention under high load by allowing parallel lock acquisitions within cohorts, while the overall structure remains manageable through systematic cohort assignment and lock selection.

Inventive Principle:
Principle #1Segmentation

Data Source

PatentUS8694706B2System and method for NUMA-aware locking using lock cohorts
Publication Date: 2014.04.08 ORACLE INT CORP
  • US8694706B2 patent drawing
  • US8694706B2 patent drawing
  • US8694706B2 patent drawing

AI summary

The system and methods described herein may be used to implement NUMA-aware locks that employ lock cohorting. These lock cohorting techniques may reduce the rate of lock migration by relaxing the order in which the lock schedules the execution of critical code sections by various threads, allowing lock ownership to remain resident on a single NUMA node longer than under strict FIFO ordering, thus reducing coherence traffic and improving aggregate performance. A NUMA-aware cohort lock may include a global shared lock that is thread-oblivious, and multiple node-level locks that provide cohort detection. The lock may be constructed from non-NUMA-aware components (e.g., spin-locks or queue locks) that are modified to provide thread-obliviousness and/or cohort detection. Lock ownership may be passed from one thread that holds the lock to another thread executing on the same NUMA node without releasing the global shared lock.