Basically, mmap is very smart about memory usage. You map a file to memory using mmap, and only the bits of the file that you actually read get into memory. And even better, if multiple processes mmap the same file, it's the same area of memory. When you write to that RAM, mmap won't immediately write to disk, it may hold onto that version of things for a while.
- mmap for a single process can reduce disk I/O. If you change the same block twice, it's possible it only gets written to disk once.
- mmap can save physical memory, because only blocks you access get read into memory. (which could be an disk I/O savings, too)
- mmap is totally awesome if you have multiple processes using the same file via mmap. They share a single copy in memory of that file. This can be used for interprocess communication, and is how shared libraries on Linux only use a single copy of the library in memory.
The only way to be certain is to test (benchmark), but I would expect mmap to work for session handling, as long as you handle locking properly.