Key-Value Storage Chunk Segmentation for Write Amplification
Find Innovative SolutionsGenerate Solutions
Solution Overview
Problem
Current key-value storage systems, particularly those using log-structured merge trees, face inefficiencies due to temporal data partitioning, leading to fragmentation, high write amplification, and increased read and write operations, which are costly in terms of performance and disk wear, especially in workloads with high spatial locality.
Innovation Solution
A data storage system that organizes data into chunks representing contiguous key ranges, caching popular chunks in RAM for both read and write paths, and using multi-versioning and in-funk write ahead logs to reduce compaction frequency and write amplification, while providing strong consistency guarantees and fast recovery.
Engineering Contradictions & Design Principles
Engineering Contradiction Analysis
1Productivity
If log-structured merge trees are used to optimize write performance by absorbing random writes in memory and flushing them as sequential files to disk, then write throughput is improved, but data fragmentation increases and write amplification becomes high
Solution Approach 1:
The patent segments data into immutable chunks with contiguous key ranges, organizing them in a hierarchical structure (levels) rather than treating all data as a single stream. This segmentation allows popular key ranges to be isolated in specific chunks that can be cached, reducing fragmentation while maintaining write throughput by allowing concurrent writes to different chunks.
Solution Approach 2:
The patent performs preliminary organization of data into chunks with contiguous key ranges before writing to disk. By pre-grouping related keys into the same chunk and marking popular chunks for caching, the system avoids later fragmentation issues and reduces the need for costly compaction operations, thereby reducing write amplification.
2Speed
If log-structured merge trees use temporal file organization to optimize disk I/O, then sequential access performance is improved, but in-memory operation performance deteriorates due to periodic flushing of all keys to disk
Solution Approach 1:
The patent applies local quality by differentiating the treatment of different data chunks based on their access patterns. Popular chunks are marked and cached in memory with persistent data structures, while less popular chunks are stored on disk. This allows the system to optimize for both sequential disk access (for cold data) and fast in-memory operations (for hot data) simultaneously, rather than applying a uniform temporal organization to all data.
3Productivity
If LSM stores group writes into files temporally rather than by key-range, then write performance is improved initially, but range scan operations become inefficient and read amplification increases
Solution Approach 1:
The patent segments data into chunks organized by contiguous key ranges rather than temporal groups. Each chunk contains keys within a specific range, enabling efficient range scans by simply identifying the relevant chunks rather than searching through multiple temporal files. This segmentation maintains write performance through concurrent chunk creation while dramatically simplifying range scan operations.
Solution Approach 2:
The patent creates equipotential access paths for both point queries and range scans by organizing data in chunks with contiguous key ranges. Popular chunks are cached in memory with persistent data structures, providing fast access for both types of operations. This eliminates the need for complex merge operations during range scans, reducing read amplification while maintaining write performance.
4Stability of the object's composition
If background compaction processes merge-sort files to group data by keys, then spatial locality is improved, but performance deteriorates due to high disk bandwidth consumption and write amplification
Solution Approach 1:
The patent inverts the traditional LSM approach by organizing data into chunks with contiguous key ranges from the beginning, rather than grouping writes temporally and then compacting later. This inversion eliminates the need for costly background compaction processes, as spatial locality is achieved during the initial write phase through chunk organization and popular chunk caching, not through subsequent merge-sort operations.
Data Source
AI summary
The present teaching relates to a method, system and programming for operating a data storage. The data storage comprises of different portions including: a first portion having a plurality of metadata objects stored therein, each of the metadata objects being associated with a filter and corresponding to a range of keys, wherein at least one of the metadata objects is associated with a data structure, and a second portion having a plurality of files stored therein, each of the plurality of files being associated with one of the plurality of metadata objects; The data storage synchronizes a scan request with respect to one or more write requests based on a parameter associated with the scan request and each of the one or more write requests.


