I talk a little about the history of this approach in my early LMDB design papers. The mmap approach was actually quite popular up until the mid-to-late 1980s. Up until then, 32 bit address spaces were still orders of magnitude larger than the physical memory of common machines. But when RAM sizes started approaching 1GB, and database sizes reached beyond 4GB, the notion of mmap&#x27;ing an entire DB into a process became impractical.<p>It took the introduction of SPARC64 in 1995 to really make it worth considering again, and Athlon64 in 2003 to make it feasible for mainstream computing.<p>Die-hard DB authors will tell you that having a user-space page cache buys you control - the DB has more knowledge about the workload and thus can make better decisions about which pages to evict and which to keep, than the kernel.<p>Of course, with greater power comes greater responsibility. Managing a cache, and eviction&#x2F;replacement strategies in particular, is one of the most difficult problems in computing. Maintaining all of that knowledge about the workload can be much more compute-intensive than actually executing the original workload. Indeed, LMDB demonstrates that it&#x27;s <i>always</i> more costly. Kernel code can program the MMU and handle page faults much more efficiently than any user-level code. It also has global visibility into <i>all</i> of the hardware resources in a system. It&#x27;s already the kernel&#x27;s job to balance memory demands among various processes in a system. A user-level app really only knows about its own consumption; it might be able to obtain information about other workloads on the machine but only at great cost.<p>In today&#x27;s age of virtual-machine (over)use, app-level memory management is an even worse proposition. (In the OpenLDAP Project we had an effort led by an IBM team, looking into a self-tuning cache for OpenLDAP. They in particular wanted it to &quot;play nice&quot; and give up cache memory when there was memory pressure from other processes in the system, and even from pressure from the host system when running inside a VM. That effort was IMO futile and that work never reached fruition. But the mmap approach achieves all of their goals, without any of the massive amount of load monitoring and timing code they needed.)<p>On modern-day hardware with MMUs, there&#x27;s no good reason to have user-space cache management.