Key-Value Storage Chunk Segmentation for Write Amplification

Resolve Bottlenecks,
Find Innovative Solutions
Generate 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

VSEngineering 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

Engineering Contradiction:
Improvewrite throughputVSAvoiddata fragmentation
Core Design Contradiction:
ProductivityVSStability of the object's composition

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.

Inventive Principle:
Principle #1Segmentation

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.

Inventive Principle:
Principle #10Preliminary action

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

Engineering Contradiction:
Improvesequential disk access speedVSAvoidin-memory operation speed
Core Design Contradiction:
SpeedVSProductivity

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.

Inventive Principle:
Principle #3Local quality

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

Engineering Contradiction:
Improvewrite performanceVSAvoidread operation complexity
Core Design Contradiction:
ProductivityVSDevice complexity

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.

Inventive Principle:
Principle #1Segmentation

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.

Inventive Principle:
Principle #12Equipotentiality

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

Engineering Contradiction:
Improvespatial localityVSAvoidcompaction performance
Core Design Contradiction:
Stability of the object's compositionVSProductivity

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.

Inventive Principle:
Principle #13The other way round (Inversion)

Data Source

PatentUS11567681B2Method and system for synchronizing requests related to key-value storage having different portions
Publication Date: 2023.01.31 VERIZON PATENT & LICENSING INC
  • US11567681B2 patent drawing
  • US11567681B2 patent drawing
  • US11567681B2 patent drawing

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.