Barrier Object for Presorted Log Snapshot Synchronization
Find Innovative SolutionsGenerate Solutions
Solution Overview
Problem
In storage systems with presorted log-based architectures, the contention on the Extent spinlock is high due to synchronization requirements with Snapshot Create flows, leading to performance degradation, as each logging operation must take the spinlock even when no snapshots are used, causing unnecessary lock contention.
Innovation Solution
The introduction of a barrier object with asymmetric API semantics, where entering the barrier is cheap and exiting is resource-intensive, and setting the barrier involves acquiring spinlocks one by one, reduces contention by ensuring only one thread can enter or exit the critical section per core, and allows for efficient IO and Flush flows while accommodating snapshot creation with minimal impact on performance.
Engineering Contradictions & Design Principles
Engineering Contradiction Analysis
1Reliability
If a spinlock is used for synchronization in presorted log-based storage systems, then snapshot creation can be synchronized, but lock contention increases and performance degrades
Solution Approach 1:
The patent segments the single spinlock into multiple per-core spinlocks (one spinlock per CPU core). This segmentation allows multiple threads on different cores to acquire their respective spinlocks simultaneously, enabling parallel execution of logging operations across cores. The barrier object contains an array of spinlocks indexed by core ID, where each spinlock protects against interference from other threads on the same core while allowing cross-core parallelism.
Solution Approach 2:
The patent introduces dynamic barrier objects that can be created and destroyed based on snapshot operations. When a snapshot is created, a barrier object is dynamically instantiated with per-core spinlocks. The barrier remains active only during the snapshot operation duration, allowing the system to dynamically adjust synchronization granularity based on operational needs rather than using static coarse-grained locking.
2Productivity
If a barrier object with per-core spinlocks is introduced, then lock contention is reduced, but device complexity increases
Solution Approach 1:
The barrier object serves multiple functions: it acts as a synchronization mechanism for snapshot operations, provides per-core spinlock management, and enables parallel logging across cores. The same barrier structure is reused for both creating snapshots and managing concurrent log writes, eliminating the need for separate synchronization primitives for different operations.
Solution Approach 2:
The barrier object acts as an intermediary layer between the logging system and snapshot creation mechanism. Instead of having logging threads directly contend for a single spinlock or having complex inter-thread signaling, the barrier object mediates access by providing per-core spinlocks that naturally route synchronization to the appropriate core level, simplifying the interaction between concurrent operations.
Data Source
AI summary
A method, computer program product, and computer system for permitting, by a computing device, entering of a barrier object of a plurality of barrier objects with a first set of one or more Application Programming Interfaces (APIs) only when the barrier object is not set. The first set of the one or more APIs on the barrier object may wait until the barrier object is reset. A second set of the one or more APIs may set the barrier object. Waiting may occur until there are no longer any flows in the barrier object.


