4 ms·
I think i’m missing something here, could you not just mmap() the file in and let the kernel take care of memory pressure for you?
by CraigJPerry 3y ago
I think i’m missing something here, could you not just mmap() the file in and let the kernel take care of memory pressure for you?
- sschnei8 3y agohttps://db.cs.cmu.edu/mmap-cidr2022/ https://db.cs.cmu.edu/mmap-cidr2022/
- hakunin 3y agoI'm no systems programmer, but I remember trying to research mmap approach. It's been 3 years, so I'm not sure what stopped me, but something didn't feel right. Perhaps it was the lack of control over how memory is used. I could clearly see how not use it, and didn't want any fluctuations. Edit: oh and I think I did come across some article like the one linked in the neighbor comment. It's starting to come back.
- lisper 3y agoSure -- until your system crashes and data is left in an inconsistent state because some of it was written to non-volatile storage and some of it wasn't and your OS had no concept of transactional consistency because mmap is a leaky abstraction. [UPDATE] I missed a crucial part of the problem setup, which is that the data is read-only. That obviously moots my objection.
- legulere 3y agoAnd Flatbuffers for data-layout and access.