Cooperative Tail Promotion in Log Buffer
Find Innovative SolutionsGenerate Solutions
Solution Overview
Problem
In active/active storage clusters, determining which data entry from a log buffer to process next is challenging due to the lack of a defined order, leading to inefficiencies in data transfer and processing.
Innovation Solution
A method where data entries are assigned to threads for flushing based on the tail entry of the log buffer, with a queue of committed data entries being updated to determine a new tail entry, allowing for efficient promotion of the next entry without locking the log buffer.
Engineering Contradictions & Design Principles
Engineering Contradiction Analysis
1Productivity
If data entries in the log buffer are processed without a defined order, then multiple threads can flush data concurrently, but it becomes difficult to identify which data to process next and causes CPU core monopolization
Solution Approach 1:
The patent segments the log buffer processing by introducing a separate queue of committed data entries that is distinct from the log buffer itself. This segmentation allows threads to process data from the queue while the tail entry in the log buffer is independently tracked, eliminating the need for threads to determine the next tail entry and reducing CPU core monopolization.
Solution Approach 2:
The patent introduces an intermediary data structure (the queue of committed data entries) that mediates between the log buffer and the storage system. This intermediary holds references to flushed data entries and enables threads to process data without directly managing the log buffer tail entry, simplifying the determination process and improving scalability.
2Reliability
If threads lock the log buffer to determine the next tail entry, then data integrity is maintained, but spin-lock contention increases and processing efficiency decreases
Solution Approach 1:
The patent separates the queue of committed data entries from the log buffer, allowing threads to update the queue without locking the log buffer. This segmentation maintains data integrity through the tail pointer mechanism while eliminating spin-lock contention, as threads no longer need to lock the log buffer to determine the next tail entry.
Solution Approach 2:
The patent creates a copy of the tail entry information in the queue of committed data entries. Instead of threads directly accessing and determining the tail entry from the log buffer (which requires locking), they process data from the copied references in the queue, maintaining integrity while improving efficiency.
3Speed
If the tail entry is frequently updated to reflect new data, then data freshness is improved, but CPU core monopolization increases due to continuous tail determination
Solution Approach 1:
The patent implements a self-service mechanism where the queue of committed data entries automatically tracks flushed data through the tail pointer. When threads flush data, they update the queue without requiring CPU cores to continuously determine the tail entry. The system self-updates the tail position based on the queue state, improving tail movement speed while reducing CPU utilization.
4Productivity
If multiple threads access the log buffer simultaneously, then parallel processing is enabled, but spin-lock contention increases
Solution Approach 1:
The patent segments the data structure into the log buffer and the separate queue of committed data entries. Threads access the queue for parallel processing without competing for locks on the log buffer. This segmentation enables true parallel processing by eliminating spin-lock contention, as the queue can be updated by multiple threads simultaneously without blocking each other.
Data Source
AI summary
A method, computer program product, and computing system for receiving data for storage in a storage system. The data may be written to a head entry of a log buffer, wherein the log buffer includes a plurality of data entries for flushing to the storage system. At least a portion of the plurality of data entries of the log buffer may be flushed, via a plurality of threads, to the storage system based upon, at least in part, a tail entry of the log buffer. A queue of committed data entries may be updated, via each thread of the plurality of threads, with one or more data entries of the log buffer flushed to the storage system by each thread. A new tail entry of the log buffer may be determined, via a thread of the plurality of threads, based upon, at least in part, the queue of committed data entries.


