In-Memory Hashes for Key-Value Store Search Acceleration

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

Traditional relational databases face limitations such as inability to scale out, inefficient memory usage, and difficulty in representing complex relationships, while key-value stores offer flexibility but suffer from fragmentation leading to read and write amplification during key operations.

Innovation Solution

Implementing defragmentation processes during re-compaction of log structured merge trees to store keys with the same prefixes together, using in-memory hashes to reduce search time, and prefetching keys for garbage collection to improve efficiency.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Adaptability or versatility

If key-value stores are used to provide flexibility and fast operations, then adaptability and speed are improved, but fragmentation occurs leading to increased read and write amplification

Engineering Contradiction:
ImproveflexibilityVSAvoidread and write amplification
Core Design Contradiction:
Adaptability or versatilityVSProductivity

Solution Approach 1:

The system performs defragmentation operations during re-compaction cycles, proactively organizing keys with the same prefixes into contiguous blocks before they cause read/write amplification issues. This preliminary action of consolidating similar keys reduces future fragmentation-related performance degradation.

Inventive Principle:
Principle #10Preliminary action

Solution Approach 2:

The key-value store segments keys into different blocks based on their prefixes, storing keys with the same prefix together in contiguous blocks. This segmentation strategy reduces fragmentation by grouping related keys, thereby reducing read and write amplification during operations.

Inventive Principle:
Principle #1Segmentation

2Reliability

If traditional relational databases are used to maintain data integrity, then reliability is improved, but scaling capability deteriorates

Engineering Contradiction:
Improvedata integrityVSAvoidscaling capability
Core Design Contradiction:
ReliabilityVSAdaptability or versatility

Solution Approach 1:

The system divides the key-value store into multiple shards distributed across different servers, each handling a subset of keys. This segmentation enables horizontal scaling while maintaining data integrity through consistent hashing and replication mechanisms, allowing the system to scale out to store large quantities of data across different servers.

Inventive Principle:
Principle #1Segmentation

3Stability of the object's composition

If relational databases allocate memory for all data entries, then data structure completeness is improved, but memory usage increases

Engineering Contradiction:
Improvedata structure completenessVSAvoidmemory usage
Core Design Contradiction:
Stability of the object's compositionVSQuantity of substance

Solution Approach 1:

The key-value store allocates memory dynamically based on actual data requirements rather than pre-allocating for all possible entries. Memory is allocated only when keys are inserted, and the structure adapts its size locally to the actual data stored, reducing overall memory usage while maintaining structural completeness for the existing data.

Inventive Principle:
Principle #3Local quality

Data Source

PatentUS20250225080A1In-memory HASH entries and hashes used to improve key search operations for keys of a key value store
Publication Date: 2025.07.10 NETAPP INC
  • US20250225080A1 patent drawing
  • US20250225080A1 patent drawing
  • US20250225080A1 patent drawing

AI summary

Techniques are provided for implementing a hash building process and an append hash building process. The hash building process builds in-memory hash entries for bins of keys stored within sorted logs of a log structured merge tree used to store keys of a key-value store. The in-memory hash entries can be used to identify the starting locations of bins of keys within the log structured merge tree so that a key within a bin can be searched for from the starting location of the bin as opposed to having to search the entire log structured merge tree. The append hash building process builds two hashes that can be used to more efficiently locate keys and/or ranges of keys within an unsorted append log that would otherwise require a time consuming binary search of the entire append log.