For testing purposes we set up up a PostGIS server containing planet.osm. == PostGIS Server == The server runs on atlantis, a pgAdmin frontend is running at http://atlantis.informatik.privat/pgadmin4/. The OSM data is in database osm. == Converting OSM to PostGIS == To import planet.osm, we use {{{osm2pgsql}}}. Several things have to considered to import planet.osm without running out of memory or time. The following command is used to import {{planet.osm}}: {{{ osm2pgsql -c -d osm -C 60000 --slim --flat-nodes /local/data/postgresql/flatnodes /local/data/brosip/planet-latest.osm.pbf }}} {{-C 60000}} sets the node cache to 60000 MB (don't use more, atlantis has 95 GB of RAM, and {{osm2pgsql}} will use additional RAM for other stuff). Lower values will increasingly impact the performance to a point where the import will take several months (this is the case with default parameters). {{-c}} means that the database tables are created if missing {{-d]} specifies the database to use {{--slim}} will take much longer, but externalizes some stuff to the disk and to the database itself. Without {{--slim}, you will quickly run out of RAM. {{--flat-nodes}} is a file to which parts of the node cache are externalized. This file has to local (e.g. ``/local/data``), the performance will be abysmal over NFS. After much experimentation, Patrick achieved throughputs of around 5M nodes per second and 82k ways per second.