Symas Lightning Memory-Mapped Database (LMDB)

This page contains technical information about Symas's LMDB database library. LMDB is an ultra-fast, ultra-compact key-value embedded data store developed by Symas for the OpenLDAP Project. It uses memory-mapped files, so it has the read performance of a pure in-memory database while still offering the persistence of standard disk-based databases, and is only limited to the size of the virtual address space, (it is not limited to the size of physical RAM). Note: LMDB was originally called MDB, but was renamed to avoid confusion with other software associated with the name MDB

Quick Overview Feature Comparison Documentation Support Publications Benchmarks Other Projects Other Languages

Quick Overview

LMDB is a tiny database with some great capabilities: It is a read-optimized design and performs reads several times faster than other DB engines, several orders of magnitude faster in many cases. It is not a write-optimized design; for heavy random write workloads other DB designs may be more suitable.

Feature Comparison

A quick comparison of popular embedded key/value stores.
ACID Transactionsxx
Nested Transactionsxx
Multiple Namespacesxx
Sorted Keysxxxx
Sorted Duplicate Keysxx
Multi-thread concurrencyxxxx
Multi-process concurrencyxx
No cache tuning: zero-configx
Instantaneous crash recoveryx
Zero-copy readsx
Zero-copy writesx
Atomic hot backupx


The full docs (generated by doxygen) are here.


Development occurs in the OpenLDAP Project's git repo in the mdb.master branch. A clone of just the LMDB code is also available on Gitorious.


Commercial Support

While not required, Symas offers fixed-price commercial support to those using LMDB in mission-critical applications. Send email inquiries to or call us at (650) 963-7601.

Porting and Professional Services

Thinking about switching your application to LMDB? Call us. We will be happy to provide developer support or porting services to help you transition your application to LMDB.


Questions and discussions of LMDB should be directed to the OpenLDAP mailing lists.

Published Reports on LMDB


Many other databases claim to be lightweight, but none of them can beat LMDB's compact 32K of object code. Many other databases also claim to be world's fastest, but none of them are in LMDB's league...

LMDB In Other Projects

Besides the LMDB backend for OpenLDAP slapd (back-mdb), support for LMDB is also available in these open source projects:
Cyrus SASL
Patches posted to the SASL mailing list
Heimdal Kerberos
Support is available in the development branch
Source code available on Gitorious
Integrated since version 2.6.0 OpenDKIM
Memcached with persistent storage using LMDB, on Gitorious. Tests with memcachetest shows that LMDB is several times faster than BerkeleyDB, and faster even than the pure-memory memcached.
Thrift-based storage server on Github. Test results are available using the Yahoo! Cloud Serving Benchmark (YCSB).
A replicated state machine manager for HyperDex. Source code available on Github
A reliable and fast NoSQL server (distributed key/value store). Source code available on Github
(Coming soon)
Support added to Postfix 2.11
Source code available on Github
Near-realtime disk persistence Second strike with Lightning, code on Github
A redis-protocol compatible persistent storage server. On Github
High performance analysis of behavioral data. Formerly used LevelDB but switched to LMDB due to concurrency and performance issues in LevelDB. SkyDB.
A new high-performance noSQL database built on LMDB.
An Authoritative DNS server written in C++; delivering Very High Performance using LMDB.
A column oriented, embarrassingly distributed relational NoSQL database.
A client/server file backup system.
Distributed service discovery and configuration.

Wrappers for Other Languages

The compact LMDB code can easily be called from other languages using their respective wrappers. All of these wrappers were developed by 3rd parties. If you need assistance with them, we can work with you and the wrapper authors as needed.
Erlang wrapper
Source code available on Github, developed for use with Riak but suitable for other Erlang apps as well.
C++ wrapper
Source code available here
Python wrapper
Source code available on Github
Python wrapper
(Another one) available on Github
Lua wrapper
Source code available on Github
Ruby wrapper
Source code available on Github
Go wrapper
Source code available on Github
Objective C wrapper
Source code available on Github
Node.js wrapper
Source code available on Github
Java wrapper
Using JNI, available on Github
.NET wrapper
Source code and binaries available on Github
Perl wrapper
Source code available on CPAN
Bindings and simplified wrappers in the main Crack source tree.
Since the LMDB API is similar to BerkeleyDB, porting existing BDB-based code to LMDB is usually quite simple and fast. More projects will be adapted as they come to our attention.
Page last updated 2014-04-18