osrm-backend icon indicating copy to clipboard operation
osrm-backend copied to clipboard

problem on osrm's runtime memory usage

Open linxinyaooo opened this issue 3 years ago • 3 comments

Hi, I run osrm locally with berlin.osm.pbf (71MB) and runtime memory usage is 74MB . With brasil.osm.pbf(1.4G), runtime memory usage is 6.4G and I want to know is memory usage related to osm file size? and why?

linxinyaooo avatar Aug 16 '22 11:08 linxinyaooo

to me that sounds like brazil has a huge percentage of routing-relevant data in OSM (compared to all the objects osrm would ignore, like buildings), while berlin is the other way around (it's very densely mapped).

yes, it's kinda linear (linear with respect to routing-relevant data size) but it really does depends what objects are inside the extracts.

nilsnolde avatar Aug 16 '22 11:08 nilsnolde

to me that sounds like brazil has a huge percentage of routing-relevant data in OSM (compared to all the objects osrm would ignore, like buildings), while berlin is the other way around (it's very densely mapped).

yes, it's kinda linear (linear with respect to routing-relevant data size) but it really does depends what objects are inside the extracts.

thanks for your reply. and do you know graphhopper? in the same configuration, the memory of graphhopper using Berlin's data is 1.13-2.71G, I wonder why their memory usage is so different with berlin.osm.pbf

linxinyaooo avatar Aug 17 '22 02:08 linxinyaooo

That’s comparing apples and bananas though. GH has lets you use a few different algorithms with the same server instance which requires multiple graphs. It’s full of configuration and generally has a smaller memory footprint than osrm. Look at Valhalla, you can run the whole world on a few GB. It always depends on the use case which one fits best.

nilsnolde avatar Aug 17 '22 06:08 nilsnolde