Cache Management via Pre-allocated Write Buffering
Find Innovative SolutionsGenerate Solutions
Solution Overview
Problem
The data processing speed between a computing device and a large-capacity storage device is slow due to the slower cache flush speed, leading to excessive occupation of cache blocks and reduced efficiency in managing input/output operations.
Innovation Solution
A method and apparatus for managing cache by determining a cache flush time period, storing write requests in the cache without returning a completion message during cache misses, and utilizing released storage blocks to improve data management efficiency and prevent excessive cache occupation.
Engineering Contradictions & Design Principles
Engineering Contradiction Analysis
1Speed
If data is written into cache before flushing to storage device, then data processing speed is improved, but cache blocks are excessively occupied
Solution Approach 1:
The patent applies preliminary action by pre-allocating cache blocks for pending write requests before the actual data writing occurs. When a write request arrives, the system first checks if there are pre-allocated cache blocks available. If so, it immediately uses these blocks to store the data without waiting for previous flush operations to complete, thereby improving data processing speed while controlling cache block occupation through the pre-allocation mechanism.
Solution Approach 2:
The patent implements dynamics by making the cache block allocation flexible and adaptive. The system dynamically adjusts cache block allocation based on the current state of pending write requests and flush operations. Cache blocks are allocated and released dynamically according to the timing of write requests and flush completions, allowing the system to optimize between data processing speed and cache block occupation under varying workloads.
2Productivity
If cache flush time period is extended, then cache capacity utilization is improved, but data consistency with storage device deteriorates
Solution Approach 1:
The patent applies preliminary action by pre-allocating cache blocks in advance before the flush operation completes. This allows the cache to maintain a larger pool of available blocks for incoming write requests, improving cache capacity utilization. The system prepares cache blocks ahead of time rather than waiting for flush operations to free them, thereby extending the effective cache flush time period while maintaining data consistency through proper tracking of pending operations.
3Productivity
If write requests are processed immediately, then input/output operation efficiency is improved, but cache management complexity increases
Solution Approach 1:
The patent applies preliminary action by pre-allocating cache blocks before write requests arrive. This simplifies the cache management process because when a write request comes in, the system only needs to check if pre-allocated blocks are available and proceed with the write operation immediately. The complex task of cache block allocation and tracking is performed in advance during flush operations, reducing the complexity during write request processing while maintaining high I/O efficiency.
Data Source
AI summary
Embodiments of the present disclosure relate to a method and apparatus for managing cache. The method comprises determining a cache flush time period of the cache for a lower-layer storage device associated with the cache. The method further comprises: in response to a length of the cache flush time period being longer than a threshold length of time, in response to receiving a write request, determining whether data associated with the write request has been stored into the cache. The method further comprises: in response to a miss of the data in the cache, storing the write request and the data in the cache without returning a write completion message for the write request.


