Lightningmemory-mappeddatabase (LMDB) is a software library that provides high-performance embedded transactional databases in the form of key-value storage. Lmdb is an API binding with a variety of programming languages written in the C language. Lmdb stores any key/data pair as a byte array, has a range-based search capability, supports multiple data items for a single key, and has a special pattern (mdb_append) that attaches records at the end of the database, providing significant write performance that is increased compared to other similar stores. Lmdb is not a relational database, it is a strict key-value store, such as BerkeleyDB and dbm.
Lmdb can also be used while in multi-threaded or multi-processing environments, with read performance designed to scale linearly. The Lmdb database can have only one writer at a time, but unlike many similar key-value databases, write transactions do not block readers and do not block writers. Lmdb is also very unusual, as multiple applications on the same system can open and use the same Lmdb storage at the same time as a means of scaling performance. In addition, Lmdb does not require a transaction log (thereby improving write performance by not requiring two write data) because it maintains data integrity through the design itself.
Lmdb uses B + Tree data structures internally. Its design efficiency and footprint are small, with unexpected side effects that provide good write performance. The Lmdb has an API similar to BerkeleyDB and dbm. Lmdb treats the computer's memory as a single address space, which is shared between multiple processes or threads in a share with write-time replication semantics (historically known as single-level storage).
? Since most of the previous modern computing architectures have 32-bit memory address space limitations, this imposes a hard limit of 4GB on the size of any database that uses such technologies, so the effectiveness of mapping databases directly to single-tier storage is strictly limited. However, today's 64-bit processors now primarily implement 48-bit address space, allowing access to 47-bit addresses or 128TB of database size, making it useful again in real applications for databases that use shared memory. (Welcome reprint share)
What is Lmdb lightning memory mapping database