Code for running benchmarks for different compression algorithms in GDAL's GeoTIFF driver. More information on the benchmark and results in the related article on my website.
You can run your own benchmarks using a prepared Docker environment, or just locally on your own computer.
To run the benchmark locally, add the GeoTIFF files you want to benchmark with to the
directory, and run the benchmark script:
A few notes:
- You may have to run the script as root, because it calls itself using
perf statto time the benchmarks.
- Make sure you have GDAL properly installed. To test
zstdcompression at least GDAL 2.4.0-dev is required.
- Modify the
config.inifile to suit your needs. See the GeoTIFF File Format for valid settings.
- Don't have any sample files? Download the demo files I used (50Mb files with different data types) from here.
--repetitionsto set the number of repetitions,
--inputto define input directory with tif files, and
--configto set the the correct config file.
To run the benchmarks using Docker, use the included
Dockerfile to build an image containing a lightweight
GDAL 2.4.0dev with zstd compression compiled in. The
Makefile contains some shortcuts to build the image:
Builds the docker image and tags it
make shell to run the container and a get a shell,
make test to run a minimal benchmark using the settings in
config-minimal.ini. To run the full benchmark in
A few notes:
- While building the Docker image the sample files are automatically downloaded.
- In order to get
perf statto work inside a container I needed to run the container with the
--privilegedflag, so that's included in the
make benchmarkcommand as well.