mmap Performance Debate

Discussions center on the mmap system call's performance, use cases, advantages over read(), limitations like latency and memory pressure, and best practices for high-performance I/O.

πŸ“‰ Falling 0.5x DevOps & Infrastructure
2,321
Comments
20
Years Active
5
Top Authors
#8201
Topic ID

Activity Over Time

2007
2
2008
8
2009
22
2010
26
2011
47
2012
56
2013
86
2014
117
2015
89
2016
115
2017
103
2018
132
2019
183
2020
156
2021
227
2022
198
2023
328
2024
183
2025
217
2026
26

Keywords

RAM MMU lemire.me CPU RandomAccessFile AIX NFS DPDK OS JNI mmap memory file mapped files data crate process threaded kernel

Sample Comments

rubber_duck β€’ Jun 14, 2016 β€’ View on HN

What's wrong with plain old mmap ?

throwaway81523 β€’ Aug 11, 2025 β€’ View on HN

This is one of mmap's designed-for use cases. Look at DPDK maybe.

josephg β€’ Jul 2, 2023 β€’ View on HN

Can you give some examples where mmap is useful?

Retr0id β€’ Dec 20, 2023 β€’ View on HN

mmap isn't magic, it's just one of many mechanisms for getting data off disk and into memory

jjtheblunt β€’ Jun 1, 2025 β€’ View on HN

Aren't you overlooking memory latency mattering in mmap (MMU) page miss contexts?

saagarjha β€’ Aug 9, 2025 β€’ View on HN

mmap is not free. It just moves bandwidth around.

bigdict β€’ Jan 9, 2021 β€’ View on HN

Hold up. Isn't mmap a system call?

__turbobrew__ β€’ Apr 7, 2023 β€’ View on HN

if you made something 100x faster you don’t understand how mmap works

tptacek β€’ Jul 8, 2008 β€’ View on HN

Memory mapping is not faster than read(2) for typical access patterns.

xxs β€’ Mar 31, 2018 β€’ View on HN

many applications just straight use mmap