Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I'm setting up an OpenStreetMap server with mod_tile, renderd and mapnik. My problem its low performance. The machine is set up with 8 cores and 16GB RAM.

I have 2 use cases:

  1. render_list -af -n 8 <coordinates> - renders like a wonder, all 8 cores working fully, getting the tiles is a snap

  2. renderd -f -c <path to conf> and then requesting tiles via slippymap.html equivalent in browser, then served by mod_tiles - it renders with average speed on levels 15-17 but it's getting worse on lower levels and on 10th level it's really very slow and there are white holes where 404 was given instead of tile. What's strange: out of 8 cores only 1-3 are working and mostly not at 100%. Memory usage isn't a problem also, only <0.5GB out of 16GB are used.

As render_list is working quite good, I assume that mapnik, renderd and postgres' database are working OK, but mod_tiles lags. Here is /etc/apache2/mods_enabled/tile.conf:

ModTileTileDir /var/lib/mod_tile
LoadTileConfigFile /usr/local/etc/renderd.conf
ModTileRenderdSocketName /var/run/renderd/renderd.sock
ModTileEnableStats Off
ModTileBulkMode Off
ModTileRequestTimeout 0
ModTileMissingRequestTimeout 30
ModTileVeryOldThreshold 31536000000000

ModTileCacheDurationMax 604800
ModTileCacheDurationDirty 900
ModTileCacheDurationMinimum 10800
ModTileCacheDurationMediumZoom 13 86400
ModTileCacheDurationLowZoom 9 518400
ModTileCacheLastModifiedFactor 0.20
ModTileEnableTileThrottling Off

LogLevel debug

renderd outputs standard PNGs in 8x8 metatiles. If there is something else I should post, please let me know.

Is there anything I can do to get similar performance of mod_tile's serving as I have with render_list?

share|improve this question

bumped to the homepage by Community 32 mins ago

This question has answers that may be good or bad; the system has marked it active so that they can be reviewed.

A bit late but you should include this from your database perhaps. That will show us which indexes are being used. Connect to your DB with the postgres user , and connect to the correct DB

SELECT relname, indexrelname, idx_scan, idx_tup_read, idx_tup_fetch 
FROM pg_stat_all_indexes 
WHERE schemaname = 'public' order by 1;

that output will tell us if you have indexes at all. It sounds like you don't have appropriate indexes present.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.