re: Are You Sure You Want to Use MMAP in Your Database Management System? - Ayende @ Rahien

submited by
Style Pass
2022-01-14 15:00:12

As you can imagine, this is a topic near and dear to my heart. This is especially the case since I am currently writing the Implementing a file pager in Zig posts series. I implemented the same low level mechanics using mmap, using mmap, I have < 100 lines of code and can start building higher level concepts almost immediately. Writing my own pager is currently a 10 posts series and the end doesn’t seam to be in sight.

I’m going to use this post to respond to the article. As a reminder, I’m the founder of RavenDB and I wrote Voron, a mmap based storage engine and has been running that across hundreds of clients and literally tens of millions of instances in production. I also wring a book about building a storage engine that uses mmap internally.

The paper itself does a great job of outlining the issue of using mmap as the buffer pool in DBMS. What it doesn’t cover, however, is the alternative. I would touch on specific pointer from the paper shortly, but I want to point out that the article compares apples to camels in the benchmarks and conclusions. Note that I don’t necessarily disagree with some of the statements, mmap certain has challenges that you need to deal with, but if you avoid that, you can’t have wave everything that it brings to the table.

Leave a Comment