[Tilecache] Re: MetaTiling - does projection affect?

christopher.schmidt at nokia.com christopher.schmidt at nokia.com
Thu May 6 07:27:23 EDT 2010


On May 6, 2010, at 1:04 AM, ext Guillaume Sueur wrote:

> Hi Bill,
> 
> The behaviour is exactly as expected here. Metatiling in mainly designed 
> to seed your cache quicker, because rendering a 2560 x 2560 image and 
> splitting it into 100 pieces is much faster than rendering 100 tiles. 
> But it is clearly not designed to be used in a "production" context. The 
> number of request sent by the client is the same (because the client 
> doesn't know about metatiling), but for each tile of 256x256 which 
> doesn't exist in the cache you will generate 100 tiles on the server.
> My advice : keep the metatile on for seeding the cache (with 
> tilecache_seed.py), and put it off when publishing the cache throught 
> Apache. It can also drive you to file locking and other problems.

Er... to quote The Doctor: 'what? What?!'?

This is completely untrue. TileCache is designed to support having metaTiling on during production use. The reported behavior is confusing to me, and I don't understand it, but that doesn't mean that metaTiling is not designed for production use. In fact, for many types of access, turning on metaTiling in production is all that allows it to work; with very slow servers, you prevent OpenLayers from 'swamping' an external server (by sending many requests at once) because TileCache performs local locking to prevent re-requesting the same area multiple times.

However, one thing that may be affecting this impression is the fact that the most recent release of TileCache has a bug that causes this locking to fail; the fix for that is http://trac.osgeo.org/tilecache/changeset/391 , which you can apply to your own TileCache deployment, and is the primary motivator for a new TileCache release (which is not yet available, but is on my short-term todo list.) If all of your requests were sent at around the same time, or by using OpenLayesr as a client, I'm not surprised by the buggy behavior, unfortunately.

As for the increased number of tiles -- because TileCache will request 5x5 sections, if you load an area that sits inbetween tile boundaries, you will get extra tiles around the outside. It sounds like you loaded a 14 * 13 area; worst case scenario (being smack dab in the middle of two tilesets) would put the number of tiles at 462, so your experience of having it 'double' (by requesting more data aorund the outside that you didn't need yet) isn't surprising.

So, in short:
 1. metaTile in production: good
 2. TileCache 2.10: bad (and all releases back to 2.03, I think.)
 3. Easy to patch
 4. New release relatively soon
 5. Tile numbers seem reasonable

-- Chris


More information about the Tilecache mailing list