I have postgresql for rendering map tiles with Mapnik. I am importing whole europe OSM data(pbf) with osm2pgsql tool.
My system:
Ubuntu 12.04 LTS
osm2pgsql SVN version 0.85.0 (64bit id space)
(PostgreSQL) 9.1.3
4 cores , 3.3GHz processor
plain HD discs
8Gb RAM memory + 8GB swap memory
file to import: europe-latest.osm.pbf(12.4Gb)
postresql.conf I have the following settings:
work_mem = 32MB
maintenance_work_mem = 128MB
fsync = on
synchronous_commit = off
I compiled osm2pgsql from source:https://github.com/openstreetmap/osm2pgsql.git
My osm2pgsql parameters:
sudo -u postgres osm2pgsql --database gis2 --username postgres --slim --cache 7000 --password --style /usr/bin/default.style europe-latest.osm.pbf
Now import is runned about 20 hours. Processing nodes went with 139k/s speed. that is OK. Processing way is abnormally slow. Only 0.13k/s. I roughly calculated that with that speed this phase would take about 12 days to complete.
Processing: Node(1123276k 139.4k/s) Way(8076k 0.13k/s) Relation(0 0.00/s)
qis2 database size on disc is now about 80Gt.
I this slow speed to be anticipated or is there something wrong with my system/settings? Should I restart import with other settings?
I am trying to import whole europe file because slim import of individual countries did not succeeded in slim&append mode. Probably not possible to import large countries with my 8Gb RAM without slim.
Thanks for your time!
Juha