Can Persistent Tries Beat LMDB? Leaves Database Benchmarked
Benchmarking a persistent-trie key-value store against LMDB, RocksDB, LevelDB, SQLite, and Redis across read, write, ACID, and concurrent workloads.
The database landscape has traditionally focused on a limited set of storage architectures, primarily B-trees and LSM trees and their variants. However, this article explores a different approach: a persistent-trie design for embedded key-value storage, specifically comparing it against the widely-used high-performance baseline, LMDB.
While most published benchmarks leave out LMDB, making it challenging to understand what "fast" truly means in practice, this article aims to bridge that gap by benchmarking it against a range of commonly used engines under comparable conditions.
To ensure a fair comparison, all databases are optimized for high performance using recommended settings and engine-specific optimizations, such as batching, cache sizing, binary keys, and other optimizations unique to each engine. Additionally, ACID workloads are assessed separately with strict durability enabled to evaluate performance under stringent durability requirements.
The primary objective is to measure how these systems perform against a well-established high-performance reference. The findings reveal that a persistent-trie design can be highly competitive and, in several scenarios, outperform both the baseline and other tested systems. Across various workloads, LMDB consistently emerges as a strong baseline, often achieving up to approximately 6 times higher throughput than WiredTiger and SQLite in read-heavy workloads.
Furthermore, it demonstrates roughly 1.3 to 3.5 times higher throughput than LevelDB and 2 to 6 times higher throughput than RocksDB across single-threaded workloads.
Leaves, the persistent-trie design under evaluation, exhibits a distinct performance profile. In several standard workloads, it is found to be roughly 1.5 to 2.2 times faster than LMDB. However, as scan lengths increase, the performance gap may narrow or even reverse. Leaves also excels in concurrent table scenarios. Notably, in ACID workloads, Leaves demonstrates lower absolute throughput due to the higher costs associated with durability.
The benchmarking process ensures fairness by configuring all systems for maximum throughput using recommended settings, including cache sizing, batching, and binary keys. ACID workloads are evaluated separately with full durability enabled. The key takeaway is that architectural differences in storage designs significantly influence lookup cost, write amplification, and scalability across various workload patterns.
Written by urgent.news from HackerNoon's reporting — not their text. Machine-written — may contain errors; check the original before relying on it.