Dynamic Read and Metadata Cache Sizing for Lower Read Latency
Find Innovative SolutionsGenerate Solutions
Solution Overview
Problem
The challenge in storage systems is how to properly set the sizes of cache spaces occupied by read and metadata caches to optimize data read performance, given that the total cache space is limited and read caches have lower latency but metadata caches can store more data.
Innovation Solution
A method and apparatus that dynamically adjust the sizes of read and metadata caches based on the hit rate of the read cache, using prefetch and repeated hit rates to optimize cache utilization and improve data read performance.
Engineering Contradictions & Design Principles
Engineering Contradiction Analysis
1Loss of time
If the read cache size is increased to reduce data read latency, then the data read latency is improved, but the metadata cache size is reduced, resulting in decreased ability to cache metadata
Solution Approach 1:
The patent implements dynamic adjustment of cache sizes by periodically calculating the read cache hit rate and metadata cache hit rate, then adjusting the read cache size and metadata cache size based on these hit rates. This dynamic adjustment allows the system to adapt to changing workload patterns and optimize the balance between data read latency and metadata caching capacity over time
Solution Approach 2:
The patent uses hit rates of both read cache and metadata cache as feedback metrics to guide cache size adjustment decisions. By monitoring these performance indicators and using them to adjust cache allocations, the system creates a closed-loop control mechanism that continuously optimizes cache performance based on actual usage patterns
2Quantity of substance
If the metadata cache size is increased to cache more metadata, then the metadata cache capacity is improved, but the read cache size is reduced, resulting in increased data read latency
Solution Approach 1:
The system dynamically adjusts the metadata cache size based on the metadata cache hit rate and read cache hit rate. When the metadata cache hit rate is high, the system increases metadata cache size to maintain this performance. When the read cache hit rate is high, the system increases read cache size to reduce data read latency. This dynamic adjustment resolves the contradiction by adapting cache sizes to actual workload requirements
Solution Approach 2:
The patent changes the size parameters of both read cache and metadata cache based on calculated hit rates. By using hit rate thresholds to determine when to increase or decrease cache sizes, the system dynamically optimizes the balance between metadata caching capacity and data read performance without manual intervention
3Reliability
If the total cache space is fixed, then the system resource utilization is controlled, but the flexibility to optimize both read cache and metadata cache performance is limited
Solution Approach 1:
Within the fixed total cache space constraint, the patent implements dynamic adjustment of the distribution ratio between read cache and metadata cache. By periodically recalculating optimal cache sizes based on hit rates and adjusting the allocation accordingly, the system maintains resource control while gaining flexibility to adapt to different workload patterns and optimize both cache types' performance
Data Source
Figure 1
Figure 2
Figure 3~4
AI summary
A cache space management method and apparatus are disclosed. The method may be applied to a storage system. The storage system includes a read cache and a metadata cache. In the method, first, a hit rate of the read cache of the storage system is obtained; and then, a size of the read cache and a size of the metadata cache are adjusted based on the hit rate of the read cache. In the foregoing technical solution, the size of the read cache and the size of the metadata cache are dynamically adjusted by using the hit rate of the read cache as a decision factor. For example, when the hit rate of the read cache is relatively high, the size of the read cache may be increased. In this way, a large amount of data is to be obtained from the read cache, so that data read latency can be reduced as low as possible. When the hit rate of the read cache is relatively low, the size of the read cache may be decreased to leave a cache space for the metadata cache to increase a data volume of metadata, thereby improving data read performance of the cache system.