In-Memory Database Durability via Virtual Machine Record Replay

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

In-memory database management systems face performance bottlenecks due to slow disk access times required for durability, which slows down response times and introduces complexity with multi-threading and data management, while single-threaded systems lack sufficient durability guarantees and are limited by system memory size.

Innovation Solution

Implementing a virtual machine-based approach that uses deterministic record and replay techniques to persist transactions to disk, combined with overcommitting memory to solid-state drives and prefetching data to maintain performance and durability, allowing single-threaded operation without blocking.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Reliability

If synchronously logging transactions to disk is implemented to ensure durability, then data persistence is guaranteed, but response time significantly increases due to slow disk access

Engineering Contradiction:
ImprovedurabilityVSAvoidresponse time
Core Design Contradiction:
ReliabilityVSLoss of time

Solution Approach 1:

The patent segments the logging process by separating transaction processing into two phases: rapid in-memory processing with asynchronous logging, followed by a replay phase that ensures durability. This segmentation allows the system to achieve both fast response times and data durability by decoupling the timing of transaction acknowledgment from the timing of persistent storage.

Inventive Principle:
Principle #1Segmentation

Solution Approach 2:

The system performs preliminary actions by pre-processing transactions in memory and preparing log records before actual disk commitment is required. The replay mechanism pre-loads and validates transaction sequences, so that when durability confirmation is needed, the work is already substantially complete, minimizing the time penalty.

Inventive Principle:
Principle #10Preliminary action

2Productivity

If multi-threaded capabilities are added to service transactions in parallel, then throughput increases, but system complexity increases due to locking, latching, and buffer management mechanisms

Engineering Contradiction:
ImprovethroughputVSAvoidsystem complexity
Core Design Contradiction:
ProductivityVSDevice complexity

Solution Approach 1:

The patent uses copying by creating replayable logs of transaction sequences that can be independently processed and validated. Instead of complex multi-threaded concurrency control, the system copies transaction data to persistent storage in a simplified format that can be replayed to ensure durability, avoiding the need for intricate locking and latching mechanisms.

Inventive Principle:
Principle #26Copying

3Device complexity

If single-threaded operation is used to avoid parallelism overhead, then system complexity decreases, but durability guarantees are insufficient and all transactions are blocked

Engineering Contradiction:
Improvesystem complexityVSAvoiddurability guarantee
Core Design Contradiction:
Device complexityVSReliability

Solution Approach 1:

The patent introduces an intermediary replay log mechanism that mediates between single-threaded simplicity and durability requirements. The log serves as an intermediary storage layer that captures transaction sequences in a durable format without requiring complex concurrency control, allowing the single-threaded system to provide durability guarantees through replay validation.

Inventive Principle:
Principle #24Intermediary (Mediator)

4Quantity of substance

If system memory is overcommitted using virtual memory techniques, then available memory increases, but performance degrades due to slow disk swapping

Engineering Contradiction:
Improveavailable memoryVSAvoidaccess speed
Core Design Contradiction:
Quantity of substanceVSSpeed

Solution Approach 1:

The patent changes the parameter of persistent storage from traditional slow disk swapping to faster storage media such as solid-state drives or persistent memory. This parameter change allows the system to overcommit memory more aggressively while maintaining access speeds that do not significantly degrade performance, as the underlying storage speed has been substantially improved.

Inventive Principle:
Principle #35Parameter changes

Data Source

PatentUS8826273B1Synchronously logging to disk for main-memory database systems through record and replay
Publication Date: 2014.09.02 VMWARE INC
  • US8826273B1 patent drawing
  • US8826273B1 patent drawing
  • US8826273B1 patent drawing

AI summary

An in-memory database management system (DBMS) in a virtual machine (VM) preserves the durability property of the ACID model for database management without significantly slowing performance due to accesses to disk. Input data relating to a database transaction is recorded into a replay log and forwarded to the VM for processing by the DBMS. An indication of a start of processing by the DBMS of the database transaction is received after receipt of the input data by the VM and an indication of completion of processing of the database transaction by the DBMS is subsequently received, upon which outgoing output data received from the VM subsequent to the receipt of the completion indication is delayed. The delayed outgoing output data is ultimately released upon a confirmation that all input data received prior to the receipt of the start indication has been successfully stored into the replay log, thereby preserving durability for the database transaction.