Investigate slow down in tile read - with GDAL 3.2 / PROJ 7.1
vincentsarago opened this issue ยท 6 comments
Recent change in rasterio wheels have slowed down the benchmark results ๐ฑ
I'm pretty sure this is PROJ Network related but so far trying to set PROJ_NETWORK="OFF"
didn't change the results
Rasterio 1.2.0 (wheels, GDAL 3.2 PROJ 7.1)
------------------------------ benchmark 'boundless tile ': 32 tests -------------------------------
Name (time in ms) Min Max Mean Median
----------------------------------------------------------------------------------------------------
uint8-none 108.5558 (1.0) 126.8517 (1.04) 115.1905 (1.0) 112.1499 (1.0)
int8-none 109.6052 (1.01) 121.6052 (1.0) 118.0994 (1.03) 119.2085 (1.06)
uint8-alpha 110.6480 (1.02) 125.7326 (1.03) 117.4947 (1.02) 118.3415 (1.06)
int8-nodata 110.7580 (1.02) 123.3845 (1.01) 117.2090 (1.02) 116.2332 (1.04)
uint8-mask 110.7956 (1.02) 131.3988 (1.08) 119.6921 (1.04) 120.7951 (1.08)
int8-mask 111.7627 (1.03) 123.2978 (1.01) 117.8066 (1.02) 116.9831 (1.04)
uint8-nodata 111.8703 (1.03) 152.9090 (1.26) 123.9524 (1.08) 119.1758 (1.06)
uint16-mask 111.9459 (1.03) 127.4050 (1.05) 119.4055 (1.04) 119.3883 (1.06)
uint16-nodata 113.4022 (1.04) 126.1931 (1.04) 120.1505 (1.04) 120.3528 (1.07)
uint16-none 113.8831 (1.05) 132.1449 (1.09) 119.8992 (1.04) 117.7171 (1.05)
int16-none 115.2442 (1.06) 129.8928 (1.07) 123.3345 (1.07) 123.3232 (1.10)
uint32-none 116.3571 (1.07) 142.1609 (1.17) 126.5434 (1.10) 124.2245 (1.11)
int8-alpha 116.8246 (1.08) 137.9757 (1.13) 124.9687 (1.08) 122.6505 (1.09)
int32-none 117.1793 (1.08) 129.2304 (1.06) 123.7179 (1.07) 123.1899 (1.10)
int16-mask 117.4448 (1.08) 131.4058 (1.08) 125.6912 (1.09) 127.1211 (1.13)
float32-nodata 117.8420 (1.09) 128.8745 (1.06) 123.4513 (1.07) 123.3787 (1.10)
int32-nodata 119.3298 (1.10) 146.0470 (1.20) 130.7116 (1.13) 130.2676 (1.16)
uint32-mask 119.8624 (1.10) 134.5737 (1.11) 127.5335 (1.11) 128.3267 (1.14)
float32-alpha 120.0401 (1.11) 132.9804 (1.09) 127.4635 (1.11) 127.2211 (1.13)
int16-nodata 120.1741 (1.11) 129.7522 (1.07) 125.8600 (1.09) 125.8432 (1.12)
float64-mask 120.5540 (1.11) 146.2014 (1.20) 134.3785 (1.17) 133.5396 (1.19)
uint32-nodata 120.5606 (1.11) 131.9888 (1.09) 126.6672 (1.10) 127.0793 (1.13)
float32-mask 120.7796 (1.11) 136.2334 (1.12) 126.5621 (1.10) 126.1069 (1.12)
float64-nodata 122.0620 (1.12) 135.6752 (1.12) 127.7181 (1.11) 127.7623 (1.14)
int32-alpha 122.6442 (1.13) 138.9959 (1.14) 129.4443 (1.12) 129.0930 (1.15)
int16-alpha 123.7984 (1.14) 136.2212 (1.12) 129.9288 (1.13) 129.8224 (1.16)
float32-none 123.9311 (1.14) 139.5618 (1.15) 129.1787 (1.12) 128.0166 (1.14)
uint16-alpha 124.7180 (1.15) 135.7632 (1.12) 129.8693 (1.13) 129.4375 (1.15)
float64-none 124.7569 (1.15) 138.5068 (1.14) 130.8611 (1.14) 131.2135 (1.17)
int32-mask 124.8037 (1.15) 142.8469 (1.17) 131.1598 (1.14) 129.0305 (1.15)
uint32-alpha 125.7560 (1.16) 140.9796 (1.16) 132.4900 (1.15) 132.3716 (1.18)
float64-alpha 134.7508 (1.24) 141.5945 (1.16) 138.8557 (1.21) 139.4906 (1.24)
ref: https://github.com/cogeotiff/rio-tiler/runs/1836212131?check_suite_focus=true
Rasterio 1.1.8 (wheels, GDAL 2.4 PROJ 5?)
---------------------------- benchmark 'boundless tile ': 32 tests -----------------------------
Name (time in ms) Min Max Mean Median
------------------------------------------------------------------------------------------------
int8-none 11.2351 (1.0) 11.6735 (1.02) 11.2756 (1.0) 11.2677 (1.0)
uint8-none 11.2519 (1.00) 11.3936 (1.0) 11.2838 (1.00) 11.2827 (1.00)
uint8-nodata 11.8479 (1.05) 11.9658 (1.05) 11.8813 (1.05) 11.8780 (1.05)
int8-nodata 11.8703 (1.06) 11.9715 (1.05) 11.9043 (1.06) 11.9030 (1.06)
int8-mask 12.8745 (1.15) 12.9406 (1.14) 12.8962 (1.14) 12.8937 (1.14)
uint8-mask 12.8860 (1.15) 14.1836 (1.24) 12.9457 (1.15) 12.9027 (1.15)
uint8-alpha 13.9131 (1.24) 14.0786 (1.24) 13.9487 (1.24) 13.9442 (1.24)
int8-alpha 13.9450 (1.24) 14.0137 (1.23) 13.9759 (1.24) 13.9757 (1.24)
int16-none 14.5551 (1.30) 14.6662 (1.29) 14.5944 (1.29) 14.5957 (1.30)
uint16-none 14.5883 (1.30) 15.9511 (1.40) 14.7249 (1.31) 14.6237 (1.30)
uint16-nodata 15.5985 (1.39) 15.6652 (1.37) 15.6305 (1.39) 15.6284 (1.39)
int16-nodata 15.6070 (1.39) 16.0283 (1.41) 15.6651 (1.39) 15.6482 (1.39)
int16-mask 16.3793 (1.46) 16.5309 (1.45) 16.4164 (1.46) 16.4129 (1.46)
uint16-mask 16.3931 (1.46) 17.9173 (1.57) 16.4741 (1.46) 16.4321 (1.46)
float32-none 17.4943 (1.56) 17.9977 (1.58) 17.5404 (1.56) 17.5289 (1.56)
float32-nodata 18.4476 (1.64) 19.1201 (1.68) 18.5291 (1.64) 18.4991 (1.64)
uint32-none 19.0480 (1.70) 20.4486 (1.79) 19.1069 (1.69) 19.0791 (1.69)
uint32-nodata 19.1961 (1.71) 19.2700 (1.69) 19.2372 (1.71) 19.2371 (1.71)
float32-mask 19.2293 (1.71) 19.3944 (1.70) 19.2809 (1.71) 19.2787 (1.71)
int32-nodata 19.4194 (1.73) 19.7311 (1.73) 19.4573 (1.73) 19.4464 (1.73)
int32-none 19.4539 (1.73) 19.5605 (1.72) 19.4969 (1.73) 19.4942 (1.73)
float32-alpha 20.0840 (1.79) 20.1823 (1.77) 20.1227 (1.78) 20.1233 (1.79)
uint32-mask 20.1992 (1.80) 20.3131 (1.78) 20.2379 (1.79) 20.2354 (1.80)
int32-mask 20.4991 (1.82) 20.5783 (1.81) 20.5293 (1.82) 20.5268 (1.82)
uint16-alpha 20.5555 (1.83) 20.7778 (1.82) 20.5977 (1.83) 20.5886 (1.83)
float64-nodata 20.7182 (1.84) 20.8266 (1.83) 20.7402 (1.84) 20.7339 (1.84)
int16-alpha 20.7372 (1.85) 20.8623 (1.83) 20.7886 (1.84) 20.7842 (1.84)
float64-none 20.9546 (1.87) 21.6983 (1.90) 21.0181 (1.86) 20.9960 (1.86)
uint32-alpha 21.8330 (1.94) 22.5884 (1.98) 21.9114 (1.94) 21.8732 (1.94)
float64-mask 22.0051 (1.96) 22.5801 (1.98) 22.0775 (1.96) 22.0708 (1.96)
int32-alpha 22.2331 (1.98) 23.4782 (2.06) 22.3817 (1.98) 22.2635 (1.98)
float64-alpha 28.2078 (2.51) 28.3588 (2.49) 28.2380 (2.50) 28.2259 (2.51)
------------------------------------------------------------------------------------------------
ref: https://github.com/cogeotiff/rio-tiler/runs/1752857857?check_suite_focus=true
Maybe it would be good for users to pin rasterio 1.1.8 for now.
@kylebarron it depends because this is PROJ related, so you can still have rasterio 1.1.8 with GDAL3.2+PROJ7.1
I'm going to add a note on the documentation that for now GDAL 2.4 is the preferred version (rasterio wheels 1.1.8)
ref: OSGeo/gdal#3470
Looks like OSGeo/gdal#3470 was closed, does that mean this issue is resolved now?
No, it's yet to be release in GDAL (3.3) and then in Rasterio wheels
Update:
rasterio 1.2.4 wheels is now shipped with gdal 3.3 and the benchmark numbers are a bit better
---------------------------- benchmark 'boundless tile ': 32 tests -----------------------------
Name (time in ms) Min Max Mean Median
------------------------------------------------------------------------------------------------
uint8-none 36.0845 (1.0) 36.8890 (1.0) 36.3359 (1.0) 36.2777 (1.0)
int8-none 36.1478 (1.00) 36.9407 (1.00) 36.3401 (1.00) 36.2810 (1.00)
uint8-nodata 37.1855 (1.03) 37.4427 (1.02) 37.2892 (1.03) 37.2724 (1.03)
int8-nodata 37.2892 (1.03) 38.0494 (1.03) 37.4661 (1.03) 37.4175 (1.03)
uint8-mask 37.5013 (1.04) 38.7525 (1.05) 37.8128 (1.04) 37.6675 (1.04)
int8-mask 37.5848 (1.04) 40.1506 (1.09) 37.9931 (1.05) 37.7323 (1.04)
uint8-alpha 39.1817 (1.09) 43.0933 (1.17) 39.8805 (1.10) 39.6071 (1.09)
int8-alpha 39.2252 (1.09) 42.1031 (1.14) 39.7188 (1.09) 39.4863 (1.09)
int16-none 39.5304 (1.10) 40.0263 (1.09) 39.6825 (1.09) 39.6272 (1.09)
uint16-none 39.6292 (1.10) 41.3537 (1.12) 40.1360 (1.10) 40.1174 (1.11)
uint16-nodata 40.9142 (1.13) 42.3014 (1.15) 41.3534 (1.14) 41.2695 (1.14)
int16-nodata 41.0232 (1.14) 41.5285 (1.13) 41.2542 (1.14) 41.2321 (1.14)
int16-mask 41.0269 (1.14) 42.3144 (1.15) 41.3744 (1.14) 41.2496 (1.14)
uint16-mask 41.1403 (1.14) 44.4045 (1.20) 41.7933 (1.15) 41.4693 (1.14)
float32-none 42.6787 (1.18) 43.5693 (1.18) 42.8966 (1.18) 42.8695 (1.18)
float32-nodata 43.6781 (1.21) 44.5622 (1.21) 43.8753 (1.21) 43.7682 (1.21)
float32-mask 43.9407 (1.22) 46.4043 (1.26) 44.6261 (1.23) 44.4294 (1.22)
uint32-none 44.3420 (1.23) 47.4058 (1.29) 44.9163 (1.24) 44.6874 (1.23)
int32-none 44.6777 (1.24) 45.7105 (1.24) 44.9701 (1.24) 44.9806 (1.24)
uint32-nodata 44.9128 (1.24) 45.7491 (1.24) 45.2326 (1.24) 45.1528 (1.24)
uint32-mask 45.1234 (1.25) 46.2527 (1.25) 45.4043 (1.25) 45.2577 (1.25)
int32-nodata 45.2145 (1.25) 45.7462 (1.24) 45.4282 (1.25) 45.4019 (1.25)
uint16-alpha 45.4811 (1.26) 47.0015 (1.27) 45.8007 (1.26) 45.6506 (1.26)
int16-alpha 45.6208 (1.26) 48.0502 (1.30) 46.0785 (1.27) 45.8841 (1.26)
int32-mask 45.8539 (1.27) 47.6034 (1.29) 46.3157 (1.27) 46.2353 (1.27)
float64-none 45.9549 (1.27) 47.2615 (1.28) 46.5413 (1.28) 46.5551 (1.28)
float64-nodata 46.2531 (1.28) 46.9339 (1.27) 46.5561 (1.28) 46.4983 (1.28)
float32-alpha 46.5752 (1.29) 47.5749 (1.29) 46.9523 (1.29) 46.9053 (1.29)
float64-mask 46.9536 (1.30) 48.7336 (1.32) 47.4195 (1.31) 47.2932 (1.30)
uint32-alpha 47.5474 (1.32) 49.4702 (1.34) 48.1462 (1.33) 47.9025 (1.32)
int32-alpha 47.7178 (1.32) 48.3405 (1.31) 47.9654 (1.32) 47.9418 (1.32)
float64-alpha 53.3614 (1.48) 54.8137 (1.49) 53.8984 (1.48) 53.7636 (1.48)