Storage System Read Write Concurrency via Extent Locking
Find Innovative SolutionsGenerate Solutions
Solution Overview
Problem
Conventional storage systems face low concurrency levels and decreased response speed due to locking of target areas during read/write requests, leading to suspended requests and inefficient processing of non-aligned write requests.
Innovation Solution
The method involves determining conflicts between read/write requests, maintaining sub-areas unlocked where possible, splitting write requests into sub-requests, and merging non-conflicting sub-requests for concurrent execution, thereby improving concurrency and response speed.
Engineering Contradictions & Design Principles
Engineering Contradiction Analysis
1Reliability
If the target area is locked during read/write requests to avoid conflicts, then data consistency is ensured, but the concurrency level of read/write requests decreases and response speed slows down
Solution Approach 1:
The patent segments the storage space into multiple independent units (storage groups, extents, data blocks) and implements fine-grained locking at the extent level rather than locking entire target areas. This allows concurrent access to non-overlapping segments, improving concurrency while maintaining data consistency through selective locking of only the necessary portions.
Solution Approach 2:
The patent applies different locking strategies to different regions of the storage space based on their access patterns and conflict potential. By maintaining locks only on specific extents that are actually being accessed and releasing locks on non-conflicting sub-areas, the system achieves local optimization of resource utilization while ensuring global data consistency.
2Reliability
If the total target area is locked when partial lock occurs to avoid conflicts, then data consistency is maintained, but storage space that is not actually accessed becomes unavailable, decreasing overall response speed
Solution Approach 1:
The patent divides the target area into smaller extents and locks only the specific extents that are involved in the current read/write operation. This segmentation prevents the unnecessary locking of entire target areas, allowing other requests to access non-conflicting portions of the storage space simultaneously, thereby reducing wait time and improving response speed.
Solution Approach 2:
The patent implements partial locking by acquiring locks only on the minimum necessary extents required for the current operation rather than locking the entire target area. This partial action approach minimizes the impact on concurrent requests while still ensuring data consistency for the accessed portions.
3Device complexity
If write requests are processed individually without merging, then request processing is simple, but the concurrency level and storage system efficiency are reduced
Solution Approach 1:
The patent merges multiple pending write requests that target the same or overlapping extents into a single consolidated write operation. This merging reduces the total number of I/O operations, improves storage system efficiency by better utilizing write buffers and reducing write amplification, while maintaining data integrity through proper request coordination and conflict detection.
Data Source
AI summary
Embodiments of the present disclosure relate to method and device for data read/write. The method comprises: in response to receiving a first read/write request for a first target area, determining whether there is a second read/write request under execution in conflict with the first read/write request, a second target area for the second read/write request at least partially overlapping with the first target area, and at least one of the first read/write request and the second read/write request being a write request; and in response to determining there being the second read/write request in conflict, suspending the first read/write request while maintaining a sub-area of the first target area in an unlocked state, the sub-area not overlapping with the second target area.


