[Gdal-dev] performance issue with gdal_translate...

Frank Warmerdam warmerdam at pobox.com
Wed May 31 15:34:09 EDT 2006


John Cole wrote:
> I'm creating a tiled geotif on a large jpg file
> 
> gdal_translate -of GTiff -co "TILED=YES" madison_1f_01.jpg madison_1f_01.tif
> 
> Input file size is 44400, 42600
> 
> Gdal_translate is working, but it's really slow and only using 0.5% of
> memory (according to top).
> 
>   PID USER      PR  NI  VIRT  RES  SHR S %CPU %MEM    TIME+  COMMAND
>  4350 root      25   0 65228  22m 6252 R  100  0.5   2:18.82 gdal_translate
> 
> Since I have a decent system for this, I was wondering what --config
> switches I could use to speed this up?
> 
> I'm running Fedora Core 5 on a dual xeon 3ghz with 4GB of memory.

John,

I think you want to force GDAL_CACHEMAX up.  When reformatting scanline
oriented file to tiles or tiles to scanlines it is important to have
a cache large enough to hold a whole row of tiles or performance degrades
seriously.

GDAL_CACHEMAX is normally a number of megabytes, and the default is 10 I
think.

So something like:

gdal_translate -of GTIFF -co TILED=YES --config GDAL_CACHEMAX 120 \
   madison_1f_01.jpg madison_1f_01.tif

Would use a 120MB cache.

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