Lightning Memory-Mapped Database Manager (LMDB) 1.0
LMDB 1.0 is a memory-mapped, high-performance transactional database library with a B-tree-based structure, offering full ACID semantics, multi-reader and single-writer concurrency, and a simple key-value API. It is designed for efficiency and reliability, supporting zero-copy reads, crash recovery, and extremely small binary size.
Background
LMDB is an ultra-fast, ultra-reliable embedded database library (not a client-server DB like PostgreSQL or MySQL). It uses memory-mapped files, meaning it lets applications read and write data directly from disk as if it were in memory, which gives extreme read performance. Key facts:
- It is a "key-value store" (like a persistent hash table), not a relational database with SQL.
- Its defining feature: ACID transactions (atomic, consistent, isolated, durable) with no write-ahead log — it uses a copy-on-write B+ tree, so readers never block writers and vice versa.
- It is used under the hood by OpenLDAP, and was originally written by Symas (a database/security firm) to power LDAP directories at scale.
- The 1.0 release marks the end of a decade-long API stability guarantee (the "1.0 API" has been stable for years; this versioning milestone is about documentation and maturity badge, not breaking changes).
- Why it matters: LMDB is the standard choice for any project that needs a small, fast, reliable embedded database — it is used by Bitcoin (for transaction indexing), Tor (for directory data), and many language ecosystems (Python, Node.js, Rust) via bindings.