Hacker News new | ask | show | jobs
by zawerf 2781 days ago
Is there a design doc or talk about the internals?

In particular are there any good resources about the details of using memory mapping?

I know how to implement persistent data structures (and it seems like lmdb is just a persistent b+-tree). But I don't know how to make it persist to disk. Is it as simple as using a memory mapped file for all memory allocations? Can all data structures be turned into a "database" in this way? If your workload fits in memory is there any performance difference between in-memory data structures? When do writes actually flush? What happens if multiple processes use the same file? etc

2 comments

See these two talks by 'hyc...

LMDB talk at DEVOXX (2013) [video] https://youtu.be/Rx1-in-a1Xc

LMDB CMU Databaseology Lecture (2015) [video] https://youtu.be/tEa5sAh-kVk

There is much more information on the symas website (https://symas.com/lmdb/technical/) (see all the talks links)