[gdal-dev] gdal_translate and multithreading

Even Rouault even.rouault at spatialys.com
Wed Jan 14 01:52:58 PST 2015


Pierre,

Nor gdal_translate nor the VRT driver uses multithreading. But it is possible
that the driver that handles the underlying dataset referenced by the VRT uses
multithreading. There are very few of them however. I can only think of :
- JP2KAK. You can specify JP2KAK_THREADS=1
- JP2OpenJPEG. You can specify GDAL_NUM_THREADS=1

Even

> Hello,
>
> while translating a vrt file into a tif file with gdal_translate, I
> noticed thanks to htop utility that gdal_translate is using
> multithreading (typicallay 4 threads). I fail to find any multithreading
> option for gdal_translate (contrary to gdal_warp that has a multi option
> and where the number of threads can be set with -wo "NUM_THREADS=x").
> Is there any possibility to prevent gdal_translate from multithreading?
> Setting the global environment variable OMP_NUM_THREADS to 1 does not
> help.  I had a quick look to gdal_translate.cpp but did not find any
> explicit reference to multithreading.
>
> This behaviour of gdal_translate is an issue in case of distributed
> computing.  Indeed, cluster nodes with many cores are spending most of
> their time with kernel time to serve a number of threads largely
> exceeding the number of CPUs.
>
> Any hint on how to solve this problem will be greatly appreciated.
>
> Cheers,
>
> Pierre
>
> ------------------------
> Pierre Soille
> EC Joint Research Centre
> Ispra, Italy
> ------------------------
> _______________________________________________
> gdal-dev mailing list
> gdal-dev at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/gdal-dev
>


-- 
Spatialys - Geospatial professional services
http://www.spatialys.com


More information about the gdal-dev mailing list