超级快、小的 key-value 数据存储: Lightning MDB
jopen
11年前
LMDB 是一个超级快、超级小的 key-value 数据存储服务,是由 OpenLDAP 项目的 Symas 开发的。使用内存映射文件,因此读取的性能跟内存数据库一样。其大小受限于虚拟地址空间的大小。
- Ordered-map interface (keys are always sorted, supports range lookups)
- Fully transactional, full ACID semantics with MVCC.
- Reader/writer transactions: readers don't block writers and writers don't block readers. Writers are fully serialized, so writes are always deadlock-free.
- Read transactions are extremely cheap, and can be performed using no mallocs or any other blocking calls.
- Supports multi-thread and multi-process concurrency, environments may be opened by multiple processes on the same host.
- Multiple sub-databases may be created with transactions covering all sub-databases.
- Memory-mapped, allowing for zero-copy lookup and iteration.
- Maintenance-free, no external process or background cleanup/compaction required.
- No application-level caching. LMDB fully exploits the operating system's buffer cache.
- 32KB of object code and 6KLOC of C.
- Licensed under the OpenLDAP Public License