Thread-Local Statistics Object Allocation

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

Current database management systems face performance issues with registering highly-volatile statistics in multi-threaded applications due to synchronization overhead, which is prohibitively expensive and not suitable for high-performance environments.

Innovation Solution

A system and method that manages highly-volatile statistics without synchronization by using an associative registry with object headers containing version counters, allowing for efficient allocation and deallocation of statistics objects across cores, enabling linear scalability and fast performance.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Reliability

If synchronization (mutex) is used to manage statistics objects in multi-threaded applications, then thread safety is improved, but performance deteriorates due to prohibitively expensive synchronization overhead

Engineering Contradiction:
Improvethread safetyVSAvoidperformance
Core Design Contradiction:
ReliabilityVSProductivity

Solution Approach 1:

The patent segments the statistics object management by introducing thread-local storage (TLS) slots that are uniquely associated with each thread. Instead of using a single global synchronized structure, each thread has its own statistics slot that can be accessed without synchronization. This segmentation eliminates the need for mutex operations while maintaining thread safety, as each thread operates on its own isolated statistics data.

Inventive Principle:
Principle #1Segmentation

2Ease of manufacture

If traditional data structures (linked list or tree) are used to store statistics objects, then ease of implementation is improved, but performance deteriorates due to synchronization requirements

Engineering Contradiction:
Improveease of implementationVSAvoidperformance
Core Design Contradiction:
Ease of manufactureVSProductivity

Solution Approach 1:

The patent extracts the synchronization mechanism from the statistics object management system entirely. By using thread-local storage, the shared resource (global statistics structure) is removed and replaced with per-thread local copies. This extraction eliminates the synchronization overhead while maintaining the ability to manage statistics objects efficiently in multi-threaded environments.

Inventive Principle:
Principle #2Taking out (Extraction)

3Speed

If lock-free allocation with global head is used, then allocation speed is improved, but performance deteriorates due to contention at allocation time

Engineering Contradiction:
Improveallocation speedVSAvoidperformance
Core Design Contradiction:
SpeedVSProductivity

Solution Approach 1:

The patent applies local quality by making the allocation head local to each thread rather than global. Each thread has its own TLS slot that serves as its local allocation head, eliminating contention between threads during allocation. This localizes the resource that was previously shared globally, allowing each thread to allocate and access its statistics objects without interfering with other threads.

Inventive Principle:
Principle #3Local quality

Data Source

PatentUS11853332B2High-performance statistics
Publication Date: 2023.12.26 SAP SE
  • US11853332B2 patent drawing
  • US11853332B2 patent drawing

AI summary

A system and method of managing highly-volatile statistics of a multi-threaded application environment. The statistics are represented by one or more statistics objects. Each statistics object of the one or more statistics objects is prefixed with an object header having a version counter with an initial version count of zero. Each statistics object is associated with a statistics class instance, each statistics class instance being associated with an associative registry that is configured to allocate smallest possible objects of a size equal to or greater than to that of the statistics objects, the registry segmenting the statistics objects according to a size class. Each allocated statistics object is constructed in the object frame after the object header. Then, the object header of each allocated statistics object is initialized. Once allocated, objects can be deallocated.