How do speed up GraphHopper search times?

I have a GraphHopper instance set-up on a VM with JAVA_OPT set to 50GB. An entire planet.osm.pbf import took about 3.5 hours, which I am very pleased with. Although, I was wondering if there was a configuration setting to speed up search times for routes? Across country routes take 10-20 seconds to search for.

I’ve noticed that the public GraphHopper is extremely fast and I was looking for search times closer to that.

Any help would be appreciated.

From the import time it looks like you have the standard settings enabled but then the query time should be like <100ms.

So, do you use prepare.chWeighting=no?

Yes, prepare.chWeighting was set to no. I’m currently doing an import with it set to fastest.

Hmmh, but even with no it should be max like 1 or 2sec through one country or do you mean ‘continental queries’? If continental: we’ll improve there and there are some tuning options: https://github.com/graphhopper/graphhopper/issues/506

Across continent queries were taking 15-20 seconds.

prepare.chWeightings was set to none previously. Is there a difference between none and no?

Sorry my typo, should be no

Across continent queries were taking 15-20 seconds.

Yes, that is the current state, but again: see the A* tuning possibilities and we also come up with something better in the future which together will reduce a lot

Ok, to confirm. What should prepare.chWeighting be set to for fastest query times?

something which enables contraction hierarchy like fastest or shortest, ie. which is not no

Thank you! Do you know how much disk space a planet.osm.pbf file will create with a *.osm-gh folder?

Disc space is normally not an issue as it is less than the used RAM, except if you enable elevation. Roughly speaking RAM usage is like ~15GB for the base graph and if using CH you need 5-8GB for every vehicle. And if you enable elevation RAM usage increases a bit for the base graph and increases over 50GB for the disc usage (as it downloads and unpacks stuff)