inb4 some smartass says mmap is the second coming.
I've been burned every which way using mmap. only use it when you identify a specific case that is sped up. a few examples that have worked are: linear indexes that involve a lot of seeks. fancy memory configurations like transparent ring buffers. loading executable code...
trouble starts when you do multi process sync, interact with networked filesystems, windows, or green threaded runtimes
Related:
Are you sure you want to use MMAP in your DBMS? - https://news.ycombinator.com/item?id=39321038 - Feb 2024 (72 comments)
Are You Sure You Want to Use MMAP in Your Database Management System? (2022) - https://news.ycombinator.com/item?id=36563187 - July 2023 (177 comments)
Are You Sure You Want to Use MMAP in Your Database Management System? [pdf] - https://news.ycombinator.com/item?id=31504052 - May 2022 (43 comments)
Are you sure you want to use MMAP in your database management system? [pdf] - https://news.ycombinator.com/item?id=29936104 - Jan 2022 (127 comments)
Also:
Async hazard: MMAP is blocking IO - https://news.ycombinator.com/item?id=41312124 - Aug 2024 (115 comments)
But how, exactly, do databases use mmap? - https://news.ycombinator.com/item?id=25881911 - Jan 2021 (115 comments)
Why mmap is faster than system calls (2019) - https://news.ycombinator.com/item?id=25701959 - Jan 2021 (203 comments)
Why mmap is faster than system calls (2019) - https://news.ycombinator.com/item?id=24842648 - Oct 2020 (78 comments)
Use mmap with care - https://news.ycombinator.com/item?id=19805675 - May 2019 (213 comments)
Mmap(2) - https://news.ycombinator.com/item?id=10568921 - Nov 2015 (22 comments)
The mmap pattern - https://news.ycombinator.com/item?id=7678178 - May 2014 (46 comments)
Why not mmap? - https://news.ycombinator.com/item?id=2562800 - May 2011 (25 comments)
inb4 some smartass says mmap is the second coming.
I've been burned every which way using mmap. only use it when you identify a specific case that is sped up. a few examples that have worked are: linear indexes that involve a lot of seeks. fancy memory configurations like transparent ring buffers. loading executable code...
trouble starts when you do multi process sync, interact with networked filesystems, windows, or green threaded runtimes