Persistent L2ARC Cache Architecture for Lower Memory Overhead

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

The conventional second level adaptive replacement cache (L2ARC) architecture in ZFS is inefficient due to its tightly coupled nature with the primary ARC, high memory usage, limited write performance, variable compression storage inefficiencies, and susceptibility to data loss during scans or failures, which hampers performance scaling and file system capacity.

Innovation Solution

Implementing a separate and independent L2ARC with its own indexing mechanism, clustering data into large chunks, using a storage pool allocator to track compressed chunks across devices, and re-adding frequently accessed data to the active cache based on a hit counter, thereby reducing memory consumption and improving write performance.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Speed

If a conventional L2ARC is implemented as part of the regular memory pool, then data can be cached to accelerate reads, but memory usage increases and write performance is limited

Engineering Contradiction:
Improveread speedVSAvoidmemory usage
Core Design Contradiction:
SpeedVSQuantity of substance

Solution Approach 1:

The patent divides the caching system into two independent parts: L1ARC (in-memory cache) and L2ARC (persistent cache on separate storage devices). This segmentation allows L2ARC to handle cold data on persistent storage while L1ARC handles hot data in memory, reducing overall memory pressure while maintaining read acceleration capabilities.

Inventive Principle:
Principle #1Segmentation

Solution Approach 2:

The patent introduces L2ARC as an intermediary layer between the main storage pool and the application. This intermediate persistent cache stores data that is not frequently accessed, allowing the in-memory L1ARC to focus on frequently accessed data, thereby improving read speed without proportionally increasing total memory usage.

Inventive Principle:
Principle #24Intermediary (Mediator)

2Device complexity

If L2ARC is tightly coupled with the primary ARC, then cache management is simplified, but write performance is limited and scalability is reduced

Engineering Contradiction:
Improvecache management complexityVSAvoidwrite performance
Core Design Contradiction:
Device complexityVSProductivity

Solution Approach 1:

The patent separates L2ARC management from the primary ARC, creating an independent persistent cache system with its own allocation and replacement policies. This segmentation allows L2ARC to be managed independently on separate storage devices, enabling parallel write operations and improving overall write performance without complicating core cache management.

Inventive Principle:
Principle #1Segmentation

Solution Approach 2:

The patent moves L2ARC from the memory dimension to the persistent storage dimension, creating a multi-dimensional caching architecture. This allows the system to leverage both fast memory for hot data and high-capacity persistent storage for cold data, improving write performance and scalability without being constrained by memory bandwidth limitations.

Inventive Principle:
Principle #17Another dimension (Dimensionality change)

3Quantity of substance

If compression is applied to L2ARC storage, then storage density increases, but variable compression creates storage inefficiencies and complicates management

Engineering Contradiction:
Improvestorage densityVSAvoidstorage management complexity
Core Design Contradiction:
Quantity of substanceVSDevice complexity

Solution Approach 1:

The patent applies compression to L2ARC storage to increase storage density, allowing more cached data to be stored on persistent devices. By changing the storage parameter from uncompressed to compressed, the system achieves higher storage efficiency while the independent L2ARC management structure handles the complexity of compression operations separately from the main cache logic.

Inventive Principle:
Principle #35Parameter changes

4Device complexity

If L2ARC uses the regular memory pool, then implementation is simpler, but data loss susceptibility increases during scans or failures

Engineering Contradiction:
Improveimplementation complexityVSAvoiddata persistence
Core Design Contradiction:
Device complexityVSReliability

Solution Approach 1:

The patent extracts L2ARC from the regular memory pool and places it on separate persistent storage devices. This extraction ensures that L2ARC data persists independently of memory pool operations, protecting cached data from loss during memory scans, failures, or reclamation operations while keeping the implementation structure relatively simple.

Inventive Principle:
Principle #2Taking out (Extraction)

Data Source

PatentUS10061775B1Scalable and persistent L2 adaptive replacement cache
Publication Date: 2018.08.28 INTELLIFLASH BY DDN INC
  • US10061775B1 patent drawing
  • US10061775B1 patent drawing
  • US10061775B1 patent drawing

AI summary

A method, system and a computer program product for managing file system memory includes a module configured to implement a separate replacement policy and a separate index for a persistent second level adaptive replacement cache (L2ARC) logically part of a first level ARC. The system also includes a module configured to cluster compressed chunks of data on multiple physical devices via aligning the clusters of data chunks on a byte boundary basis on each of the devices. The method additionally includes a module configured to create a storage pool allocator (SPA) to track the compressed and packed chunks on the multiple devices via an attached active page and attached multiple closed pages. The method further includes re-adding an evicted data from the L2ARC to an active page to be written again thereto based on a configurable threshold number of hits to data in the L2ARC via an L2ARC hit counter.