[OSRM-talk] Swap file

Sayer, Bryan BSayer at s-3.com
Wed Feb 13 15:03:05 UTC 2019


My experience is probably with a slightly older version of OSRM, but I found that you have to have actual physical RAM (like 64G) to do the map extract. Creating a big swap space isn't sufficient. Some people advise doing the extract on an AWS cloud computer.


Bryan Sayer

________________________________
From: "Thomas Rothenb?cher" <t.rothenbaecher at gmx.de>
Sent: Wednesday, February 13, 2019 9:55:47 AM
To: osrm-talk at openstreetmap.org
Subject: [OSRM-talk] Swap file

Hello everyone,

I would like to run osrm on my local machine on a 2.9G osm-file (namely Germany). As my machine does not have enough resources I would like to provide a swap file, which I did with:

(as root in root directory)

(mkdir /path/to/)
fallocate -l 10G /path/to/swapfile
chmod 600 /path/to/swapfile
mkswap /path/to/swapfile
swapon /path/to/swapfile

still after about 40 minutes into osrm-extract I got (full logs of osrm-extract):

./osrm-extract -p profiles/car.lua germany-latest.osm.pbf
[info] Parsed 0 location-dependent features with 0 GeoJSON polygons
[info] Using script profiles/car.lua
[info] Input file: germany-latest.osm.pbf
[info] Profile: car.lua
[info] Threads: 1
[info] Parsing in progress..
[info] input file generated by osmium/1.8.0
[info] timestamp: 2019-02-12T21:14:02Z
[info] Using profile api version 4
[info] Found 3 turn restriction tags:
[info]   motorcar
[info]   motor_vehicle
[info]   vehicle
[info] Parse relations ...
[info] Parse ways and nodes ...
[info] RAM: peak bytes used: 4516651008
[error] [exception] std::bad_alloc
[error] Please provide more memory or consider using a larger swapfile

As I was monitoring my memory usage over top I could see that there was a lot of swap space left.


My .stxxl-file (located inside the folder where I executed osrm-extract):

disk=/path/to/swapfile,9000,syscall



I'm running Ubuntu 18.04 (in a VM) with 5GB of RAM and a Disk of 30 GB.

So I probably missed something somewhere.
Would would you recommend? Can I even hope to use libosrm on germany with these resources?

Any assistence is greater appreciated.

Thank you!





****WARNING**** This information may be confidential. It is intended only for the addressee(s) identified above. If you are not the addressee(s), or an employee or agent of the addressee(s), please note that any dissemination, distribution, or copying of this communication is strictly prohibited. If you have received this information in error, please destroy the information and notify the sender of the error. Thank you.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstreetmap.org/pipermail/osrm-talk/attachments/20190213/cca73cf3/attachment.html>


More information about the OSRM-talk mailing list