Difference between MMAP and RAM STORE

What are the differences between RAM STORE and MMAP STORE? I understand that RAM just loads the entire graph into the memory, but what about MMAP? does it load use the memory as a cache and loads and unloads data from the disk to the memory on demand?

Yes, done via the operating system its memory mapping.

Does this graph.dataaccess setting apply both when building the graph (-a import) and also after the build phase, when executing (-a web)?

If both, since MMAP impacts performance and the build phase is the most memory hungry , for servers with limited resources one can build using MMAP but then run with RAM_STORE. Make sense right?

I reply myself to my dummy question: YES

Actually, out of memory errors prevented me to build all Europe (two veichles / fastest / 0.13) with 15GB and dataaccess set to RAM_STORE. But I succeed with (just) 8GB in MMAP mode. After the build phase, I switched back to RAM_STORE and launched Graphhopper ( JAVA_OPTS 15GB): it works like a charm, as fast as expected :slight_smile:

1 Like