[mapserver-users] Mapserver / Mapcache performance question - fileformat

Eichner, Andreas - SID-NLKM Andreas.Eichner at sid.sachsen.de
Fri Aug 10 02:03:18 PDT 2012


> *         The Original four images are in a compresses 
> geotiff file.  (The uncompressed geotiffs are too large)

What compression are you using? JPEG and YCbCr colorspace should do for 
your case.
 
> *         Tileindexes and Overviews were built using gdal at 
> the same resolutions that mapcache will use.

Hopefully your TIFFs are tiled too?!

> Mapserver is serving tiff files

MapCache should request JPEGs from MapServer if your cache is JPEG.

> Mapcache is using a 4*4 metatile - I am assuming 
> that this will make about four instances of mapserver run at 
> once, which matches the number of cores I have.  Would it be 
> quicker to use a 16* 16 metatile so that mapserver only needs 
> to open the image once?

Metatiling is used to reduce the workload on the backend server. 
Instead of requesting 16 tiles with 16 requests, MapCache will request 
a single tile with a single request from the backend large enough to 
cover those tiles and cuts them into 16 tiles on it's own. Since on a 
single tile request probability is high that neighboring tiles will be 
requested soon this will result in a kind of prefetch.

> I am serving the cache in a jpeg, which should keep 
> the cache size small, and the bandwidth down as well.

JPEG is very good for aerial photos - fast and small.

> Each tile is 256*256.  I have also seen 512*512 
> tiles, but I think 256 seems quicker.

Larger tiles have a smaller overhead, usually a better compression 
ratio and cover a larger area per tile so less tiles are required by 
client and therefore reduce the number of HTTP request that need to be 
made. On the other hand the client gets data he probaly never needs 
since the tiles at the border are clipped by the view, it takes more 
time to transfer and decode the larger data so clients need to wait 
longer until they see anything which looks unresponsive and larger 
tiles are uncommon so simple clients might fail.

> p.s.  I noticed PROCESSING "OVERSAMPLE_RATIO =1.0" makes a 
> big difference, however I could not find the parameter in any 
> of the official documentation.

http://mapserver.org/input/raster.html#special-processing-directives

HTH


More information about the mapserver-users mailing list