Skip to content

Are You Sure You Want to Use MMAP in Your Database Management System?

Photo of Victor  B.
Hosted By
Victor B.
Are You Sure You Want to Use MMAP in Your Database Management System?

Details

The Paper
Are You Sure You Want to Use MMAP in Your Database Management System?

Paper Link
https://db.cs.cmu.edu/papers/2022/cidr2022-p13-crotty.pdf

Abstract
Memory-mapped (mmap) file I/O is an OS-provided feature that maps the contents of a file on secondary storage into a program’s address space. The program then accesses pages via pointers as if the file resided entirely in memory. The OS transparently loads pages only when the program references them and automatically evicts pages if memory fills up.

mmap’s perceived ease of use has seduced database management system (DBMS) developers for decades as a viable alternative to implementing a buffer pool. There are, however, severe correctness and performance issues with mmap that are not immediately apparent. Such problems make it difficult, if not impossible, to use mmap correctly and efficiently in a modern DBMS. In fact, several popular DBMSs initially used mmap to support larger-than-memory databases but soon encountered these hidden perils, forcing them to switch to managing file I/O themselves after significant engineering costs. In this way, mmap and DBMSs are like coffee and spicy food: an unfortunate combination that becomes obvious after the fact.

Since developers keep trying to use mmap in new DBMSs, we wrote this paper to provide a warning to others that mmap is not a suitable replacement for a traditional buffer pool. We discuss the main shortcomings of mmap in detail, and our experimental analysis demonstrates clear performance limitations. Based on these findings, we conclude with a prescription for when DBMS developers might consider using mmap for file I/O.

Format
We start at 6:10, don't be late!
The discussion lasts for about 1 to 1.5 hours, depending upon the paper.
• Read the paper (done before you arrive)
• Introductions (name, and background)
• First impressions (1-2 minutes this is what I thought)
• Structured review (we move through the paper in order, everyone gets a chance to ask questions, offer comments, and raise concerns)
• Free form discussion
• Nominate and vote on the next paper

Photo of Polyglot Vancouver Reading Group (#PapersWeLoveYVR) group
Polyglot Vancouver Reading Group (#PapersWeLoveYVR)
See more events