LMDB vs RocksDB
LMDB: Tiny memory-mapped B+tree with ACID transactions and lock-free readers; reached 1.0 in 2026. RocksDB: Meta's embeddable LSM-tree key-value engine, the storage layer under dozens of databases.
key differences
- Only RocksDB has ttl / expiry, compression.
choose lmdb for
- +Read-heavy embedded indexes and caches
- +Directory services (OpenLDAP back-mdb)
- +Blockchain and wallet state
- +ML dataset storage with fast random reads
best at · Embedded, Metadata, Local-first
choose rocksdb for
- +Storage engine for a custom database or service
- +Stream-processing state stores (Kafka Streams, Flink)
- +MySQL storage engine via MyRocks
- +Write-heavy local indexes and caches on SSD
best at · Embedded, OLTP, Streaming
LMDB vs RocksDB: FAQ
What is the difference between LMDB and RocksDB?
LMDB: Tiny memory-mapped B+tree with ACID transactions and lock-free readers; reached 1.0 in 2026. RocksDB: Meta's embeddable LSM-tree key-value engine, the storage layer under dozens of databases. Only RocksDB has ttl / expiry, compression.
When should I choose LMDB over RocksDB?
Choose LMDB for read-heavy embedded indexes and caches; directory services (OpenLDAP back-mdb); and blockchain and wallet state. Choose RocksDB for storage engine for a custom database or service; stream-processing state stores (Kafka Streams, Flink); and MySQL storage engine via MyRocks.
Is LMDB or RocksDB more popular?
RocksDB ranks #30 on the WhichDB Score (48.2/100) and LMDB ranks #47 (39.7/100). Popularity is not fit: check the requirements that matter for your project.
Are LMDB and RocksDB open source?
Yes. LMDB is open source. License: OpenLDAP Public License 2.8. Yes. RocksDB is open source. License: Apache License 2.0 or GPL-2.0 (dual).