OSM (OpenStreeMap) planet.osm statistics

I’ve recently started importing the planet.osm file into a postgresql database using the osm2pgsql utility. When I started I couldn’t find any up-to-date statistics on the number of primitives in the database to estimate the time it would take so I’ve posted them here. I’m running on a machine with only 2GB RAM allocated under VMWare and a slow 7200RPM 1TB drive and it looks like the process will take around 5 days to complete. The final stages of creating indexes on the tables seems to be taking as long as the initial import.

Reading in file: /home/mapnik/osm/planet-090916.osm.bz2
Processing: Node(434807k) Way(33142k) Relation(212k)
Node stats: total(434807934), max(497541099)
Way stats: total(33142281), max(40900619)
Relation stats: total(212012), max(253016)

4 thoughts on “OSM (OpenStreeMap) planet.osm statistics

  1. Thanks for sharing that info.
    Trying to do same thing. Not in native Linux, with 8Gb of RAM. But it seems that osm2pgsql is limited, in the slim mode, to use just 3GB of RAM. The slim mode of osm2pgsql was needed because system is x32. The kernel was built to enable access to all 8GB (i.e. memory access is x64), but when osm2pgsql was ran in regular mode (without -s) it was crashed due to mem allocation problems.

  2. Hi Eugine, when I was first looking at it I recall seeing a reference to needing 12GB of physical RAM to import all of planet.osm without using slim mode. I think that comment was about 12 months old and the data has been expanding rapidly due to the fine work of all the contributors, so now you may need more like 16GB of RAM to avoid needing slim mode.

    Originally I was thinking I’d keep an up-to-date master copy of the virtual machine I could distribute to end-users and they could process the updates at their end once they had installed it. Applying all of the weekly updates for the entire planet.osm file looks like it will involve too much overhead when most are only after limited areas, I might revert back to just importing countries that are required. It will also give me a smaller dataset for development and testing, for example I should be able to load a local map tile server for street maps of Australia on my laptop.

Leave a Reply

Your email address will not be published. Required fields are marked *

*