Dhcache: a dual-hash cache for optimizing the read performance in key-value store
摘要
Key-value (KV) stores are widely utilized in data-intensive applications to obtain exceptional storage performance. However, its caching mechanism often suffers read and write pauses. Especially when accessing old data periodically, it results in cache hit ratios and system throughput decline. To address the performance degradation issue, we propose an innovative dual-hash caching mechanism called DHCache. Firstly, we introduce a dual-hash structure in DHCache. It alleviates read and write pauses by reducing the frequency of rehash operations on the hash table. Secondly, we employ a Most Recently Used (MRU) cache replacement policy on DHCache to retain old data. This enhances the cache hit ratios and throughput when periodically accessing old data. DHCache is deployed within LevelDB, demonstrating significant performance advantages. Experimental results indicate that DHCache improves throughput by 11.89–21.92% in various read workloads compared to traditional LRUCache. Significantly, read performance improvement does not come at the cost of write performance degradation.