Openrouteservice ram size for Germany not enough

Hi Nils,

I have setup ORS for Germany. The .pbf file is approximately 4 GB. I supplied 20 gigs of ram and it is still stuck on locationindex, the gh.lock is gone and does not build any graphs. I tried doing it overnight. I have removed the profiles I did not need and only have the pedestrian-walk profile. When I set it up for smaller datasets like NRW, it works.

From what I read from some posts, 11 GB of ram is enough for Germany

This is my docker-compose -

Blockquote
version: ‘3’
services:
ors-app:
container_name: ors-app-ger
ports:
- 8095:8080
restart: unless-stopped
build:
context: …/
args:
APP_CONFIG: ./docker/conf/app.config.sample
OSM_FILE: ./docker/data/germany-latest.osm.pbf
volumes:
- ./graphs:/ors-core/data/graphs
- ./elevation_cache:/ors-core/data/elevation_cache
- ./logs/ors/:/var/log/ors/
- ./logs/tomcat/:/usr/local/tomcat/logs
- ./conf/app.config.sample:/ors-core/openrouteservice/target/classes/app.config
- ./data/germany-latest.osm.pbf:/ors-core/data/osm_file.pbf
environment:
- BUILD_GRAPHS=true # Forces the container to rebuild the graphs, e.g. when PBF is changed in app.conf
- JAVA_OPTS="-Djava.awt.headless=true -server -XX:TargetSurvivorRatio=75 -XX:SurvivorRatio=64 -XX:MaxTenuringThreshold=3 -XX:+UseConcMarkSweepGC -XX:+UseParNewGC -XX:ParallelGCThreads=4 -Xms18g -Xmx20g"
- CATALINA_OPTS="-Dcom.sun.management.jmxremote -Dcom.sun.management.jmxremote.port=9001 -Dcom.sun.management.jmxremote.rmi.port=9001 -Dcom.sun.management.jmxremote.authenticate=false -Dcom.sun.management.jmxremote.ssl=false -Djava.rmi.server.hostname=localhost"

And this is my config -

Blockquote
{
“ors”:{
“info”: {
“base_url”: “https://openrouteservice.org/”,
“support_mail”: “support@openrouteservice.org”,
“author_tag”: “openrouteservice”,
“content_licence”: “LGPL 3.0”
},
“services”:{
“matrix”:{
“enabled”:true,
“maximum_routes”:2000000,
“maximum_visited_nodes”:1000000000,
“allow_resolve_locations”:true,
“attribution”:“openrouteservice.org, OpenStreetMap contributors”
},
“isochrones”:{
“enabled”:true,
“maximum_range_distance”:[
{
“profiles”:“any”,
“value”:5000000
},
{
“profiles”:“foot-walking”,
“value”:10000000
}
],
“maximum_range_time”:[
{
“profiles”:“any”,
“value”:1800000
},
{
“profiles”:“foot-walking”,
“value”:360000
}
],
“maximum_intervals”:10,
“maximum_locations”:2,
“allow_compute_area”:true,
“attribution”:“openrouteservice.org, OpenStreetMap contributors”
},
“routing”:{
“enabled”:true,
“mode”:“normal”,
“sources”:[
“data/osm_file.pbf”
],
“init_threads”:1,
“attribution”:“openrouteservice.org, OpenStreetMap contributors”,
“distance_approximation”:true,
“profiles”:{
“active”:[
“pedestrian-walk”
],
“default_params”: {
“encoder_flags_size”: 8,
“graphs_root_path”: “data/graphs”,
“elevation_provider”: “multi”,
“elevation_cache_path”: “data/elevation_cache”,
“elevation_clear_cache”: true,
“instructions”: true,
“maximum_distance”: 10000000,
“maximum_segment_distance_with_dynamic_weights”: 10000000,
“maximum_distance_round_trip_routes”: 1000000000,
“maximum_waypoints”: 50000000
“maximum_avoid_polygon_area”: 20000,
“maximum_avoid_polygon_extent”: 2000,
},
“profile-pedestrian-walk”:{
“profiles”:“foot-walking”,
“parameters”:{
“encoder_options”:“consider_elevation=true|turn_costs=true|block_fords=false”,
“elevation”:true,
“preparation”:{
“min_network_size”:200,
“min_one_way_network_size”:200,
“methods”:{
“ch”:{
“enabled”:true,
“threads”:8,
“weightings”:“fastest”
},
“lm”:{
“enabled”:true,
“threads”:8,
“weightings”:“fastest,shortest”,
“landmarks”:24
}
}
},
“execution”:{
“methods”:{
“astar”:{
“approximation”:“BeelineSimplification”,
“epsilon”:1
},
“ch”:{
“disabling_allowed”:true
},
“lm”:{
“disabling_allowed”:true,
“active_landmarks”:6
}
}
},
“ext_storages”:{
“WayCategory”:{
},
“WaySurfaceType”:{
},
“HillIndex”:{
},
“TrailDifficulty”:{
}
}
}
}
}
}
},
“logging”: {
“enabled”: true,
“level_file”: “PRODUCTION_LOGGING.json”,
“location”: “/var/log/ors”,
“stdout”: true
},
system_message: [
{
active: false,
text: “This message would be sent with every routing bike fastest request”,
condition: {
“request_service”: “routing”,
“request_profile”: “cycling-regular,cycling-mountain,cycling-road,cycling-electric”,
“request_preference”: “fastest”
}
},
{
active: false,
text: “This message would be sent with every request for geojson response”,
condition: {
“api_format”: “geojson”
}
},
{
active: false,
text: “This message would be sent with every request on API v1 from January 2020 until June 2050”,
condition: {
“api_version”: 1,
“time_after”: “2020-01-01T00:00:00Z”,
“time_before”: “2050-06-01T00:00:00Z”
}
},
{
active: false,
text: “This message would be sent with every request”
}
]
}
}

I think this could be related to this issue: https://github.com/GIScience/openrouteservice/issues/696 – you can try fixing the problem by removing the quotation marks from JAVA_OPTS=… and CATALINA_OPTS=… in your docker-compose.yml.

Yeah, you’re right @mehlkopf, it is the same.

Sorry, @akudekar, this wasn’t on my radar. Please try the branch from my PR:

@mehlkopf @nils

That worked. Thank you so much for the help.