Lazy Eviction Cache Algorithm Reduces Write Operations
Find Innovative SolutionsGenerate Solutions
Solution Overview
Problem
In data storage systems, the existing caching algorithms often replace hot data blocks with new ones based on misses, leading to pollution of the cache space with data blocks that may never be re-accessed, reducing cache efficiency and shortening the lifespan of non-volatile cache media due to excessive write operations.
Innovation Solution
Implement a lazy eviction method that conditionally replaces data blocks in the cache space based on re-access probability, delaying the eviction of blocks with higher reuse distances and re-access probabilities, thereby keeping valuable data blocks in the cache and reducing unnecessary writes.
Engineering Contradictions & Design Principles
Engineering Contradiction Analysis
1Productivity
If a caching algorithm simply replaces a hot data block in the cache space at each miss, then the cache space can store new hot data blocks, but the newly stored hot data block may pollute the cache space and lower the use efficiency of the cache space
Solution Approach 1:
The patent segments the cache replacement process into two distinct phases: a judgment phase that evaluates whether eviction is necessary using reuse distance and re-access probability metrics, and an execution phase that performs the actual replacement only when justified. This segmentation prevents premature or unnecessary evictions while maintaining algorithmic clarity.
Solution Approach 2:
The patent performs preliminary analysis of data block characteristics (reuse distance and re-access probability) before executing the replacement action. By evaluating these metrics in advance, the system determines whether a data block should be evicted, avoiding unnecessary replacements and cache pollution while maintaining efficient cache utilization.
2Productivity
If the caching algorithm replaces hot data blocks frequently based on misses, then new data blocks can be stored in the cache space, but unnecessary write operations increase and shorten the lifespan of non-volatile cache media
Solution Approach 1:
The patent implements feedback mechanisms that monitor data block access patterns (reuse distance and re-access probability) and use this information to control eviction decisions. This feedback loop ensures that data blocks are only evicted when metrics indicate low re-access likelihood, minimizing unnecessary write operations and extending cache media lifespan while maintaining cache effectiveness.
3Quantity of substance
If the cache space is filled with hot data blocks that may never be re-accessed, then the cache space utilization appears high, but the actual cache efficiency is reduced
Solution Approach 1:
The patent changes the evaluation parameters from simple cache occupancy metrics to sophisticated access pattern metrics (reuse distance and re-access probability). By using these dynamic parameters, the system identifies and evicts data blocks that occupy cache space but are unlikely to be re-accessed, maintaining healthy cache occupancy levels while preserving high cache hit rates.
Data Source
Figure 1
Figure 2~3
Figure 4
AI summary
A method and an apparatus for caching a data block, a computer device, and a computer-readable storage medium relate to the field of storage technologies. The method includes: obtaining an access request for requesting access to a first data block; detecting whether a second data block satisfies a lazy condition in a case that the first data block is missed in a cache space of a storage system, the second data block being a candidate elimination block in the cache space, and the lazy condition being a condition for determining, to delay replacing the second data block from the cache space according to a re-access probability; and accessing the first data block from a storage space of the storage system and skipping replacing the second data block from the cache space in a case that the second data block satisfies the lazy condition.