[Gdal-dev] Potential thrashing on band 1?

Frank Warmerdam warmerdam at pobox.com
Thu May 4 23:05:25 EDT 2006


Ben Discoe wrote:
> I've got a normal RGB TIF file, size 4093x4093, and i'm reading a set of 4x4
> tiles out of it (each 1024x1024 with 1 pixel overlap).
> I am using this to read a part of each row:
> 	band1->RasterIO(GF_Read, ..)
> 	band2->RasterIO(GF_Read, ..)
> 	band3->RasterIO(GF_Read, ..)
> 
> I get these messages:
> 
> CPL Debug: GDAL: GDALOpen(J3_4093.tif) succeeds as GTiff.
> CPL Debug: GDAL: Potential thrashing on band 1 of J3_4093.tif.
> CPL Debug: GDAL: GDALClose(J3_4093.tif)
> CPL Debug: GDAL: 789 block reads on 195 block band 1 of J3_4093.tif.
> 
> These are surprising values - 789, 195?  I figure that a row of tiles
> (4093*1024*24-bit) might not be fitting into GDAL's cache, but in that case
> one might expect 1024*16 = 16k block reads instead of 4k.
> ("Blocks" for TIF are 1 scan line, right?)

Ben,

Stripped TIFF files often have several scanlines per strip (block).  A
gdalinfo report will tell you the effective block size for the file.

> Then there is the mystery of why it complains about "band 1", when i am
> reading all three bands identically.

The "potential thrashing" debug message is just a bit of a hint to developers
that there may be efficiency issues with how they are accessing data.  I only
report it for band 1 since I imagine the results will generally be similar
for other bands.

Best regards,
-- 
---------------------------------------+--------------------------------------
I set the clouds in motion - turn up   | Frank Warmerdam, warmerdam at pobox.com
light and sound - activate the windows | http://pobox.com/~warmerdam
and watch the world go round - Rush    | President OSGF, http://osgeo.org




More information about the Gdal-dev mailing list