Key-Value Storage Partition Garbage Collection
Find Innovative SolutionsGenerate Solutions
Solution Overview
Problem
The key-value storage system based on the log-structured merge tree (LSMT) experiences write amplification and low efficiency due to the increasing number of invalid key-value records, which necessitates frequent garbage collection processing.
Innovation Solution
The system selects a target storage partition with the highest invalid information rate, detects and screens valid key-value information, and transfers it to a different storage partition while erasing the invalid information, aligning the garbage collection granularity of LSMT information with that of the storage partition.
Engineering Contradictions & Design Principles
Engineering Contradiction Analysis
1Productivity
If garbage collection processing is performed on SST files to remove invalid key-value records, then the storage efficiency is improved, but the write operations increase resulting in write amplification
Solution Approach 1:
The storage unit is divided into multiple storage partitions, each responsible for specific key ranges. The garbage collection process operates on individual partitions rather than the entire SST file, allowing parallel processing and reducing the impact on write operations. This segmentation enables selective garbage collection that minimizes write amplification while maintaining storage efficiency.
Solution Approach 2:
The system performs preliminary actions by pre-computing and maintaining invalid information rates for each storage partition. This allows the garbage collection process to make informed decisions about which partitions need attention, enabling proactive management of invalid records before they accumulate to problematic levels, thus reducing unnecessary write operations.
2Reliability
If frequent garbage collection processing is performed to handle invalid key-value records, then the storage cleanliness is improved, but the data processing efficiency decreases
Solution Approach 1:
The garbage collection process is made dynamic by continuously monitoring invalid information rates across different storage partitions. The system adjusts its behavior based on real-time conditions, performing garbage collection only when necessary and adapting the collection strategy to current data patterns. This dynamic approach maintains storage cleanliness while avoiding unnecessary processing that would reduce data processing efficiency.
Solution Approach 2:
The system implements feedback mechanisms by tracking invalid information rates in each storage partition and using this information to guide garbage collection decisions. This feedback loop allows the system to respond to actual data conditions, performing garbage collection only when invalid records accumulate to problematic levels, thereby maintaining storage cleanliness without unnecessarily impacting data processing efficiency.
3Quantity of substance
If invalid key-value records are removed from storage partitions, then the storage space utilization is improved, but the operation complexity increases
Solution Approach 1:
By segmenting the storage unit into multiple partitions with dedicated key ranges, the garbage collection operation is simplified to working with smaller, more manageable data sets. This segmentation reduces the complexity of tracking and removing invalid records across the entire storage system, while still achieving effective storage space utilization through targeted cleanup operations.
Data Source
AI summary
The embodiments of the present disclosure provide an information processing method, an information processing apparatus, an electronic device, and a storage medium. The method is applied to a key-value storage system for key-value separation, a storage unit in the key-value storage system includes a key partition used for storing LSMT information and a plurality of storage partitions used for storing key-value information, and the method includes: selecting, according to the LSMT information in the key partition, a target storage partition with a highest invalid information rate from the storage partitions; detecting validity information corresponding to each key-value information in the target storage partition, and screening out valid key-value information according to the validity information corresponding to each key-value information; and transferring and storing the valid key-value information to a first storage partition except for the target storage partition, and erasing multiple key-value information stored in the target storage partition.


