[Geocoding] [Tile-serving] Fedora 18 ansible playbook to have mod_tile, Tirex, Nominatim, Mapnik

Sarah Hoffmann lonvia at denofr.de
Thu Mar 28 16:18:25 UTC 2013


Hi,

[I apologize for hijacking the tile list, follow-ups should
 probably go to geocoding at openstreetmap.org]

On Thu, Mar 28, 2013 at 03:33:12PM +0100, Bernard Fouché wrote:
> #
> # The copy of Nominatim includes a patch described here:
> # https://github.com/twain47/Nominatim/issues/31
> #

Would that be the --disable-token-precalc or the regexp patch?


> - name: Patch Nominatim/settings/settings.php (postgresql version
> set to 9.2)
> action: shell sed -i -e 's/9.1/9.2/'
> /data/nominatim/Nominatim/settings/settings.php
> tags:
> - osm

Yuk. You really should create a settings/local.php
and put your local changes there.

> #
> # The following tuning is supposed to be okay for a 32GB system (of
> course the tuning info didn't mention any information about the
> versions of the involved components).
> # However using F18 with 6 cores on a VM given 32GB, I've seen some
> swapping. My VM currently uses 40GB (and still swaps a bit during
> importation!)
> #
> - name: Tune postgresql.conf (step 1)
> action: shell sed -i -e 's/#* *shared_buffers.*=.*/shared_buffers =
> 24GB \# tuned by ansible (import setup)/'
> /data/pgsql/data/postgresql.conf

The wiki actually recommends 4GB. With 24GB you certainly will
run into trouble because this memory is reserved by postgres
immediately, so that there are only 8GB left for everything else.

I've seen performance figures that recommended as little as 8 MB
shared memory on tile servers. So you might have to experiment
a little bit with the setting. [1]

> - name: Tune postgresql.conf (step 2)
> action: shell sed -i -e 's/#*
> *maintenance_work_mem.*=.*/maintenance_work_mem = 10GB \# tuned by
> ansible (import setup)/' /data/pgsql/data/postgresql.conf
> tags:
> - osm

Increasing from 10GB to 16GB saved about 4h of import time for me.
However, you absolutely must decrease it to 10GB or less before 
doing the osm2pgsql import for tiles, because that runs normally 
multiple threads and consequently needs 
maintenance_work_mem*num_threads RAM.

Sarah

[1] http://www.remote.org/frederik/tmp/ramm-osm2pgsql-sotm-2012.pdf



More information about the Geocoding mailing list