Adaptive Socket Scheduling for Multi-socket HTM Performance

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

Current hardware transactional memory (HTM) systems, such as those using transactional lock elision (TLE), face performance degradation on multi-socket machines due to non-uniform memory access (NUMA) effects, where a single thread running on a different socket can significantly impair performance, and existing solutions either restrict concurrency or lead to socket starvation.

Innovation Solution

Implement adaptive socket scheduling modes for locks, where each lock is augmented with a mode indicating whether a thread can acquire it on specific sockets, and use profiling to determine optimal socket scheduling modes for different workloads, allowing threads to block until they can acquire locks on compatible sockets, thereby optimizing performance across multiple sockets.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Productivity

If threads are allowed to acquire locks on any socket in HTM systems, then concurrency is maximized, but performance degrades due to NUMA effects where threads on different sockets interfere with each other

Engineering Contradiction:
ImproveconcurrencyVSAvoidperformance
Core Design Contradiction:
ProductivityVSReliability

Solution Approach 1:

The patent applies local quality by making lock acquisition behavior socket-specific. Each lock maintains a socket scheduling mode that determines which sockets can acquire it, allowing threads on the same socket to access locks efficiently while preventing cross-socket interference that causes NUMA performance degradation. This localized control resolves the contradiction by enabling high concurrency within sockets while maintaining performance isolation between sockets.

Inventive Principle:
Principle #3Local quality

Solution Approach 2:

The patent implements dynamics by making socket scheduling modes changeable and adaptive. The system can dynamically switch between different socket scheduling modes (single-socket mode, multi-socket mode, etc.) based on workload characteristics and performance requirements. This dynamic adjustment allows the system to optimize for either maximum concurrency or performance stability depending on the operational context.

Inventive Principle:
Principle #15Dynamics

2Reliability

If locks restrict access to specific sockets to avoid NUMA effects, then performance is maintained, but socket starvation occurs where some sockets cannot acquire locks

Engineering Contradiction:
ImproveperformanceVSAvoidsocket utilization
Core Design Contradiction:
ReliabilityVSProductivity

Solution Approach 1:

The patent applies periodic action through time-sharing of socket scheduling modes. The system periodically switches between different socket scheduling modes, allowing each socket to acquire locks during its designated time window. This periodic alternation ensures that no socket is permanently starved while still maintaining performance by limiting concurrent access to appropriate sockets at any given time.

Inventive Principle:
Principle #19Periodic action

Solution Approach 2:

The patent implements universality by making locks capable of operating in multiple socket scheduling modes. A single lock can function in single-socket mode, multi-socket mode, or time-shared mode depending on the current configuration. This multi-functionality allows the same locking mechanism to adapt to different performance requirements and prevent socket starvation while maintaining performance when needed.

Inventive Principle:
Principle #6Universality (Multi-functionality)

3Device complexity

If HTM systems use best-effort transactional memory without guarantees, then implementation complexity is reduced, but application reliability cannot be ensured

Engineering Contradiction:
Improveimplementation complexityVSAvoidtransaction commit guarantee
Core Design Contradiction:
Device complexityVSReliability

Solution Approach 1:

The patent applies parameter changes by introducing socket scheduling mode as a new controllable parameter for locks. This parameter allows the system to adjust lock acquisition behavior based on performance requirements and workload characteristics. By changing this parameter, the system can optimize for either maximum concurrency or performance stability without increasing fundamental implementation complexity, while still providing better guarantees than pure best-effort HTM.

Inventive Principle:
Principle #35Parameter changes

Data Source

PatentUS10127088B2Adaptive techniques for improving performance of hardware transactions on multi-socket machines
Publication Date: 2018.11.13 ORACLE INT CORP
  • US10127088B2 patent drawing
  • US10127088B2 patent drawing
  • US10127088B2 patent drawing

AI summary

Socket scheduling modes may prevent non-uniform memory access effects from negatively affecting performance of synchronization mechanisms utilizing hardware transactional memory. Each mode may indicate whether a thread may execute a critical section on a particular socket. For example, under transitional lock elision, locks may include a mode indicating whether threads may acquire or elide the lock on a particular socket. Different modes may be used alternately to prevent threads from starving. A thread may only execute a critical section on a particular socket if allowed by the current mode. Otherwise, threads may block until allowed to execute the critical section, such as after the current mode changes. A profiling session may, for a running workload, iterate over all possible modes, measuring statistics pertaining to the execution of critical sections (e.g., the number of lock acquisitions and/or elisions), to determine the best performing modes for the particular workload.