Hi all,
I was wondering if it is possible to get a faster response for requesting a route via the /route-custom endpoint. I am currently using graphhopper version 3.0.
My config.yml:
graphhopper:
datareader.file: planet-latest.osm.pbf # OSM input file
graph.location: graph-gh
profiles:
- name: motorcycle
vehicle: motorcycle
weighting: custom
custom_model_file: empty
- name: bike
vehicle: bike
weighting: custom
custom_model_file: empty
- name: foot
vehicle: foot
weighting: custom
custom_model_file: empty
graph.flag_encoders: foot,bike,motorcycle|turn_costs=true
graph.encoded_values: toll, surface
graph.elevation.provider: srtm
# PRODUCTION
graph.elevation.cache_dir: /data/srtm/
graph.dataaccess: RAM_STORE
server:
application_connectors:
- type: http
port: 8989
# DEVELOPMENT
# bind_host: localhost
admin_connectors:
- type: http
port: 8990
# DEVELOPMENT
# bind_host: localhost
# PRODUCTION
logging:
appenders:
- type: file
time_zone: UTC+1
current_log_filename: /data/logs/graphhopper.log
log_format: "%d{YYYY-MM-dd HH:mm:ss.SSS} [%thread] %-5level %logger{36} - %msg%n"
archive: true
archived_log_filename_pattern: /data/logs/graphhopper-%d.log.gz
archived_file_count: 7
never_block: true
- type: console
time_zone: UTC+1
log_format: "%d{YYYY-MM-dd HH:mm:ss.SSS} [%thread] %-5level %logger{36} - %msg%n"
My Java OPTS:
JAVA_OPTS="-Xmx50g -Xms40g"
A route with 4 points through the Netherlands, Spain, Croatia and Germany takes around 1 minute to calculate.
The post data of the request:
{
"priority" : null,
"profile" : "motorcycle",
"points": [
[
5.060888546692342,
52.02194174355072
],
[
-5.0900140325881695,
37.58033672669711
],
[
16.06932114914624,
44.26399668840436
],
[
12.698546113905273,
52.35620034883152
]
],
"ch_disable": true,
"points_encoded": false,
"elevation": true
}
The result:
{
"hints": {
"visited_nodes.sum": 28756208,
"visited_nodes.average": 9585403.0
},
"info": {
"copyrights": [
"GraphHopper",
"OpenStreetMap contributors"
],
"took": 46776
},
"paths": [
{...........}
Can the calculation be made faster by adjusting certain graphhopper java process settings? What do you recommend to get a faster response time?
I look forward to the response.
Greetings,
kit cat