Memory-mapped file I/O seems like an elegant way to avoid building a complex database buffer pool, but it repeatedly fails in production database engines.
Researchers from Carnegie Mellon University and Friedrich-Alexander-Universitat demonstrated that relying on mmap creates severe correctness, concurrency, and performance issues. When the operating system manages page evictions, the database loses control over write ordering, dirty page flushing, and transaction durability.
Operating system page faults block entire worker threads synchronously. Because the kernel page cache lacks transaction-aware eviction policies, dirty pages can be written to disk before the corresponding write-ahead log records are flushed. This violates fundamental write-ahead logging protocols and risks silent corruption during unexpected system crashes.
Furthermore, high-concurrency access patterns suffer under heavy page table lock contention inside the kernel. Modern database management systems such as MongoDB and LMDB that initially adopted memory mapping ultimately encountered performance ceilings that necessitated massive architectural rewrites.
Building an explicit user-space buffer pool remains non-negotiable for serious database architectures.








