Flash Cache Transaction Entries for Crash Consistency

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

Server systems using write-behind caching in flash storage face inconsistencies due to the non-persistent nature of cache metadata, leading to potential data loss and errors during system crashes or power cycles, as the metadata is not retained across shutdowns, causing issues with data propagation to backend storage.

Innovation Solution

Implementing a journaling component and transaction replay mechanism to log transaction entries for write requests in flash storage, allowing for replay and flushing of cached data to backend storage after a system crash, ensuring consistency and propagation of acknowledged write requests.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Productivity

If write-behind caching is implemented in flash storage, then VM write performance is significantly improved, but system consistency and reliability deteriorate due to non-persistent cache metadata

Engineering Contradiction:
ImproveVM write performanceVSAvoidsystem consistency
Core Design Contradiction:
ProductivityVSReliability

Solution Approach 1:

The patent applies preliminary action by logging transaction entries to persistent flash storage before acknowledging write requests to VMs. This ensures that even if the system crashes before flushing cache metadata to backend storage, the transaction log contains sufficient information to replay and maintain consistency. The transaction log is prepared in advance and stored persistently, enabling recovery without data loss.

Inventive Principle:
Principle #10Preliminary action

Solution Approach 2:

The patent introduces a transaction log as an intermediary between the volatile cache metadata and the persistent backend storage. This transaction log acts as a mediator that bridges the gap between the high-speed but non-persistent cache and the reliable but slow backend storage, allowing the system to achieve both performance and consistency by using the log to track and replay cache operations.

Inventive Principle:
Principle #24Intermediary (Mediator)

2Productivity

If cache metadata is maintained in volatile memory for efficient write-behind caching, then caching efficiency is improved, but data loss risk increases during system crashes

Engineering Contradiction:
Improvecaching efficiencyVSAvoidcache metadata persistence
Core Design Contradiction:
ProductivityVSLoss of information

Solution Approach 1:

The patent applies copying by creating a copy of the cache operation information in the form of transaction log entries in persistent flash storage. Instead of trying to make the entire cache metadata persistent, the system copies essential operation information to a durable medium, allowing recovery of cache state after crashes while maintaining the performance benefits of volatile memory for active caching.

Inventive Principle:
Principle #26Copying

3Speed

If acknowledgements are sent to VMs immediately after caching data in flash storage, then VM processing speed is improved, but data propagation reliability worsens

Engineering Contradiction:
ImproveVM processing speedVSAvoiddata propagation
Core Design Contradiction:
SpeedVSReliability

Solution Approach 1:

The patent applies preliminary action by sending acknowledgments to VMs immediately after caching data in flash storage, before the actual flush to backend storage occurs. This allows VMs to continue processing without waiting for slow disk operations. The reliability is maintained through the transaction log, which records these early-acknowledged operations and enables their replay if needed, ensuring data propagation eventually occurs.

Inventive Principle:
Principle #10Preliminary action

Data Source

PatentUS9075731B2Using transaction entries to achieve crash consistency when performing write-behind caching using a flash storage-based cache
Publication Date: 2015.07.07 VMWARE INC
  • US9075731B2 patent drawing
  • US9075731B2 patent drawing
  • US9075731B2 patent drawing

AI summary

Techniques for achieving crash consistency when performing write-behind caching using a flash storage-based cache are provided. In one embodiment, a computer system receives from a virtual machine a write request that includes data to be written to a virtual disk and caches the data in a flash storage-based cache. The computer system further logs a transaction entry for the write request in the flash storage-based cache, where the transaction entry includes information usable for flushing the data from the flash storage-based cache to a storage device storing the virtual disk. The computer system then communicates an acknowledgment to the VM indicating that the write request has been successfully processed.