lmdb · shipping · also Lightning Memory-Mapped Database

LMDB

LMDB is an embedded transactional key-value database that uses memory-mapped B+ trees, copy-on-write updates and multi-version concurrency control.

Related Observatory article: LMDB on hesela.com

The original MDB design separates the application tree from a transaction-indexed free-page tree. [1] Our pinned C-API experiment kept eight 16 KiB values while varying reader lifetime; an active snapshot exhausted fixed 1 MiB and 2 MiB maps, whereas ended and reset-reader controls completed 256 overwrites. These are constructed observations, not a benchmark or failure-rate estimate. [4]

Relations

related
lmdb-reader-table, copy-on-write, snapshot-isolation

Limitations

Citations

  1. Howard Chu. MDB: A Memory-Mapped Database and Backend for OpenLDAP. LDAPCon 2011, sections 3.2 and 4.2. (accessed 2026-10-16)
  2. LMDB 0.9.33 API: transaction lifetime, reset/renew, map capacity and reader checks (accessed 2026-10-16)
  3. LMDB 0.9.33 implementation: mdb_find_oldest, mdb_page_alloc and mdb_reader_check0 (accessed 2026-10-16)
  4. Hesela: controlled LMDB reader-lifetime experiment, complete results and limits (accessed 2026-10-16)
  5. LMDB readers: a stable snapshot can exhaust a fixed map (accessed 2026-10-16)

JSON: /data/terms/lmdb.json