[GTALUG] optimum swap size

John Sellens jsellens at syonex.com
Wed Feb 27 12:21:19 EST 2019


Note that if you mmap() a file, it has no direct impact on swap usage.
(Because the actual file is effectively the backing store.)

This might be a helpful read:

    https://stackoverflow.com/questions/43541420/when-and-how-is-mmaped-memory-swapped-in-and-out

Hope that helps!

John


On Wed, 2019/02/27 11:47:59AM -0500, Gary via talk <talk at gtalug.org> wrote:
| Thank you. My intent (haven't done it yet) is to use mmap() in c++ for a
| very large file (2 gigs). I suspect that the virtual memory technology in
| x86 would simply page in/out file data to/from ram using the least recently
| used algorithm. Would the swap partition size be material here or am I
| worrying unnecessarily.
| /gary


More information about the talk mailing list