NOTICE: help.openstreetmap.org is no longer in use from 1st March 2024. Please use the OpenStreetMap Community Forum

Rendering tiles during server idle

I haven't found any related question so far, so I am now going to ask in this QA.

I have a tile server configured using mapnik / renderd / mod_tile / apache and postgresql and most of the time the machine remains idle. But when a user requests a not cached tile or more likely a bunch of new tiles it takes the machine a couple of seconds to render them. As I intend to not update my osm database that often, I think it would be a performance gain if the server spawns a process that renders and caches some tiles during the idle time. As I don't need to update my database that often and I just have a single country in my database, the cachesize would certainly stay in a small gigabyte range. Does any of the programs I use (e.g. mod_tile) provide such a function or is there any other way the idle rendering task could be done?

asked 15 Jun '15, 13:19

ltsstar's gravatar image

ltsstar
66227
accept rate: 0%


If you were to change from renderd to tirex, then you can use tirex-batch to batch render tiles even when no-one is looking at them. This means that while your server is idle, it'll be rendering and saving tiles, and if someone requests a tile later, that prerendered tile will be returned, rather than on-the-fly calculation.

permanent link

answered 17 Jun '15, 17:05

rorym's gravatar image

rorym
5.4k1449100
accept rate: 11%

I couldn't find renderd instructions on the wiki, but the alternative tirex backend performs the same task of handling rendering jobs queues. In principle, all you need to do is start a batch-rendering of the tiles you want, using a low priority so that it doesn't interfere with live browser requests. See also update strategies.

permanent link

answered 15 Jun '15, 17:47

Vincent%20de%20Phily's gravatar image

Vincent de P... ♦
17.3k18152249
accept rate: 19%

edited 17 Jun '15, 17:08

SomeoneElse's gravatar image

SomeoneElse ♦
36.9k71370866

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Question tags:

×440

question asked: 15 Jun '15, 13:19

question was seen: 4,217 times

last updated: 17 Jun '15, 17:08

NOTICE: help.openstreetmap.org is no longer in use from 1st March 2024. Please use the OpenStreetMap Community Forum