-
Notifications
You must be signed in to change notification settings - Fork 3.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[exception] std::bad_alloc #5367
Comments
Thanks for those infos. Reducing the RAM should have higest priority (my two-cents). I would like to disable those RAM loading ... of course distance calculation will need more time. But that's ok. 32 or 48 GB RAM is far too much. Is there no possibility to use databases or something like that ? I will not start an arguing about the RAM - i simply need a solution to run those distance calculation with lower RAM. Thanks. |
@kimjohans OSRM's approach to routing is about being very fast, especially for huge table requests. The drawback is that it requires time and resources for pre-processing. The extra memory required is a price to pay for the performance. If you want/need another trade-off with slower computation but less resources, you probably need another routing engine. |
One option that you've got now is to use the
this will cause OSRM to read data from disk on-demand. The filesystem will cache reads, so your first few queries will be slow-ish, but subsequent queries will speed up as more of the datafiles end up in the page cache. |
Really ? (1) that response is not helpful, because mostly developers (like i am too) are gald about feedback, problems and wishes to improve their software
Thank you very much for that helpful idea and trick. |
I guess I had this crazy idea that providing a bit of context might put the memory requirements into perspective. |
@kimjohans I'm with @jcoupey on this one - OSRM began as a PhD project by @DennisOSRM with the aim to demonstrate very fast routing queries on large networks - speed was the primary concern, not minimizing memory usage. That core concept has not really gone away, although we have done a lot of work to only use the minimum memory necessary to maintain performance. Just because your use-case doesn't require OSRM's best-case performance doesn't mean we should drop that capability in order to use less memory. OSRM is used in many situations where the high performance is desperately needed (situations that involve calculating hundreds of millions of routes). Also, Europe is large - there are 264,877,512 possible turns in the europe extract I'm using - it takes a lot more than 1 byte per edge to store this data in a way useful for navigation, where do you expect it all to get stored? We can't magically shrink the world. At roughly 20GB of data, that gives us about 75 bytes to store the source, target, road name, turn type, restriction information, travel speed, weight, and distance. It adds up quickly, especially when multiplied by a large network. I'm going to close this ticket, I think it's reached the end of its usefulness. |
Hi all,
on running command
osrm-routed europe-latest.osrm
i got the following error:
Of course a checked all other topics with same problems, but they all are too old (2013/2015) and have no matching solution.
It is a virtual server with 16 GB RAM, almost free:
free -h
There is no way to create an extra swap file or increase the RAM.
But, please, ... 16 GB of RAM should be enough for running the europe map.
64 GB RAM is quite unrealistic und unpayable.
Where can i disable the RAM allocation ?
Yes, the requests will be handled (much) slower, but that's ok.
I found this solution, but the code has changed since 2015 and the lines are not there any more:
#1698 (comment)
Used OS
Linux 4.15.0 #1 SMP Thu Aug 23 19:33:51 MSK 2018 x86_64 x86_64 x86_64 GNU/Linux
Ubuntu 18.04.2 LTS
Thanks !
The text was updated successfully, but these errors were encountered: