When I try to import planet-latest.osm.pbf I get the following error:
/usr/local/bin/osm2pgsql --create --flat-nodes --slim --username postgres --password --hstore --hstore-match-only --number-processes 6 --cache 50000 --style default.style --input-reader pbf planet-latest.osm.pbf
osm2pgsql SVN version 0.89.0-dev (64 bit id space)
Using built-in tag processing pipeline
Using projection SRS 900913 (Spherical Mercator)
Setting up table: planet_osm_point
Setting up table: planet_osm_line
Setting up table: planet_osm_polygon
Setting up table: planet_osm_roads
Allocating memory for dense node cache
Allocating dense node cache in one big chunk
Allocating memory for sparse node cache
Sharing dense sparse
Node-cache: cache=50000MB, maxblocks=800000*65536, allocation method=3
Mid: Ram, scale=100
Reading in file: planet-latest.osm.pbf
Using PBF parser.
Processing: Node(3095464k 2705.8k/s) Way(53703k 29.11k/s) Relation(0 0.00/s)Killed
Here is the message I get from dmesg:
Out of memory: Kill process 23636 (osm2pgsql) score 953 or sacrifice child
Killed process 23636 (osm2pgsql) total-vm:75687764kB, anon-rss:60639884kB, file-rss:0kB
do I need more that 50GB RAM to import the planet file?
asked 12 Nov '15, 15:42

khamooshi
146●11●12●19
accept rate: 50%
edited 13 Nov '15, 14:54

Lightsider
1.5k●5●21●29
Actually I have 60GB RAM, and I assigned 50GB. I also tried with 40GB, same thing happened!
... and I think (based on the fact that you've asked other questions about rendering) that other (smaller) imports have worked OK in the past?
I didn't set up the other severs, so I don't know how they did it! btw, I use --flat-nodes and different projection.