Replies: 10 comments
-
OSRM is the performance monster out there. Sounds more like you have smth mis-configured. Best to share a lot more details, e.g. platform, commands to run OSRM, graph extent, endpoint (route/table?), what's the approx average distance between locations etc.? 12 mins could be the case for 200 thousand locations. "The application" (assuming you're not talking about docker but osrm-*) has no hard-coded memory limit. It loads whatever the graph size statically and dynamically whatever is needed to do the expansion (quite low). So the 8GB is probably the graph. But again, impossible to guess what's going on without more details. |
Beta Was this translation helpful? Give feedback.
-
@nilsnolde There are several different regions of Brazil, some points can be more than 2000 kilometers between them. I executed the same commands as in the documentation to run using cmake, and made the request for standard port 5000 via GET passing the coordinates { |
Beta Was this translation helpful? Give feedback.
-
/route or /table? not super familiar with osrm, but a many:many table shouldn't have a problem with that. a route with > 200 waypoints, where lots of them have multiple thousand km apart is a different story as that happens sequentially. still, 12 mins even valhalla would beat in that scenario very likely, so smth strange is going on there. are you saying that up to 200 waypoints it's quick and above that performance suddenly breaks down? also what's that "region"? are you splitting osm data? i.e. you're not building entire brazil but island-ish regions of it in a single graph? are you sure connectivity/topology is properly preserved? |
Beta Was this translation helpful? Give feedback.
-
@nilsnolde As a rule, no, as more points are added, it grows exponentially, I used it from 200 points onwards, as that's when it starts to get really bad for the user. 35 waypoints take approximately 15 seconds, 90 waypoints take just over a minute, 150 waypoints take approximately 4 minutes, and 200 waypoints take approximately 12 minutes. I put it to route 350 points, and it doesn't exceed 8GB, even so it's taking a long time. |
Beta Was this translation helpful? Give feedback.
-
the last thing that comes to my mind is possibly that it's using excessive swapping for some reason. anything else running on that machine? 12 gb should be plenty for brazil which has 1.6 gb PBF. what's the output of |
Beta Was this translation helpful? Give feedback.
-
if there's no clue there, I give up:) but there's many others here with tons of more experience/knowledge on osrm. |
Beta Was this translation helpful? Give feedback.
-
I listed the commands while it is doing the routing root@srv-OSRM:~# grep '^Swap' /proc/meminfo root@srv-OSRM:~# grep VmSwap /proc/359/status |
Beta Was this translation helpful? Give feedback.
-
@optrack2 Can you supply an example URL that someone can use to try to reproduce the issue? |
Beta Was this translation helpful? Give feedback.
-
@danpat I'm using Ubuntu 22.04, if I change to FreeBSD it may upgrade performance? |
Beta Was this translation helpful? Give feedback.
-
@optrack2 If you does not need all the route details at this computation step. Just use the table API en point, aka matrix. It is matter of seconds, or less. https://github.com/Project-OSRM/osrm-backend/blob/master/docs/http.md#table-service |
Beta Was this translation helpful? Give feedback.
-
I have an application that uses OSMR, however I would like to ask some questions regarding memory consumption and optimization.
To do the routing with more than 200 points is taking more than 12 minutes, there is a way to make it faster regardless of the amount of resources that need to be used.
And regarding memory consumption, I have 12GB of RAM available that I added later to the compilation, however the application is limited to 8GB, is there any way to increase this?
Beta Was this translation helpful? Give feedback.
All reactions