CedrusDB: Persistent Key-Value Store with Memory-Mapped Lazy-Trie
As RAM is becoming cheaper and growing abundant, it is time to revisit the design of persistent key-value storage systems. Most of today's persistent key-value stores are based either on a write-optimized Log-Structured Merge tree (LSM) or a read-optimized B+-tree. Instead, this paper introduces a new design called "lazy-trie" to index the persistent storage, a variant of the hash-trie data structure. A lazy-trie achieves near-optimal height and has practical storage overhead. Unlike other balanced data structures, it achieves this without the need for expensive reorganization of subtrees, allowing improved write performance. We implemented CedrusDB, a lazy-trie-based persistent key-value store that supports point lookup and updates. CedrusDB outperforms both popular LSM- and B+-tree-based key-value stores in mixed workloads. The implementation of CedrusDB uses memory-mapping. The lazy-trie organization in virtual memory allows CedrusDB to better leverage concurrent processing than other organizations.
READ FULL TEXT