120 Commits

Author SHA1 Message Date
5cf79c858b automatically add new munin plugins to munin if these packages are installed on a system that has munin on it.
if anyone knows how to make it so that the plugins get activated when a munin-node is installed *later*, that
would obviously be even cooler!
0.2
2009-10-20 18:01:26 +00:00
455d4bd3c4 fix typo for reqBulkNum in new queue 2009-10-02 22:56:07 +00:00
ef560f5bb0 .deb fix for mod_tile 2009-09-30 08:48:13 +00:00
ef5232d850 [ renderd munin ] Update renderd munin to show the new queues 2009-09-18 22:15:59 +00:00
54c5306295 [mod_tile / renderd] Add two more priority levels into the queues of renderd
In addition to the request queue and the dirty queue, there are now also a requestPrio and requestBulk queue.
The rendering order now is first render requests from requestPrio, then from request followed by the
dirty queue and finally if no other requests are queued, render from the requestBulk queue.

RequestPrio, Request and RequestBulk all block, whereas Diry immediately returns with NotDoneYet.

This also changes mod_tile to submit requests that if not rendered in time would result in 404 errors as high priority.

prioBulk should be useful for things like rerendering all the outdated tiles in the background, but this patch
does not include those changes.
2009-09-18 21:45:58 +00:00
76aee081f9 Update mod_tile to open & close connection to renderd on each rendering request. This helps the scalability since otherwise renderd runs into select() limits at around 1000 Apache threads. Typically about 1 in 100 HTTP requests triggers a call to renderd. 2009-09-16 20:11:53 +00:00
9728189c3d make render_old skip [renderNN] too 2009-09-05 22:22:48 +00:00
bd8a0fd151 mod_tile: Skip mapnik & renderd sections when reading config file, these are for config and are not tile layers. 2009-09-05 21:36:17 +00:00
f4544b0959 Fix renderd font_dir_recurse parameter 2009-09-05 21:31:41 +00:00
3e4edd0762 mod_tile: move stats calculations in render_old to main thread to avoid possible race conditions. 2009-09-04 20:57:27 +00:00
8c92d294cb render_old: fix trivial leak of file handle 2009-09-04 20:43:56 +00:00
83c3bde906 Update render_old to split condition variables used to indicate queue empty / full to avoid unnecessary wakeups 2009-09-04 20:40:22 +00:00
87482232cc Update render_old to use multi-threaded rendering requests. 2009-09-04 20:09:59 +00:00
a3d1b54a38 [ renderd ] Bug fix 32 bit / 64 bit issue
When calculating the the intermediate hashkey I incorrectly assumed long was 64 bit. This meant that the hashkey could turn negative
which in turn would cause a segfault on array access.

Thanks to Richard Ive for spotting and debugging this error.
2009-09-03 13:46:15 +00:00
da1981135b [renderd] Use a hashtable index to determine pending rendering requests
By eliminating the linear look up of the dirtyQueue for every newly added rendering request, it should be possible
to significantly increase the length of the dirty rendering queue. At the moment the queue length is set to 1000 metatiles,
which at a typical rate of 2 - 3 metatiles a seconds is a buffer of only 5 - 10 minutes. With a much longer
queue, the excess daytime requests can be moved into the quieter night time hours, which could improve the overall long-term
throughput if the server is at its limit of what it can handle.

All operations on the dirty queue should now be O(1).
2009-08-29 18:39:48 +00:00
99716f89af [mod_tile munin] changed mod_tile munin plugin to not use a local file as a temporary variable 2009-08-29 09:10:09 +00:00
8d75038943 [renderd] Allow renderd to distribute rendering load across multiple servers
This extends renderd to support TCP/IP sockets in addition to unix sockets for submitting rendering requests
and thus renderd can be on a different server.

Furthermore, to distribute the load across multiple servers, renderd can now also dispatch requests to slave renderd's.
So Mod_tile (or any other program driving renderd) submits all its requests to the master renderd, where the requests get
queued in case there are too many. The master renderd then dispatches requests one at a time to either local rendering threads
or to the slave threads, which ever are free for the next request.

To configure this, you can add multiple [renderdN] sections, where N represents the Nth slave and specifies how many threads
it has, its host name and ip port.

The protocol currently does not pass back the actual tiles, so all renderd's have to be able to write to the same
tile directory (e.g. via NFS)
2009-08-28 22:10:40 +00:00
7239bba44f Make mod_tile treat font_dir_recurse as a boolean, it will now accept 0/1/n/y/true/false etc 2009-07-29 22:47:25 +00:00
46f32f2198 set default mod_tile font_dir_recurse=1 to make it obvious that the argument should not be true/false 2009-07-29 22:43:47 +00:00
d01e45493c Read font_dir_recurse from ini file. Fix supplied by Melchior Moos. 2009-07-23 22:45:01 +00:00
54bbf8ff72 Sprinkle strerror(errno) to get understandable error messages 2009-07-21 15:59:13 +00:00
6531d4f2be spelling 2009-07-21 15:23:41 +00:00
fa62894ed2 "You may need to these" -> "You may need to change these" 2009-07-12 22:18:55 +00:00
2ec7b2603e [mod_tile] Add two munin plugins to monitor the response codes and freshness of tiles served by mod_tile
these plugins connect to mod_tile via http://localhost/mod_tile to get the stats from there
2009-07-09 19:46:02 +00:00
f49b510ebd [mod_tile] Output some stats on what mod_tile returns
This patch reports two properties of the served tiles. First it reports how many tiles are returned with which response code, i.e.
how many tiles get return with http code 200, 304, 404 or 500. Secondly, it reports if tiles are returned fresh from disk, fresh
after being rendered on the spot, old without attempting to render, old after timing out waiting for the tile to be rendered.

The stats get reported through a special page at "http://servername/mod_tile".

Caveat: In order to report the stats of a global counter, a mutex is needed that serialises access to that counter. This can have
some performance effects, although it is attempted to hold this lock as short as possible. Measuring the effect with apache bench,
running for 1 million tile requests at a concurrency level of 10, this gave about a slowdown of 1%. This should be pretty much
worst case, as apache bench always requests the same tile, so that is all in cache. With this, it still achieves more than 5800
requests per second at 50Mb/s on a dual core laptop. On different hardware, this can obviously differ.

Stats reporting can be disabled with a config setting in mod_tile.conf

The locking code is based on mod_example_ipc.c
2009-07-08 23:12:45 +00:00
08504e485d [mod_tile] Update the sample config file to include the cacheing parameters 2009-07-08 20:25:21 +00:00
73555033f5 [mod_tile] Fixup configuration handling of the cache-expire settings
The initialisation of the per zoom level cache expire table was done in the wrong
section of the configuration parsing. This meant the results were order dependent in statements in mod_tile.conf,
as some of the values might not have been correctly set at that time of calculating the table.
2009-07-08 19:54:20 +00:00
2655c3e4ee [renderd] Small improvements to the renderd_processed munin plugin
- Changed counter type to DERIVE. This supposidly handles counter resets better and thus should be mre robust
- Stacked Request and Dirty queue, to better show the overall renderd throughput
- Rescale the dropped tiles graph by a factor of 20 to make it more similar in magnitude as the rendering to
  be able to show both on the same axis. This has some justification,
2009-07-05 01:19:49 +00:00
f9ba156424 mod_tile: fix typos in munin plugin 2009-07-01 21:41:46 +00:00
02967c2f01 mod_tile: Remove empty initparser/html dir, make clean deletes it and messes up svn 2009-07-01 20:48:04 +00:00
0454404cb7 mod_tile: Only print out layers if they have been configured 2009-07-01 20:38:27 +00:00
c486cd5be8 mod_tile: Don't overwrite an existing renderd.conf file 2009-07-01 20:32:37 +00:00
524de4f92f Write stats via a temporary file & rename to avoid read/write race. Copy log messages to stderr when run in foreground. 2009-07-01 20:20:24 +00:00
f801a2c709 [renderd] Added two simple munin plugins to monitor renderd performance 2009-06-24 20:14:08 +00:00
81bf2c7fe2 [renderd] Report stats about queue length and rendering throughput into a stats file
This allows to monitor the performance of renderd and how well it can keep up with the
render requests that are coming in or if it drops them due to overload.
2009-06-24 19:46:24 +00:00
082b47a1ee bugfix: count rendered tiles in --all mode of render_list 2009-06-15 12:07:35 +00:00
0dc364c546 [mod_tile] remove unnecessary code from my previous commit, noticed by jonb 2009-06-14 12:05:32 +00:00
517ab4fca0 Update renderd.py to obtain more config parameters from renderd.conf 2009-06-13 18:59:36 +00:00
b8d62ac957 Update renderd.py ignore the new sections added to the renderd.conf (renderd & mapnik). 2009-06-13 18:34:19 +00:00
7001143317 off-by-one bug fixed for render_list -a 2009-06-12 15:35:15 +00:00
2cb5480cc7 Fixes to debian scripts
renderd starts in background mode now by default (use -f|--foreground for old behaviour)
2009-06-12 13:07:05 +00:00
62d025ae60 another step towards making tile directory configurable at runtime (still some places left that use hardcoded HASH_PATH) 2009-06-12 10:09:08 +00:00
17afb7549c typo fixes 2009-06-12 09:23:29 +00:00
e541c64a8b [mod_tile] Add a bunch of heuristics to determin the cache expiry of tiles
Achieving a high cache hit ratio is both beneficial to clients and the server. For the clients it is
reduced loading time and for the server reduced resources used. To achieve this, cache expiries should be set
as long as possible. However, this conflicts with wanting up to date tiles, especially with minutely renderings.
As you can't predict the future, one can only use a bunch of heuristics.

With this patch, the tile expiry heuristic is based on three factors. The frequency of planet updates (the heuristic used so far),
the zoom level and the last modified time. The idea behind the zoom level heuristic is that low zoom tiles don't change noticably
very often, and so can use longer cache expiries than high zoom tiles. The last modified heuristic is based on the assumption
that a tile that hasn't changed for a while is more likely to stay unchanged than one that has recently been modified.

The heuristics have a bunch of tunables that can be set in the apache config of mod_tile
2009-06-10 22:14:58 +00:00
c95fdb710f [renderd] Add the ability to explicitly expire renderd tiles from proxys via HTCP
For large setups of mod_tile, and renderd, it may be beneficial to have a reverse proxy infront of the main tile server.
However when using a fast updating db e.g. running off the minutly diffs, the proxy may either deliver stale content, or the
cache expiry has to be set very short, which limits the effectiveness of the proxy. Instead, this patch adds an explicit
mechanism to renderd to signal to the proxy which tiles have been rerendered and thus should be discarded from the cache.
2009-06-10 19:16:53 +00:00
fc9e2e55a2 Debian build fixes 2009-06-10 16:28:07 +00:00
29080ad2ec More changes to make the tile cache directory configurable at runtime
* -t|--tile-dir option for render_list and convert_meta
* renderd reads it from renderd.conf section "[renderd]" setting "tile_dir"
* mod_tile reads from Apache conf ModTileTileDir directive
There are still some places in store.c left, where HASH_DIR is used directly. More fixes needed.
2009-06-10 16:26:12 +00:00
fb751bf8d4 Make tile directory prefix configurable at runtime
Changed -l|--layer to -m|--map because we are talking here about whole maps, not only layers
2009-06-10 15:48:00 +00:00
753f9e11db Added --min/max-x/y options to restrict tile range when using --all 2009-06-10 13:25:18 +00:00
7fb1c6a7ba Added --socket command line option to render_list and render_old (unix domain socket to connect to renderd)
Added --map command line option to render_list (name of map config instead of "default")
Added --all command line option to render_list (render all tiles in given zoom levels instead of reading from stdin)
2009-06-10 12:07:10 +00:00