-
Notifications
You must be signed in to change notification settings - Fork 3.5k
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
How can I make osrm-datastore to use swap memory? #5182
Comments
I modified
It worked successfully.
This is the output of but when I execute
I get an error like the above. IMHO, I think it makes sense to be able to use RAM costs a lot! (; - ;) Please give me some help! |
Check out https://github.com/Project-OSRM/osrm-backend/wiki/Running-OSRM if you fallocate, mkswap, and swapon it should get used automatically if it's large enough. That said, you are throwing away all benefits from the datastore if the data is layed out on disk. You don't need the datastore at all in this use case. |
Thank you for your answer! But that's not my point. What I want is osrm data always remains regardless the state of osrm-routed or the alternative server using the data. Am I understanding it not properly? |
@dolsup In #4881, @TheMarex added a feature to allow using mmap instead of loading files into memory. Use it by doing the following:
What this will do is allocate a large file, copy the routing data into it, then Over in https://github.com/Project-OSRM/osrm-backend/tree/ghoshkaj_mmaperize, we're doing some small refactors to make the use of the scratchfile unnecessary (the I'm honestly not sure why
only logs a warning if Keep your eye on the |
@danpat I thank you a lot for your kind comment. FYI, I'm sure that I had enough swap space when I executed And I'll keep following |
OSRM version: 5.18.0
I successfully ran
osrm-extract
andosrm-contract
for planet-latest with only 122GiB RAM and 100GB swap memory and now I finally have complete osrm files although it was a long long time. I also could executeosrm-routed
on just 1GB RAM and 100GB swap. It started listening after about 2 hours but It works well and API response is fast enough to me.And now I'm trying to substitute
osrm-routed
with my own Node.js server usingosrm
node module and to use shared memory withosrm-datastore
for fast deployment and clustering of the server app. butosrm-datastore
seems not to use swap memory at all.So I searched and found a comment on an issue(#2123) but I can't track the code link on the comment because it's broken and I'm not sure that is true at now.
How can I make
osrm-datastore
to use swap memory? Should I edit some code and build it for myself? Is there any other solution?The text was updated successfully, but these errors were encountered: