NOTICE: help.openstreetmap.org is no longer in use from 1st March 2024. Please use the OpenStreetMap Community Forum

Hey Guys!

When trying to import the planet-latest.osm via osm2pgsql into PostGIS I receive the following problem.

http://dpaste.org/ftsj8/

Can anybody guess, how to solve it?

Greetings, Matze

asked 24 Apr '12, 11:06

MHein's gravatar image

MHein
141111116
accept rate: 0%

edited 29 Aug '13, 11:40

MagicFab's gravatar image

MagicFab
935101622

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?

(24 Apr '12, 13:14) SomeoneElse ♦

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.

permanent link

answered 24 Apr '12, 13:49

SimonPoole's gravatar image

SimonPoole ♦
44.7k13326701
accept rate: 18%

edited 24 Apr '12, 14:00

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's gravatar image

Firefishy ♦♦
1.3k73652
accept rate: 29%

edited 24 Apr '12, 13:40

SimonPoole's gravatar image

SimonPoole ♦
44.7k13326701

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
Your answer
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Question tags:

×263
×196
×165
×134
×56

question asked: 24 Apr '12, 11:06

question was seen: 13,492 times

last updated: 29 Aug '13, 11:40

NOTICE: help.openstreetmap.org is no longer in use from 1st March 2024. Please use the OpenStreetMap Community Forum