This is a static archive of our old OpenStreetMap Help Site. Please post any new questions and answers at community.osm.org.

About how much disk space is expected to take an osm2pgsql import of Europe in 2021?

0

I did a osm2pgsql import of Europe (by running a switch2osm docker image) and it took ~500GB disk space. I expected to take less, because I've read a post of a guy who claimed that in 2018 it took him ~200GB. Is that normal?

asked 18 Jun '21, 13:11

ptrtdrv's gravatar image

ptrtdrv
36112
accept rate: 0%


One Answer:

1

It is to be expected. You might be able to save a little space with the "flatnodes" option. Also if you do not need to update your database later on, use the "drop" option which will only marginally reduce the disk space used during import, but can delete some unused data afterwards.

Very recent versions of osm2pgsql have also massively reduced their RAM requirements for importing without the "slim" option. If you have 96 GB RAM and latest osm2pgsql then you can import Europe without "slim" which will drastically reduce disk usage. (You can try with 64 GB but it's a gamble.)

answered 18 Jun '21, 13:50

Frederik%20Ramm's gravatar image

Frederik Ramm ♦
82.5k927201273
accept rate: 23%

Source code available on GitHub .