Metadata Caching via LRU-LFU Page Cache and Recycle Queue
Find Innovative SolutionsGenerate Solutions
Solution Overview
Problem
Storage systems face challenges in efficiently caching metadata due to the large amount of metadata required for supporting large provisioned capacities, which exceeds the available memory, leading to performance issues.
Innovation Solution
A multi-level dense tree metadata structure is implemented, with caching priority given to metadata pages containing index entries that point to a large set of user data, using a page cache with Least Recently Used (LRU) and Least Frequently Used (LFU) properties, and a recycle queue to manage metadata pages based on spatial and temporal locality.
Engineering Contradictions & Design Principles
Engineering Contradiction Analysis
1Speed
If metadata is cached in memory to improve system performance, then access speed is improved, but memory consumption increases beyond available capacity
Solution Approach 1:
The metadata cache is segmented into two distinct parts: a hot metadata cache in memory for frequently accessed metadata, and a cold metadata cache on SSD for less frequently accessed metadata. This segmentation allows the system to optimize memory usage while maintaining fast access for critical metadata operations.
Solution Approach 2:
Different storage media are used for different portions of metadata based on access patterns. Hot metadata that requires frequent access is stored in memory with fast access characteristics, while cold metadata is stored on SSD with larger capacity but slower access. This local quality differentiation resolves the contradiction between speed and memory consumption.
2Productivity
If all metadata is stored in memory to support large provisioned capacities, then system performance is improved, but available memory is exceeded
Solution Approach 1:
The metadata storage is divided into hot and cold portions, allowing the system to maintain high performance for frequently accessed metadata in memory while storing less frequently accessed metadata on SSD, thus supporting large provisioned capacities without exceeding available memory.
Solution Approach 2:
The solution extends the storage hierarchy from a single memory layer to a two-layer hierarchy (memory + SSD), adding a temporal dimension to metadata access by categorizing metadata as hot or cold based on access frequency, thereby supporting larger capacities within memory constraints.
3Quantity of substance
If metadata is stored on SSD to reduce memory usage, then memory consumption is reduced, but access speed decreases leading to performance issues
Solution Approach 1:
By segmenting metadata into hot and cold categories and storing them in different media, the system ensures that frequently accessed metadata remains in fast memory while less frequently accessed metadata is stored on SSD, thus reducing overall memory usage while maintaining acceptable access speeds for critical operations.
Solution Approach 2:
The system applies different storage characteristics to different portions of metadata: fast access quality for hot metadata in memory, and capacity-oriented quality for cold metadata on SSD. This local quality approach resolves the speed-memory usage contradiction by matching storage characteristics to access patterns.
Data Source
AI summary
A technique provides memory efficient caching of metadata managed by a volume layer of a storage input/output stack executing on one or more nodes of a cluster. Efficient caching of the metadata in a memory of a node may be realized through the use of a caching data structure, i.e., a page cache, configured to store a key-value pair, wherein the key is an extent key and the value is a metadata page containing the index entries. The page cache illustratively includes two data structures configured to maintain the properties of Least Recently Used (LRU) and Least Frequently Used (LFU) for the cache. The first data structure is a hash table that stores a dense tree metadata page (value) indexed by the extent key. The second data structure is a recycle queue that controls the metadata page stored in the hash table based on spatial and temporal locality of the page.


