I can now definitively answer my question: yes!, you can load the whole of Europe
- and thus likely the entire planet - on a minimalistic 12GB RAM virtualbox VM.
In order to finally succeed though, I had to overcome two more crashes. Both were likely caused by the fact I used two osm2pgsql settings that, unless you have the resources, are probably best left to osm2pgsql: the ā-Cā cache option, and āānumber_processesā. Once I removed both of these from my command line statements, osm2pgsql happily chugged along and imported the data without issue.
So, what did I learn from all of this?:
- Yes, it is possible to load the Geofabrik Europe extract (and likely planet as well as it is just about 2-3 times bigger) on a low RAM device.
- It is vital to use the āāflat-nodesā option to not run out of RAM and instead use disk space to store the nodes (cache). You cannot process this amount of data (Europe) in memory. So ignore warnings that are listed on some web pages that āāflat-nodesā should only be used āfor the whole planetā: if you donāt have the RAM, use āāflat-nodesā, it is your only option anyway without enough RAM.
- Donāt try to be smart like I did by setting the ā-Cā cache option or āānumber_processesā parameters, instead, leave it to osm2pgsql to figure out its optimal processing settings, it seems to do a reasonable job!
1 Like