Probabilistic Shared Counters for NUMA Scalability

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

In multicore architectures with Non-Uniform Memory Access (NUMA) systems, shared statistics counters face scalability bottlenecks and inaccuracy due to contention between threads, leading to increased latency and loss of updates, especially in systems with distributed cache-coherent NUMA (CC-NUMA) properties.

Innovation Solution

Implementing scalable statistics counters by splitting counters into components, using probabilistic counters, and employing adaptive techniques such as node prioritization and randomized back-off to reduce contention and improve performance, allowing consecutive updates on a single node and adjusting update frequencies based on contention levels.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Productivity

If standard shared counters are used in NUMA systems, then counter functionality is provided, but scalability is limited and latency increases due to cross-node cache misses

Engineering Contradiction:
Improvecounter throughputVSAvoidaccess latency
Core Design Contradiction:
ProductivityVSLoss of time

Solution Approach 1:

The patent segments the shared counter into multiple per-node counters, where each NUMA node maintains its own local counter instance. This eliminates the need for cross-node cache coherence traffic when incrementing counters, as each node operates on its local memory. The segmentation directly resolves the scalability and latency issues by localizing counter operations to avoid remote memory access penalties inherent in NUMA architectures.

Inventive Principle:
Principle #1Segmentation

2Ease of operation

If naive concurrent counter implementations are used, then counter updates are performed, but invalidation traffic increases on every modification

Engineering Contradiction:
Improvecounter update simplicityVSAvoidinvalidation traffic
Core Design Contradiction:
Ease of operationVSLoss of energy

Solution Approach 1:

By dividing the single shared counter into multiple per-node counter segments, the patent eliminates the need for invalidation traffic across NUMA nodes. Each node independently updates its local counter segment without triggering coherence protocols with other nodes, thereby reducing energy consumption and bandwidth usage associated with memory invalidation traffic while maintaining ease of operation through simple local increments.

Inventive Principle:
Principle #1Segmentation

3Reliability

If shared counters are accessed within transactions, then transactional semantics are maintained, but transaction success rates decrease due to conflicts

Engineering Contradiction:
Improvetransactional correctnessVSAvoidtransaction success rate
Core Design Contradiction:
ReliabilityVSProductivity

Solution Approach 1:

The patent segments the counter resource so that each transaction operates on local per-node counter instances rather than competing for a single shared counter. This segmentation reduces transaction conflicts and aborts, thereby improving transaction success rates while maintaining transactional correctness through local atomic operations on each node's counter segments.

Inventive Principle:
Principle #1Segmentation

Solution Approach 2:

The patent implements local quality by allowing each NUMA node to have its own counter instance with local update semantics. Transactions executing on a particular node interact only with that node's local counter, ensuring atomicity and correctness without interfering with transactions on other nodes. This localizes the quality of transactional operations and eliminates remote conflicts.

Inventive Principle:
Principle #3Local quality

4Productivity

If probabilistic counters with stored probability values are used, then update frequency is reduced to improve scalability, but counter accuracy may be affected

Engineering Contradiction:
Improvecounter scalabilityVSAvoidcounter accuracy
Core Design Contradiction:
ProductivityVSMeasurement precision

Solution Approach 1:

The patent employs probabilistic counters that dynamically adjust the probability parameter of updates based on the current counter value. As the counter value increases, the update probability decreases, allowing the system to scale to very large count values while maintaining acceptable accuracy. This parameter change strategy enables the counter to adapt its update frequency, improving scalability without permanently sacrificing measurement precision.

Inventive Principle:
Principle #35Parameter changes

Data Source

PatentEP2936312B1System and method for implementing shared probabilistic counters storing update probability values
Publication Date: 2019.01.30 ORACLE INT CORP
  • EP2936312B1 patent drawingFigure 1
  • EP2936312B1 patent drawingFigure 2
  • EP2936312B1 patent drawingFigure 3A~3C

AI summary

The systems and methods described herein may implement probabilistic counters and/or update mechanisms for those counters such that they are dependent on the value of a configurable accuracy parameter. The accuracy parameter value may be adjusted to provide fine-grained control over the tradeoff between the accuracy of the counters and the performance of applications that access them. The counters may be implemented as data structures that include a mantissa portion and an exponent portion that collectively represent an update probability value. When updating the counters, the value of the configurable accuracy parameter may affect whether, when, how often, or by what amount the mantissa portion and/or the exponent portion are updated. Updating a probabilistic counter may include multiplying its value by a constant that is dependent on the value of a configurable accuracy parameter. The counters may be accessible within transactions. The counters may have deterministic update policies.