Cache Line Eviction via Asynchronous Cleaning Thread
Find Innovative SolutionsGenerate Solutions
Solution Overview
Problem
Write-back caching in computing systems experiences low performance for random, write-intensive workloads due to high overhead in writing dirty data to storage and inefficient cleaning of dirty cache lines, leading to increased latency and reduced throughput.
Innovation Solution
Implementing cache acceleration logic that optimizes cache eviction and cleaning processes by using a multilevel cache structure with separate lists for clean and dirty pages, and an asynchronous cleaning thread that minimizes seek distances and synchronization latency, thereby improving write-back cache performance.
Engineering Contradictions & Design Principles
Engineering Contradiction Analysis
1Speed
If write-back caching is implemented to improve cache performance, then cache hit speed is improved, but dirty data write overhead increases
Solution Approach 1:
The patent applies preliminary action by proactively cleaning dirty cache lines before they are evicted. The cleaning thread continuously identifies and writes dirty data to storage in advance, so when a cache line needs to be evicted, it is already clean or the write has been scheduled, reducing the overhead during eviction operations.
Solution Approach 2:
The patent implements continuity of useful action through an asynchronous cleaning thread that continuously operates in the background to clean dirty cache lines. This continuous background operation ensures that cleaning happens steadily over time rather than in bursts, maintaining cache performance while gradually reducing dirty data accumulation without interrupting normal cache operations.
2Reliability
If dirty cache lines are cleaned synchronously during eviction, then storage consistency is maintained, but cache throughput decreases
Solution Approach 1:
The patent uses an intermediary cleaning thread that acts as a mediator between the cache and storage systems. This separate thread handles the synchronous write operations to storage, isolating them from the main cache eviction path. The cache can evict lines asynchronously while the cleaning thread independently manages the synchronous writes to storage, maintaining consistency without blocking cache throughput.
Solution Approach 2:
The patent segments the cache cleaning function into a separate asynchronous thread independent from the main cache eviction logic. This segmentation allows the cache eviction operation to proceed without waiting for synchronous writes to complete, while the cleaning thread separately handles the consistency-maintaining writes to storage, thus preserving both throughput and reliability.
3Quantity of substance
If random write-intensive workloads are handled by traditional cache eviction, then cache capacity is utilized, but seek distance increases
Solution Approach 1:
The cleaning thread performs preliminary actions by proactively identifying and cleaning dirty cache lines before they are evicted due to capacity constraints. By scheduling writes to storage in advance and organizing them by storage location, the system reduces random seek distances when actually evicting cache lines, as the storage head can service multiple writes in a more sequential manner.
Data Source
AI summary
Examples may include techniques to improve cache performance in a computing system. An eviction service may be used to manage a dirty list and a clean list, set a cache line to hot, set a cache line to clean, set a cache line to dirty, and evict a cache line from the cache. A cache engine may be used to write data into the cache at a cache line, request the eviction service to set the cache line to dirty, and manage a dirty cache lines counter for each chunk of the primary memory. A cleaning thread may be used to determine a dirtiest chunk of a primary memory, get a cache line of the dirtiest chunk, and when the cache line of the dirtiest chunk is dirty, read the cache line to get data from the cache, write the data to primary memory, request the eviction service to set the cache line to clean, and manage the dirty cache lines counters.


