Please take http://switch2osm.org/serving-tiles/ "System Requirements" seriously. Importing a full planet doesn't need an awful lot of resources in the grand scheme of things, but you will not be able to avoid allocating enough disk space (at least 300GB for the rendering database), and multiple GBs (as in more than 8) of memory. Trying to skimp on this is a waste of your and other peoples time. answered 24 Apr '12, 13:49 SimonPoole ♦ does anyone have more than 8GB of RAM in an normal PC? IFAIK WinXP isn't able to cope with more than 2GB of RAM, is it? Does this mean, that I won't be able to set up a Postgresql/PostGIS - database of the whole planet-file on my computer? Or is there a way to osm2pgsql it? A way that maybe takes much more time and maybe more disk space but doesn't need more RAM?
(25 Apr '12, 09:59)
MHein
3
The setup that you're using** (Windows XP VM host with 2Gb of RAM hosting a Linux VM with ~1Gb RAM and ~20Gb disk) is woefully inadequate for a full planet import. However, it will allow you to become familiar with the tools involved - working out what you need to do to manage the database, using osm2pgsql to append rather than recreate (there are some list discussions on that that you can find with a web search). ** from the IRC discussion
(25 Apr '12, 10:57)
SomeoneElse ♦
|
osm2pgsql was likely killed due to being out of memory. Reduce the -C 12000 to a significantly lower number and try again. dmesg will likely show if the process was killed by the OutOfMemory (OOM) killer.
permanent link
This answer is marked "community wiki".
answered 24 Apr '12, 12:13 Firefishy ♦♦ SimonPoole ♦ In http://switch2osm.org/serving-tiles/building-a-tile-server-from-packages/ it says: Depending on the size of the extract you are importing and the performance of the computer, this can take anywhere from a few minutes for small extracts up to several days for the full planet on slower hardware! If you are importing the full planet, it is strongly recommended to set -C 12000 (may increase as the OSM database grows). Did I missunderstand it?
(24 Apr '12, 12:16)
MHein
2
No, you didn't misunderstand, but you still need enough memory or/and swap to cater for the 12 GB of node cache. If necessary add a swap file of appropriate size.
(24 Apr '12, 12:22)
SimonPoole ♦
how can I add a swapfile of appropriate size? How much memory on disk do I need for the Postgresql Database including the planet.osm-file? And how is "dmesg" used?
(24 Apr '12, 12:46)
MHein
|
Not an answer but a question - just checking that you really do want to import the whole planet, i.e. you want to render a map of the world, not a small part of it?