Shared Page Cache Structure for Higher Storage Cache Hit Rates
Find Innovative SolutionsGenerate Solutions
Solution Overview
Problem
The performance of applications running on a host is affected by the cache hit rate, which is influenced by whether files are private or shared, with private files resulting in lower cache hit rates compared to shared files.
Innovation Solution
Implementing a shared page cache data structure for a group of files, allowing data from persistent storage to be cached and shared among multiple threads, and using a per-group unified read page cache data structure to improve cache hit rates.
Engineering Contradictions & Design Principles
Engineering Contradiction Analysis
1Reliability
If data is cached in host memory for private files accessed by single threads, then cache hit rate is improved, but overall system performance deteriorates due to lower cache hit rates compared to shared files
Solution Approach 1:
The patent merges multiple per-file page cache data structures into a single per-control-group page cache data structure. Files within the same control group share a unified cache, allowing threads accessing different files in the group to benefit from cache hits. This is achieved by implementing a data structure that stores file identifiers and page cache entries in a shared structure, enabling multiple threads to access and populate the same cache simultaneously, thereby improving both cache hit rate and application performance.
2Reliability
If a shared page cache is implemented for multiple files, then cache hit rate increases, but data structure complexity increases
Solution Approach 1:
The patent segments the shared page cache data structure into distinct functional components: a file identifier storage section, a page cache entry storage section, and an association mechanism linking files to cache entries. This segmentation allows the system to manage complexity by organizing data in modular units that can be independently accessed and managed, reducing the overall complexity burden while maintaining the benefits of sharing.
Solution Approach 2:
The patent introduces an intermediary file identifier mechanism that mediates between multiple files and the shared page cache. Instead of directly managing complex relationships between files and cache entries, the system uses file identifiers as intermediaries to map files to their corresponding cache entries. This intermediary layer simplifies the data structure by providing a clear, indirect reference mechanism that reduces direct complexity while enabling efficient cache management.
3Reliability
If per-file write page cache is used to manage modified data, then data integrity is improved, but memory usage increases
Solution Approach 1:
The patent implements a dynamic memory management approach where the write page cache allocates memory based on actual usage patterns. The system dynamically adjusts the amount of memory dedicated to write caching by monitoring file access patterns and modifying cache allocation accordingly. This dynamic behavior allows the system to maintain data integrity through proper write caching while adapting memory usage to actual needs, preventing excessive memory consumption.
Solution Approach 2:
The patent changes key parameters of the write page cache system, including cache size limits, eviction policies, and allocation thresholds. By adjusting these parameters, the system optimizes the balance between data integrity and memory usage. For example, setting appropriate cache size limits ensures that write caching provides sufficient protection for data integrity while preventing the cache from consuming excessive memory resources.
Data Source
Figure 1
Figure 2
Figure 3
AI summary
A system and method for caching in storage devices. In some embodiments, the method includes: opening a first file, by a first thread; reading a first page of data, from the first file, into a page cache in host memory of a host; adding, to a first data structure, a first pointer, the first pointer pointing to the first page of data; opening a second file, by a second thread; reading a second page of data, from the second file, into the page cache; and adding, to the first data structure, a second pointer, the second pointer pointing to the second page of data.