<div dir="ltr">Hello,<div><br></div><div>I am trying to convert a full JPEG2000 image (Sentinel 2) to a GeoTIFF (10000x10000 pixels).</div><div><br></div><div>My config is the following: GDAL 3.1.0, released 2020/05/03, freshly compiled on my computer (Ubuntu 18.04).</div><div><br></div><div>I use the following env variables:</div><div><br></div><div>OPJ_NUM_THREADS=8<br>GDAL_NUM_THREADS=1</div><div>GDAL_CACHEMAX=1000</div><div><br></div><div>The command line is:</div><div><br></div><div>gdal_translate -of GTiff -co COMPRESS=NONE -co TILED=YES T15RTN_20190328T170201_B02.jp2 /mnt/ramdisk/test-openjpeg.tif<br></div><div><br></div><div>As stated in its name, /mnt/ramdisk is in memory, so there should not be any I/O lag.</div><div><br></div><div>I observed the following pattern:</div><div>- decompression at full speed, using all my laptop cores (about 5sec);</div><div>- a single thread starts, to write the GeoTIFF (about 5sec as well). </div><div><br></div><div>I would have expected the GeoTIFF creation to be almost instantaneous given the fact that there is no compression.</div><div><br></div><div>If I set GDAL_NUM_THREADS > 1, I do not manage to reach full CPU speed (all cores are used, at about 50%), and it takes about 10 secs as well.</div><div><br></div><div>If I use mapbox/rasterio to read the raster into memory then to write it back to a GeoTIFF file, the whole process takes 5s, the GeoTIFF write being almost instantaneous.</div><div><br></div><div>I am puzzled by this behavior... Is there something wrong with my GDAL settings ?</div><div>Is there a way to speed up the GeoTIFF creation ? Why is it faster using python ?</div><div><br></div><div>Thank you!</div><div>Thomas</div><div><br></div><div><br></div></div>