Project-OSRM / osrm-backend

Open Source Routing Machine - C++ backend
http://map.project-osrm.org
BSD 2-Clause "Simplified" License
6.18k stars 3.29k forks source link

Which files are needed for MLD table API #5974

Open rnarayana opened 3 years ago

rnarayana commented 3 years ago

I have requirement to only run table API, and need to optimize the RAM requirements. I have the NA datasetand processed with OSRM 5.24, and I can see that ~40GB of RAM is used on startup. There are the files I have, and their sizes. Is there any scope for optimization by excluding any files, considering I will run only table API? (I saw a similar thread for CH)

  0K - north-america-latest.osrm                           # Replaced with empty file
 17G - north-america-latest.osrm.cell_metrics
112M - north-america-latest.osrm.cells
 68K - north-america-latest.osrm.datasource_names
1.7G - north-america-latest.osrm.ebg_nodes
1.8G - north-america-latest.osrm.edges
5.7G - north-america-latest.osrm.fileIndex             # I read this is not loaded into RAM
6.3G - north-america-latest.osrm.geometry
1.1G - north-america-latest.osrm.icd
6.5K - north-america-latest.osrm.maneuver_overrides
6.4G - north-america-latest.osrm.mldgr
 56M - north-america-latest.osrm.names
3.3G - north-america-latest.osrm.nbg_nodes
1.1G - north-america-latest.osrm.partition
6.0K - north-america-latest.osrm.properties
 24M - north-america-latest.osrm.ramIndex
3.5K - north-america-latest.osrm.timestamp
 16K - north-america-latest.osrm.tld
 30K - north-america-latest.osrm.tls
525M - north-america-latest.osrm.turn_duration_penalties
525M - north-america-latest.osrm.turn_weight_penalties
jcoupey commented 3 years ago

This is somehow similar to #5838. Being able to switch off using some of the files would be ideal to lower RAM consumption for specific use-cases.

From what I can tell, there is no easy way to achieve a "don't load that file" effect. I remember trying to fiddle with the loading code to simply do this but there are many intricacies within the various plugins that make use of the loaded files.

This is something I'd be able to spend some time on, if anyone with a better knowledge of the codebase could give any pointers, or ideas for a better approach!

github-actions[bot] commented 2 days ago

This issue seems to be stale. It will be closed in 30 days if no further activity occurs.