[OSM-talk] set up PostGIS with OSM data

Dave Stubbs osm.list at randomjunk.co.uk
Thu Apr 16 11:14:57 BST 2009


2009/4/16 Frederik Ramm <frederik at remote.org>:
> Hi,
>
> Dave Stubbs wrote:
>>
>> Somewhere between 4-5GB is required at the moment -- it increases all
>> the time though :-)
>
> Oh, then I have seriously overestimated the memory usage... I was unable to
> do Europe on a 2 GB machine so I figured the planet must require something
> like 20...
>

That's probably the way osm2pgsql uses RAM in non-slim mode. It stores
nodes by maintaining a fixed array of pointers to dynamically
allocated arrays of about 2^14 nodes with sequential IDs. So if you
have ids sparsely distributed then it allocates a lot of memory for
just a few nodes and there's a lot of wasted space.

Dave




More information about the talk mailing list