Comment by usefulcat

16 hours ago

It’s also great for when you have a lot of data on local storage, and a lot of different processes that need to access the same subset of that data concurrently.

Without mmap, every process ends up caching its own private copy of that data in memory (think fopen, fread, etc). With mmap, every process accesses the same cached copy of that data directly from the FS cache.

Granted this is a rather specific use case, but for this case it makes a huge difference.