I try to import berlin.osm (33Mb) into the postgres 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: 179s Node 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. Could someone give me advice what I should do that can fix it?