logoalt Hacker News

mtndew4brkfstlast Tuesday at 2:33 AM2 repliesview on HN

Andy is very critical of using mmap in database implementations.


Replies

hyc_symaslast Wednesday at 9:02 AM

Andy's critiques are only valid on dedicated database servers.

https://www.symas.com/post/are-you-sure-you-want-to-use-mmap...

LMDB uses mmap and Andy recommends LMDB, in the very article this thread is about.

andersmurphylast Tuesday at 6:32 AM

Why? Sqlite and LMDB make fantastic use of it. For anyone doing a single writer db it's a no brainer. It does so much for you and it does it very well. All the things you don't have to implement because it does it for you:

- Reading the data from disk

- Concurrency between different threads reading the same data

- Caching and buffer management

- Eviction of pages from memory

- Playing nice with other processes in the machine

Why would you not leverage it? It's such a great fit for scaling reads.

show 3 replies