Renderd, PosgreSQL Tuning?

I have full planet data imported into PostgreSQL-9.1 and am using mapnik to render tiles (via the renderd process). I’m noticing that often the renderd process will take so long that the map tiles fail to load in the browser. I verified that renderd doesn’t have any errors while processing, it just takes a long time to write the data to a .meta file.

The system I have is running CentOS, 8 cores, 32 GB RAM so I’m a bit confused as to why it’s taking so long. The only thing I can think may be an issue are the database settings:


vi /var/lib/pgsql/9.1/data/postgresql.conf

shared_buffers = 1024MB
checkpoint_segments = 20
maintenance_work_mem = 512MB
autovacuum = off

At this point the only way around this seems to pre-render many layers ahead of time so things load faster.

Any ideas?

Thanks,
Joe

feeding an internet serch engine with words like “osm posgis tuning” or similar gives some hints … e.g. https://wiki.openstreetmap.org/wiki/User:Species/PostGIS_Tuning

What’s your work_mem at? Set it to at least 32MB, maybe even 64MB. It will allow many operations (like sorts) to happen in memory instead of being pushed out to temporary disk based storage in postgresql.