Content deleted Content added
citation needed for the Concurrency section |
add scaling benchmark references (with thanks to howard chu) https://twitter.com/hyc_symas/status/1397535546260480006 |
||
Line 44:
=== Concurrency ===
LMDB employs [[multiversion concurrency control]] (MVCC) and allows multiple threads within multiple processes to coordinate simultaneous access to a database. Readers scale linearly by design. While write transactions are globally serialized via a [[mutex]], read-only transactions operate in parallel, including in the presence of a write transaction, and are entirely [[wait free]] except for the first read-only transaction on a thread. Each thread reading from a database gains ownership of an element in a shared memory array, which it may update to indicate when it is within a transaction. Writers scan the array to determine the oldest database version the transaction must preserve, without requiring direct synchronization with active readers.
== Performance ==
|