I try to import berlin.osm (33Mb) into the PostgreSQL database 9.1 via osm2pgsql. My desktop is mem 2Gb,proc 2Ghz,hdd 60Gb, RHEL6u2x64. This process is so slowly in particular when I'm going over pending ways. I see this:
osm2pgsql SVN version 0.80.0 (32bit id space)
osm2pgsql -M -d berlin -s -S "/usr/share/osm2pgsql/default.style" -U "postgres" -W -H "localhost" -P 5432 "/opt/maps/berlin/berlin.osm.bz2"
Processing: Node(1644k 49.8k/s) Way(304k 12.17k/s) Relation(6337 52.37/s) parse time: 179sNode stats: total(1644720), max(1968785138) in 33s Way stats: total(304296), max(186177757) in 25s Relation stats: total(6337), max(2504060) in 121s Committing transaction for planet_osm_point Committing transaction for planet_osm_line Committing transaction for planet_osm_polygon Committing transaction for planet_osm_roads
Going over pending ways
Using 1 helper-processes processing way (10k) at 0.11k/s processing way (195k) at 0.11k/s All child processes exited
Pending ways took 1719s at a rate of 114.01/s Committing transaction for planet_osm_point Committing transaction for planet_osm_line Committing transaction for planet_osm_polygon Committing transaction for planet_osm_roads
Going over pending relations
Using 1 helper-processes
All child processes exited
Committing transaction for planet_osm_point Committing transaction for planet_osm_line Committing transaction for planet_osm_polygon Committing transaction for planet_osm_roads Sorting data and creating indexes for planet_osm_point Sorting data and creating indexes for planet_osm_line Sorting data and creating indexes for planet_osm_polygon node cache: stored: 1644720(100.00%), storage efficiency: 66.93% (dense blocks: 60, sparse nodes: 1597241), hit rate: 100.00% Sorting data and creating indexes for planet_osm_roads Stopping table: planet_osm_ways Building index on table: planet_osm_ways (fastupdate=off) Stopping table: planet_osm_nodes Stopping table: planet_osm_rels Building index on table: planet_osm_rels (fastupdate=off) Stopped table: planet_osm_nodes in 0s Stopped table: planet_osm_rels in 1s Indexes on planet_osm_roads created in 5s Completed planet_osm_roads Indexes on planet_osm_line created in 21s Completed planet_osm_line Indexes on planet_osm_point created in 26s Completed planet_osm_point Stopped table: planet_osm_ways in 31s Indexes on planet_osm_polygon created in 31s Completed planet_osm_polygon
Osm2pgsql took 1931s overall
I used the next parameters in my postgresql.conf :
shared_buffers=512Mb temp_buffers=16Mb work_mem=64Mb maintenance_work_mem=128Mb
When I checked it on the Windows desktop it acceptable worked, but if I started it on my Linux system I have a problems with a import perfomance. What should I do that can fix it?
make install. The files you mention is source code and source headers which are used to build it and after that do not serve a purpose. After that, just use it like you used to do it, there should be no difference – Glenn Plas Dec 30 '12 at 14:09