Documentation on the different values of graph.dataaccess?

Hello!
I’m reading through the docs on the github and I’ve realized that there isn’t any documentation on the different values of graph.dataaccess and that they mean. Why is RAM_STORE the best, and what are the other values and their usecases?

I perused the codebase and also found these threads on the matter:

But I’d like a definitive or concusive answer. Happy to add this to the docs if I’m answered.

There is some documentation here: graphhopper/core/src/main/java/com/graphhopper/storage/DAType.java at 116586191332ef94e4aceee5b93115af140bc096 · graphhopper/graphhopper · GitHub

The difference between RAM and MMAP is basically that the former uses memory from the Java heap while the latter uses memory outside of the heap. As long as there is sufficient memory the performance difference will be rather small (RAM usually being a bit faster), but if the memory is limited the JVM will crash if you use RAM while using MMAP the OS might start swapping data between the disk and memory making the process much slower but keeping it alive. Whether or not this is acceptable depends on what you are doing, but typically it is useful for data that is read rather seldomly.

1 Like

There is also this blog post that describes this a bit.

1 Like