Ticket #3693 (closed defect: fixed)
MapServer Raster Overview Performance Concerns
| Reported by: | warmerdam | Owned by: | warmerdam |
|---|---|---|---|
| Priority: | normal | Milestone: | |
| Component: | GDAL Support | Version: | svn-trunk (development) |
| Severity: | normal | Keywords: | |
| Cc: | tbonfort |
Description
Frank, thanks for taking the time to answer.
The problem is I am experiencing the slowdown without going through the warper or the resampler (i.e no reprojection going on, and no RESAMPLE processing option). The test results I'm attaching clearly show (I hope) that there is a problem when using gdal overviews:
test case: fullres image is a ~130000x130000 pixel wide biftiff, tiled, lzw, band interleaved.
setup 1: an external overview is added to the image: gdaladdo -r average --config INTERLEAVE_OVERVIEW BAND --config COMPRESS_OVERVIEW LZW --config BIGTIFF_OVERVIEW YES -ro $infile 2 4 8 16 32 64 128 256 512 the mapserver layer used is basic: no processing options, and projection identical to the map projection.
setup2: "manual" overviews are created by basically repeating the gdalwarp command, each time multiplying the -tr resolution option by 2:
for level in `seq 1 $levels`; do curres=`echo "scale=10; $curres*2" | bc` target="l$level-$file" echo "making file $target, resolution $curres" rm $target gdalwarp -of GTiff -co TILED=YES -co INTERLEAVE=BAND -co COMPRESS=LZW -co BIGTIFF=YES -r bilinear -tr $curres $curres $prev $target prev=$target done
the mapfile is configured with 10 layers that switch on or off depending on the requested scale. the minscale/maxscale for each layer are set so that only downsampling can occur, not oversampling.
it is my assumption that both setups are basically doing the same stuff, (except for the resampling method, but that does not intervene in the following performance), am I correct?
attached is the result I'm getting, when requesting images at *exactly* (to the extent of rounding errrors) the resolutions of the overviews. I'll also point out that for the gdal .ovr overview case, I also tested by slightly modifying the final resolution, so as to rule out a rounding error that would cause gdal/mapserver to use an oversampled overview, to no avail.
for refererence, I also include the cases when forcing the resampler, by adding the RESAMPLE=NEAREST processing option. (with oversample_ratio set to 1 and 2).
best regards, thomas

