4 ms·
But then it's pretty much the same as using the old version and turning on swap, so I don't really see the point. As far as I understand the whole model needs t
by chpatrick 4y ago
But then it's pretty much the same as using the old version and turning on swap, so I don't really see the point. As far as I understand the whole model needs to be read constantly so there's no benefit from the random access mmap provides.
- sitkack 4y agoSwap is a system level property not a program level property. They are similar, use similar mechanisms, but the experience that a user would see are very different.
- chpatrick 4y agoI'm not sure it would be that different but mmap has the benefit that it can swap directly to the model file on the disk instead of making a copy in swap space.
- sitkack 4y agommap is like tightly scoped, targeted swap. If the PoR is on disk, the OS is free to reclaim that memory for something else at anytime. It really is a beautiful hack, but if you turn on swap for the system in that way, it has to balance memory usage across all the running programs. In this use of mmap, there is nothing to swap out as the source of truth is always on disk. During general swap usage, memory has to travel in both directions.