Hardware Compaction Accelerator Offloads Database CPU

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

Compaction processes in log-structured merge-tree data structures negatively impact read latencies in databases like Cassandra, as they burden the CPU and disrupt read operations, necessitating either shared CPU resources or prioritizing compaction over reads, both of which are suboptimal.

Innovation Solution

A compaction accelerator system that offloads the compaction process to a separate hardware-based compactor, utilizing parallel sort and marker engines to identify and delete older entries, create a compacted table, and generate a freemap, thereby reducing CPU burden and improving read latencies.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Productivity

If compaction process is performed using shared CPU resources, then compaction can be completed, but read latencies increase due to CPU burden

Engineering Contradiction:
Improvecompaction completionVSAvoidread latencies
Core Design Contradiction:
ProductivityVSLoss of time

Solution Approach 1:

The system segments the compaction function from the main database processor by introducing a separate compactor component. This compactor operates independently to identify, mark, and delete obsolete entries, allowing the main processor to focus on read operations without being burdened by compaction tasks, thereby resolving the conflict between compaction completion and read latency

Inventive Principle:
Principle #1Segmentation

Solution Approach 2:

The patent introduces an intermediary mechanism (the separate compactor with marker files) that mediates between the write operations and the persistent storage. The compactor acts as a mediator that handles the cleanup of obsolete data entries through marker files, allowing the main database system to maintain fast read performance while compaction occurs in the background without blocking read operations

Inventive Principle:
Principle #24Intermediary (Mediator)

2Productivity

If compaction is prioritized over read operations, then compaction speed increases, but read performance deteriorates

Engineering Contradiction:
Improvecompaction speedVSAvoidread performance
Core Design Contradiction:
ProductivityVSSpeed

Solution Approach 1:

The compaction process is designed as a self-service background operation that autonomously identifies obsolete entries through timestamp comparison and marker file creation without requiring prioritization over read operations. The separate compactor continuously performs compaction tasks using available resources without blocking or degrading read performance, as it operates independently from the main read/write processor

Inventive Principle:
Principle #25Self-service

3Productivity

If multiple sort engines operate in parallel, then compaction efficiency improves, but system complexity increases

Engineering Contradiction:
Improvecompaction efficiencyVSAvoidsystem complexity
Core Design Contradiction:
ProductivityVSDevice complexity

Solution Approach 1:

The compaction function is segmented into multiple parallel sort engines that independently process different portions of the data. Each sort engine handles a specific segment of entries, comparing timestamps and identifying obsolete data in parallel. This segmentation increases compaction efficiency while the modular design keeps individual engine complexity manageable

Inventive Principle:
Principle #1Segmentation

Solution Approach 2:

Multiple parallel sort engines are merged into a unified compaction system that coordinates their outputs through a common marker file management mechanism. The separate compactors from different sort engines converge their results by writing marker files to the same persistent storage, allowing parallel processing to achieve improved efficiency while maintaining system coherence through the shared marker file interface

Inventive Principle:
Principle #5Merging (Combining)

Data Source

PatentUS11126600B2System and method to accelerate compaction
Publication Date: 2021.09.21 MARVELL ASIA PTE LTD
  • US11126600B2 patent drawing
  • US11126600B2 patent drawing
  • US11126600B2 patent drawing

AI summary

A system and method for accelerating compaction includes a compaction accelerator. The accelerator includes a compactor separate from a processor performing read and write operations for a database or a data store. The compactor is configured to receive a table to be compacted and entries written in the table, each of the entries being associated with a timestamp indicating when they were respectively written; identify, using a plurality of sort engines operating in parallel, the entries that were written last based on the timestamps; mark, using a plurality of marker engines operating in parallel, older copies of the entries for deletion; create, using the plurality of marker engines, tombstones for the older copies; create a compacted table, including the entries that were last written; delete the tombstones and the entries associated with the tombstones; and generate a freemap based on storage locations of the entries associated with the tombstones.