Tirex and Renderd - What's the difference?
The main difference between the classic renderd and Tirex is that in Tirex, the actual rendering and the queue management are strictly separate. You have one daemon which only manages requests and queues and priorities and all that, and you have another set of daemons that do nothing but tile rendering. Communication between these is done using UDP. Tirex does not use multithreading at all - everything is either multiplexing inside one process, or multiprocessing.
Unlike renderd, Tirex only supports metatile rendering, not rendering of individual tiles (in renderd this is a compile flag).
But Tirex has many more option and lots of very flexible helper programs.
Making the switch from Renderd to Tirex
A few things to note:
- By default, Tirex stores its tiles in /var/lib/tirex/tiles (not /var/lib/mod_tile), but you can use symlinks or change the config. The tile cache has the same format so you can keep using it.
- The classic renderd would normally run under the www-data user. Tirex uses its own user id, tirex, by default. This means that you must make sure that tirex has write permission to your existing tile directory, and if you have set up PostGIS access permissions in a way that allows only the Unix user www-data to connect, you will have to modify that as well.
Switching from mod_tile/renderd to Tirex is reasonably easy:
- Install the Tirex system including the Mapnik backend.
- Edit /etc/tirex/tirex.conf to suit your needs and file locations, you have to at least configure the modtile_socket_name to be the same location thats used in the mod_tile config.
- Edit /etc/tirex/renderer/mapnik.conf.
- Create the map config in /etc/tirex/renderer/mapnik/yourmapname.conf and fill in the information used in your mod_tile/renderd config.
- Stop the old renderd
- chown -R tirex:tirex the tile directory or make otherwise sure that the tirex user has write access there.
- Start the tirex-backend-manager and tirex-master