107 | | * Regular GeoTIFF without overviews: |
| 128 | * Traditional GeoTIFF |
| 129 | |
| 130 | {{{ |
| 131 | $ time GDAL_DISABLE_READDIR_ON_OPEN=YES CPL_VSIL_CURL_ALLOWED_EXTENSIONS=.tif gdallocationinfo --debug on \ |
| 132 | /vsicurl/http://even.rouault.free.fr/gtiff_test/S2A_MSIL1C_20170102T111442_N0204_R137_T30TXT_20170102T111441_TCI_no_ovr_strip.tif 5000 5000 |
| 133 | VSICURL: GetFileSize(http://even.rouault.free.fr/gtiff_test/S2A_MSIL1C_20170102T111442_N0204_R137_T30TXT_20170102T111441_TCI_no_ovr_strip.tif)=2009538 response_code=200 |
| 134 | VSICURL: Downloading 0-16383 (http://even.rouault.free.fr/gtiff_test/S2A_MSIL1C_20170102T111442_N0204_R137_T30TXT_20170102T111441_TCI_no_ovr_strip.tif)... |
| 135 | VSICURL: Got response_code=206 |
| 136 | GDAL: GDALOpen(/vsicurl/http://even.rouault.free.fr/gtiff_test/S2A_MSIL1C_20170102T111442_N0204_R137_T30TXT_20170102T111441_TCI_no_ovr_strip.tif, this=0x1910590) succeeds as GTiff. |
| 137 | Report: |
| 138 | Location: (5000P,5000L) |
| 139 | Band 1: |
| 140 | GDAL: GDAL_CACHEMAX = 791 MB |
| 141 | VSICURL: Downloading 1523712-1540095 (http://even.rouault.free.fr/gtiff_test/S2A_MSIL1C_20170102T111442_N0204_R137_T30TXT_20170102T111441_TCI_no_ovr_strip.tif)... |
| 142 | VSICURL: Got response_code=206 |
| 143 | Value: 255 |
| 144 | Band 2: |
| 145 | Value: 255 |
| 146 | Band 3: |
| 147 | Value: 255 |
| 148 | |
| 149 | real 0m0.397s |
| 150 | user 0m0.060s |
| 151 | sys 0m0.024s |
| 152 | }}} |
| 153 | |
| 154 | * Tiled GeoTIFF without overviews: |
190 | | No significant time difference (individual runs may differ by a few tens of milliseconds). Same amount of I/O (64 KB read). |
| 237 | * Cloud optimized GeoTIFF with 512x512 tiles |
| 238 | |
| 239 | {{{ |
| 240 | $ time GDAL_DISABLE_READDIR_ON_OPEN=YES CPL_VSIL_CURL_ALLOWED_EXTENSIONS=.tif gdallocationinfo --debug on \ |
| 241 | /vsicurl/http://even.rouault.free.fr/gtiff_test/S2A_MSIL1C_20170102T111442_N0204_R137_T30TXT_20170102T111441_TCI_cloudoptimized_512.tif 5000 5000 |
| 242 | VSICURL: GetFileSize(http://even.rouault.free.fr/gtiff_test/S2A_MSIL1C_20170102T111442_N0204_R137_T30TXT_20170102T111441_TCI_cloudoptimized_512.tif)=2918044 response_code=200 |
| 243 | VSICURL: Downloading 0-16383 (http://even.rouault.free.fr/gtiff_test/S2A_MSIL1C_20170102T111442_N0204_R137_T30TXT_20170102T111441_TCI_cloudoptimized_512.tif)... |
| 244 | VSICURL: Got response_code=206 |
| 245 | GDAL: GDALOpen(/vsicurl/http://even.rouault.free.fr/gtiff_test/S2A_MSIL1C_20170102T111442_N0204_R137_T30TXT_20170102T111441_TCI_cloudoptimized_512.tif, this=0x15cd450) succeeds as GTiff. |
| 246 | Report: |
| 247 | Location: (5000P,5000L) |
| 248 | Band 1: |
| 249 | GDAL: GDAL_CACHEMAX = 791 MB |
| 250 | VSICURL: Downloading 2392064-2408447 (http://even.rouault.free.fr/gtiff_test/S2A_MSIL1C_20170102T111442_N0204_R137_T30TXT_20170102T111441_TCI_cloudoptimized_512.tif)... |
| 251 | VSICURL: Got response_code=206 |
| 252 | Value: 255 |
| 253 | Band 2: |
| 254 | Value: 255 |
| 255 | Band 3: |
| 256 | Value: 255 |
| 257 | GDAL: GDALClose(/vsicurl/http://even.rouault.free.fr/gtiff_test/S2A_MSIL1C_20170102T111442_N0204_R137_T30TXT_20170102T111441_TCI_cloudoptimized_512.tif, this=0x15cd450) |
| 258 | |
| 259 | real 0m0.407s |
| 260 | user 0m0.068s |
| 261 | sys 0m0.016s |
| 262 | }}} |
| 263 | |
| 264 | The winners are the traditional GeoTIFF organization and the cloud optimized 512x512 tiled GeoTIFF since the directory fits in the first 16 KB. |
| 265 | |
| 266 | In other cases, no significant time difference (individual runs may differ by a few tens of milliseconds). Same amount of I/O (64 KB read). |
200 | | * Regular GeoTIFF without overviews |
| 276 | * Traditional GeoTIFF |
| 277 | |
| 278 | {{{ |
| 279 | $ time GDAL_DISABLE_READDIR_ON_OPEN=YES CPL_VSIL_CURL_ALLOWED_EXTENSIONS=.tif gdal_translate --debug on \ |
| 280 | /vsicurl/http://even.rouault.free.fr/gtiff_test/S2A_MSIL1C_20170102T111442_N0204_R137_T30TXT_20170102T111441_TCI_no_ovr_strip.tif \ |
| 281 | -srcwin 1024 1024 256 256 out.tif |
| 282 | VSICURL: GetFileSize(http://even.rouault.free.fr/gtiff_test/S2A_MSIL1C_20170102T111442_N0204_R137_T30TXT_20170102T111441_TCI_no_ovr_strip.tif)=2009538 response_code=200 |
| 283 | VSICURL: Downloading 0-16383 (http://even.rouault.free.fr/gtiff_test/S2A_MSIL1C_20170102T111442_N0204_R137_T30TXT_20170102T111441_TCI_no_ovr_strip.tif)... |
| 284 | VSICURL: Got response_code=206 |
| 285 | GDAL: GDALOpen(/vsicurl/http://even.rouault.free.fr/gtiff_test/S2A_MSIL1C_20170102T111442_N0204_R137_T30TXT_20170102T111441_TCI_no_ovr_strip.tif, this=0xf1e5a0) succeeds as GTiff. |
| 286 | Input file size is 10980, 10980 |
| 287 | GDAL: GDALDefaultOverviews::OverviewScan() |
| 288 | VSICURL: Downloading 163840-196607 (http://even.rouault.free.fr/gtiff_test/S2A_MSIL1C_20170102T111442_N0204_R137_T30TXT_20170102T111441_TCI_no_ovr_strip.tif)... |
| 289 | VSICURL: Got response_code=206 |
| 290 | VSICURL: Downloading 196608-262143 (http://even.rouault.free.fr/gtiff_test/S2A_MSIL1C_20170102T111442_N0204_R137_T30TXT_20170102T111441_TCI_no_ovr_strip.tif)... |
| 291 | VSICURL: Got response_code=206 |
| 292 | VSICURL: Downloading 262144-393215 (http://even.rouault.free.fr/gtiff_test/S2A_MSIL1C_20170102T111442_N0204_R137_T30TXT_20170102T111441_TCI_no_ovr_strip.tif)... |
| 293 | VSICURL: Got response_code=206 |
| 294 | ...10...20...30...40...50...60...70...80...90...100 - done. |
| 295 | |
| 296 | real 0m0.923s |
| 297 | user 0m0.256s |
| 298 | sys 0m0.020s |
| 299 | }}} |
| 300 | |
| 301 | The access to the pixel values requires 3 GET requests since whole lines need to be downloaded. A smarter implementation in the GeoTIFF reader with a better interaction with the GDAL HTTP code could probably collapse the 3 GET into a single larger one. |
| 302 | |
| 303 | * Tiled GeoTIFF without overviews: |
| 422 | |
| 423 | * Cloud optimized GeoTIFF with tiles 512x512: |
| 424 | |
| 425 | {{{ |
| 426 | $ time GDAL_DISABLE_READDIR_ON_OPEN=YES CPL_VSIL_CURL_ALLOWED_EXTENSIONS=.tif gdal_translate --debug on \ |
| 427 | /vsicurl/http://even.rouault.free.fr/gtiff_test/S2A_MSIL1C_20170102T111442_N0204_R137_T30TXT_20170102T111441_TCI_cloudoptimized_512.tif \ |
| 428 | -srcwin 1024 1024 256 256 out.tif |
| 429 | VSICURL: GetFileSize(http://even.rouault.free.fr/gtiff_test/S2A_MSIL1C_20170102T111442_N0204_R137_T30TXT_20170102T111441_TCI_cloudoptimized_512.tif)=2918044 response_code=200 |
| 430 | VSICURL: Downloading 0-16383 (http://even.rouault.free.fr/gtiff_test/S2A_MSIL1C_20170102T111442_N0204_R137_T30TXT_20170102T111441_TCI_cloudoptimized_512.tif)... |
| 431 | VSICURL: Got response_code=206 |
| 432 | GDAL: GDALOpen(/vsicurl/http://even.rouault.free.fr/gtiff_test/S2A_MSIL1C_20170102T111442_N0204_R137_T30TXT_20170102T111441_TCI_cloudoptimized_512.tif, this=0x1c815c0) succeeds as GTiff. |
| 433 | Input file size is 10980, 10980 |
| 434 | GTiff: ScanDirectories() |
| 435 | GTiff: Opened 5490x5490 overview. |
| 436 | GTiff: Opened 2745x2745 overview. |
| 437 | GTiff: Opened 1373x1373 overview. |
| 438 | GTiff: Opened 687x687 overview. |
| 439 | GTiff: Opened 344x344 overview. |
| 440 | GDAL: GDALDefaultOverviews::OverviewScan() |
| 441 | VSICURL: Downloading 1114112-1146879 (http://even.rouault.free.fr/gtiff_test/S2A_MSIL1C_20170102T111442_N0204_R137_T30TXT_20170102T111441_TCI_cloudoptimized_512.tif)... |
| 442 | VSICURL: Got response_code=206 |
| 443 | ...10...20...30...40...50...60...70...80...90...100 - done. |
| 444 | |
| 445 | real 0m0.441s |
| 446 | user 0m0.096s |
| 447 | sys 0m0.016s |
| 448 | }}} |
| 449 | |
| 450 | Compared to the default cloud optimized GeoTIFF, we save a few bytes for the reading of the IFD since all IFDs fit into the first 16 KB |
| 451 | |
| 452 | |
321 | | * Regular GeoTIFF without overviews: |
322 | | {{{ |
323 | | $ time GDAL_DISABLE_READDIR_ON_OPEN=YES CPL_VSIL_CURL_ALLOWED_EXTENSIONS=.tif gdal_translate --debug on /vsicurl/http://even.rouault.free.fr/gtiff_test/S2A_MSIL1C_20170102T111442_N0204_R137_T30TXT_20170102T111441_TCI_no_ovr.tif out.tif -outsize 1% 1% |
| 455 | * Traditional GeoTIFF |
| 456 | |
| 457 | {{{ |
| 458 | $ time GDAL_DISABLE_READDIR_ON_OPEN=YES CPL_VSIL_CURL_ALLOWED_EXTENSIONS=.tif gdal_translate --debug on \ |
| 459 | /vsicurl/http://even.rouault.free.fr/gtiff_test/S2A_MSIL1C_20170102T111442_N0204_R137_T30TXT_20170102T111441_TCI_no_ovr_strip.tif \ |
| 460 | out.tif -outsize 1% 1% |
| 461 | VSICURL: GetFileSize(http://even.rouault.free.fr/gtiff_test/S2A_MSIL1C_20170102T111442_N0204_R137_T30TXT_20170102T111441_TCI_no_ovr_strip.tif)=2009538 response_code=200 |
| 462 | VSICURL: Downloading 0-16383 (http://even.rouault.free.fr/gtiff_test/S2A_MSIL1C_20170102T111442_N0204_R137_T30TXT_20170102T111441_TCI_no_ovr_strip.tif)... |
| 463 | VSICURL: Got response_code=206 |
| 464 | GDAL: GDALOpen(/vsicurl/http://even.rouault.free.fr/gtiff_test/S2A_MSIL1C_20170102T111442_N0204_R137_T30TXT_20170102T111441_TCI_no_ovr_strip.tif, this=0x2327590) succeeds as GTiff. |
| 465 | Input file size is 10980, 10980 |
| 466 | GDAL: GDALDefaultOverviews::OverviewScan() |
| 467 | GDAL: GDALDefaultOverviews::OverviewScan() |
| 468 | VSICURL: Downloading 16384-49151 (http://even.rouault.free.fr/gtiff_test/S2A_MSIL1C_20170102T111442_N0204_R137_T30TXT_20170102T111441_TCI_no_ovr_strip.tif)... |
| 469 | VSICURL: Got response_code=206 |
| 470 | VSICURL: Downloading 49152-114687 (http://even.rouault.free.fr/gtiff_test/S2A_MSIL1C_20170102T111442_N0204_R137_T30TXT_20170102T111441_TCI_no_ovr_strip.tif)... |
| 471 | VSICURL: Got response_code=206 |
| 472 | VSICURL: Downloading 114688-245759 (http://even.rouault.free.fr/gtiff_test/S2A_MSIL1C_20170102T111442_N0204_R137_T30TXT_20170102T111441_TCI_no_ovr_strip.tif)... |
| 473 | VSICURL: Got response_code=206 |
| 474 | VSICURL: Downloading 245760-507903 (http://even.rouault.free.fr/gtiff_test/S2A_MSIL1C_20170102T111442_N0204_R137_T30TXT_20170102T111441_TCI_no_ovr_strip.tif)... |
| 475 | VSICURL: Got response_code=206 |
| 476 | VSICURL: Downloading 507904-1032191 (http://even.rouault.free.fr/gtiff_test/S2A_MSIL1C_20170102T111442_N0204_R137_T30TXT_20170102T111441_TCI_no_ovr_strip.tif)... |
| 477 | VSICURL: Got response_code=206 |
| 478 | VSICURL: Downloading 1064960-1081343 (http://even.rouault.free.fr/gtiff_test/S2A_MSIL1C_20170102T111442_N0204_R137_T30TXT_20170102T111441_TCI_no_ovr_strip.tif)... |
| 479 | VSICURL: Got response_code=206 |
| 480 | VSICURL: Downloading 1097728-1114111 (http://even.rouault.free.fr/gtiff_test/S2A_MSIL1C_20170102T111442_N0204_R137_T30TXT_20170102T111441_TCI_no_ovr_strip.tif)... |
| 481 | VSICURL: Got response_code=206 |
| 482 | VSICURL: Downloading 1130496-1146879 (http://even.rouault.free.fr/gtiff_test/S2A_MSIL1C_20170102T111442_N0204_R137_T30TXT_20170102T111441_TCI_no_ovr_strip.tif)... |
| 483 | VSICURL: Got response_code=206 |
| 484 | VSICURL: Downloading 1163264-1179647 (http://even.rouault.free.fr/gtiff_test/S2A_MSIL1C_20170102T111442_N0204_R137_T30TXT_20170102T111441_TCI_no_ovr_strip.tif)... |
| 485 | VSICURL: Got response_code=206 |
| 486 | VSICURL: Downloading 1196032-1212415 (http://even.rouault.free.fr/gtiff_test/S2A_MSIL1C_20170102T111442_N0204_R137_T30TXT_20170102T111441_TCI_no_ovr_strip.tif)... |
| 487 | VSICURL: Got response_code=206 |
| 488 | VSICURL: Downloading 1212416-1245183 (http://even.rouault.free.fr/gtiff_test/S2A_MSIL1C_20170102T111442_N0204_R137_T30TXT_20170102T111441_TCI_no_ovr_strip.tif)... |
| 489 | VSICURL: Got response_code=206 |
| 490 | VSICURL: Downloading 1245184-1310719 (http://even.rouault.free.fr/gtiff_test/S2A_MSIL1C_20170102T111442_N0204_R137_T30TXT_20170102T111441_TCI_no_ovr_strip.tif)... |
| 491 | VSICURL: Got response_code=206 |
| 492 | VSICURL: Downloading 1310720-1441791 (http://even.rouault.free.fr/gtiff_test/S2A_MSIL1C_20170102T111442_N0204_R137_T30TXT_20170102T111441_TCI_no_ovr_strip.tif)... |
| 493 | VSICURL: Got response_code=206 |
| 494 | VSICURL: Downloading 1441792-1703935 (http://even.rouault.free.fr/gtiff_test/S2A_MSIL1C_20170102T111442_N0204_R137_T30TXT_20170102T111441_TCI_no_ovr_strip.tif)... |
| 495 | VSICURL: Got response_code=206 |
| 496 | VSICURL: Downloading 1703936-2009537 (http://even.rouault.free.fr/gtiff_test/S2A_MSIL1C_20170102T111442_N0204_R137_T30TXT_20170102T111441_TCI_no_ovr_strip.tif)... |
| 497 | VSICURL: Got response_code=206 |
| 498 | ...10...20...30...40...50...60...70...80...90...100 - done. |
| 499 | |
| 500 | real 0m3.197s |
| 501 | user 0m0.304s |
| 502 | sys 0m0.056s |
| 503 | }}} |
| 504 | |
| 505 | As one could anticipate, the whole file needs to be read. |
| 506 | |
| 507 | * Tiled GeoTIFF without overviews: |
| 508 | {{{ |
| 509 | $ time GDAL_DISABLE_READDIR_ON_OPEN=YES CPL_VSIL_CURL_ALLOWED_EXTENSIONS=.tif gdal_translate --debug on \ |
| 510 | /vsicurl/http://even.rouault.free.fr/gtiff_test/S2A_MSIL1C_20170102T111442_N0204_R137_T30TXT_20170102T111441_TCI_no_ovr.tif out.tif -outsize 1% 1% |
| 617 | * Cloud optimized GeoTIFF with tiles of 512x512: |
| 618 | |
| 619 | {{{ |
| 620 | $ time GDAL_DISABLE_READDIR_ON_OPEN=YES CPL_VSIL_CURL_ALLOWED_EXTENSIONS=.tif gdal_translate --debug on \ |
| 621 | /vsicurl/http://even.rouault.free.fr/gtiff_test/S2A_MSIL1C_20170102T111442_N0204_R137_T30TXT_20170102T111441_TCI_cloudoptimized_512.tif \ |
| 622 | out.tif -outsize 1% 1% |
| 623 | VSICURL: GetFileSize(http://even.rouault.free.fr/gtiff_test/S2A_MSIL1C_20170102T111442_N0204_R137_T30TXT_20170102T111441_TCI_cloudoptimized_512.tif)=2918044 response_code=200 |
| 624 | VSICURL: Downloading 0-16383 (http://even.rouault.free.fr/gtiff_test/S2A_MSIL1C_20170102T111442_N0204_R137_T30TXT_20170102T111441_TCI_cloudoptimized_512.tif)... |
| 625 | VSICURL: Got response_code=206 |
| 626 | GDAL: GDALOpen(/vsicurl/http://even.rouault.free.fr/gtiff_test/S2A_MSIL1C_20170102T111442_N0204_R137_T30TXT_20170102T111441_TCI_cloudoptimized_512.tif, this=0x152b5b0) succeeds as GTiff. |
| 627 | Input file size is 10980, 10980 |
| 628 | GTiff: ScanDirectories() |
| 629 | GTiff: Opened 5490x5490 overview. |
| 630 | GTiff: Opened 2745x2745 overview. |
| 631 | GTiff: Opened 1373x1373 overview. |
| 632 | GTiff: Opened 687x687 overview. |
| 633 | GTiff: Opened 344x344 overview. |
| 634 | VSICURL: Downloading 16384-49151 (http://even.rouault.free.fr/gtiff_test/S2A_MSIL1C_20170102T111442_N0204_R137_T30TXT_20170102T111441_TCI_cloudoptimized_512.tif)... |
| 635 | VSICURL: Got response_code=206 |
| 636 | ...10...20...30...40...50...60...70...80...90...100 - done. |
| 637 | real 0m0.439s |
| 638 | user 0m0.088s |
| 639 | sys 0m0.024s |
| 640 | }}} |
| 641 | |
| 642 | Same performance as the default cloud optimized case (GDAL could potentially read in a less gready way for the pixel data since the tile size is only 8KB here) |
| 643 | |