LSM Tree SST File Compression via SSD Intermediary

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

Log structured merge (LSM) trees face inefficiencies in data compression and merging due to the gap between sequential and random read/write performance of storage devices, which affects the overall compression efficiency.

Innovation Solution

The method involves selecting SST files for compression and merging, sequentially reading and writing them from a slow storage device to a fast storage device, and then randomly reading them into memory based on key sequence numbers, utilizing the higher random read/write performance of the fast storage device, while updating a mapping table for quick data location.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Speed

If SST files are randomly read from a slow storage device (e.g., magnetic disk) during compression, then data can be accessed in any order, but the read speed is slow due to the sequential nature of magnetic disk access

Engineering Contradiction:
Improveread speedVSAvoidrandom access capability
Core Design Contradiction:
SpeedVSEase of operation

Solution Approach 1:

The patent introduces a fast storage device (SSD) as an intermediary between the slow magnetic disk and the memory. SST files are first sequentially read from the magnetic disk to the SSD, then randomly read from the SSD to memory during compression. The SSD acts as a buffer that converts slow random access into fast sequential access, resolving the contradiction between read speed and random access capability.

Inventive Principle:
Principle #24Intermediary (Mediator)

Solution Approach 2:

The patent performs preliminary action by sequentially reading SST files from the magnetic disk to the SSD before the actual compression process. This pre-positioning of data in the fast storage device enables subsequent random reads during compression to be performed at high speed, eliminating the need for slow random access directly from the magnetic disk.

Inventive Principle:
Principle #10Preliminary action

2Speed

If SST files are sequentially read from slow storage device during compression, then read speed is improved, but random access capability is lost

Engineering Contradiction:
Improvesequential read speedVSAvoidaccess pattern flexibility
Core Design Contradiction:
SpeedVSAdaptability or versatility

Solution Approach 1:

The patent segments the data access process into two distinct phases: a preliminary phase where SST files are sequentially read from magnetic disk to SSD, and a compression phase where data is randomly read from SSD to memory. This segmentation allows each phase to utilize the most appropriate access pattern for its specific requirements, maintaining both sequential read speed and random access flexibility.

Inventive Principle:
Principle #1Segmentation

3Productivity

If compression is performed directly on SST files from magnetic disk, then storage space is utilized efficiently, but compression efficiency is low due to slow random read performance

Engineering Contradiction:
Improvecompression efficiencyVSAvoidrandom read speed
Core Design Contradiction:
ProductivityVSSpeed

Solution Approach 1:

The SSD serves as an intermediary storage device that enables efficient compression operations. By pre-loading SST files into the SSD from the magnetic disk, the system can perform random reads during compression at high speed from the SSD, dramatically improving compression efficiency while maintaining efficient use of the magnetic disk's large storage capacity.

Inventive Principle:
Principle #24Intermediary (Mediator)

Solution Approach 2:

The patent performs preliminary action by copying SST files from the magnetic disk to the SSD before compression begins. This pre-positioning of data in fast storage enables the compression process to access data randomly at high speed, resolving the contradiction between compression efficiency and random read speed.

Inventive Principle:
Principle #10Preliminary action

4Speed

If fast storage device (SSD) is used for all operations, then read/write speed is improved, but storage cost increases

Engineering Contradiction:
Improveread/write speedVSAvoidstorage capacity
Core Design Contradiction:
SpeedVSQuantity of substance

Solution Approach 1:

The patent applies local quality by using different storage devices for different purposes: the magnetic disk is used for storing large volumes of SST files where capacity is more important than speed, while the SSD is used for the smaller subset of data being actively compressed where speed is critical. This localized optimization resolves the contradiction between speed and storage capacity by matching each storage device's strengths to its specific use case.

Inventive Principle:
Principle #3Local quality

Data Source

PatentUS12056381B2Data processing method and data processing device
Publication Date: 2024.08.06 SAMSUNG ELECTRONICS CO LTD
  • US12056381B2 patent drawing
  • US12056381B2 patent drawing
  • US12056381B2 patent drawing

AI summary

A data processing method for a log structured merge (LSM) tree includes selecting SST files to be compressed and merged in a current layer and a next layer, sequentially reading the SST files to be compressed and merged in the current layer and the next layer from a first storage device and sequentially writing the SST files in a second storage device, randomly reading the SST files to be compressed and merged from the second storage device into a memory according to key sequence numbers of data blocks included in the SST files to be compressed and merged, and performing compression and merge processing on the SST files to be compressed and merged. Sequential and random read and write speed of the second storage device is higher than that of the first storage device.