Giter Club home page Giter Club logo

Comments (10)

nilsnolde avatar nilsnolde commented on August 16, 2024

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.

from osrm-backend.

optrack2 avatar optrack2 commented on August 16, 2024

@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
Below is an example object before assembling the request to be more specific, but when I assemble a request with more than 200 points I am having this problem with the slowness of routing.

{
"latitude": -26.0922364,
"longitude": -51.6166878,
"region": 0,
},
{
"latitude": -28.9216045,
"longitude": -50.1799525,
"region": 0,
},
{
"latitude": -24.4931997,
"longitude": -46.9945173,
"region": 0,
},
{
"latitude": -26.9195567,
"longitude": -48.0988025,
"region": 0,
},

from osrm-backend.

nilsnolde avatar nilsnolde commented on August 16, 2024

/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?

from osrm-backend.

optrack2 avatar optrack2 commented on August 16, 2024

@nilsnolde
Route

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.
Regarding the region, I don't go to OSMR, I've already downloaded the complete Brazil map, so there's no need to divide and group again.

I put it to route 350 points, and it doesn't exceed 8GB, even so it's taking a long time.
Screenshot from 2024-02-19 15-19-00

from osrm-backend.

nilsnolde avatar nilsnolde commented on August 16, 2024

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 grep '^Swap' /proc/meminfo? if there's smth in there, then: when you start the osrm executable, look up its PID (process ID) and then monitor what it's using on swap file while processing one of those big requests with grep VmSwap /proc/<PID>/status.

from osrm-backend.

nilsnolde avatar nilsnolde commented on August 16, 2024

if there's no clue there, I give up:) but there's many others here with tons of more experience/knowledge on osrm.

from osrm-backend.

optrack2 avatar optrack2 commented on August 16, 2024

@nilsnolde

I listed the commands while it is doing the routing

root@srv-OSRM:~# grep '^Swap' /proc/meminfo
SwapCached: 0 kB
SwapTotal: 4096000 kB
SwapFree: 4096000 kB

root@srv-OSRM:~# grep VmSwap /proc/359/status
VmSwap: 0 kB
No problem, it's something I'm starting to tinker with now too

from osrm-backend.

danpat avatar danpat commented on August 16, 2024

@optrack2 Can you supply an example URL that someone can use to try to reproduce the issue?

from osrm-backend.

optrack2 avatar optrack2 commented on August 16, 2024

@danpat
I'm looping for each group of points.
http://192.168.1.197:5000/route/v1/driving/-48.0643025,-24.9125567;-43.0426162,-22.6604221?overview=full&alternatives=false&steps=false&geometries=polyline&annotations=false

I'm using Ubuntu 22.04, if I change to FreeBSD it may upgrade performance?

from osrm-backend.

frodrigo avatar frodrigo commented on August 16, 2024

@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

from osrm-backend.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.