Here are my measurements (using clock_gettime(CLOCK_PROCESS_CPUTIME_ID
around the write loop) with a 1000x2560x2560 dataset:
+----------------------------+--------------+-----------------+----------------------+
| - | direct chunk | hyperslab chunk | hyperslab contiguous |
+----------------------------+--------------+-----------------+----------------------+
| regular | 1.631005 | 3.368258 | 2.069583 |
| never fill | 1.632858 | 1.641345 | 2.069205 |
| latest fmt | 1.643421 | 3.233817 | 2.068250 |
| never fill + latest format | 1.633859 | 1.611976 | 2.029573 |
+----------------------------+--------------+-----------------+----------------------+
Here is the log:
# direct chunk
gcc conti_v_chunky.c -DCHUNKED -DWRITE_CHUNK -o conti_v_chunky -I$CONDA_PREFIX/include -L$CONDA_PREFIX/lib -lhdf5 && LD_LIBRARY_PATH=$CONDA_PREFIX/lib ./conti_v_chunky && h5ls -v foo.h5
write took 1.631005 s
Opened "foo.h5" with sec2 driver.
data Dataset {1000/1000, 2560/2560, 2560/2560}
Location: 1:800
Links: 1
Chunks: {1, 2560, 2560} 13107200 bytes
Storage: 13107200000 logical bytes, 13107200000 allocated bytes, 100.00% utilization
Type: native short
# hyperslab chunk
gcc conti_v_chunky.c -DCHUNKED -o conti_v_chunky -I$CONDA_PREFIX/include -L$CONDA_PREFIX/lib -lhdf5 && LD_LIBRARY_PATH=$CONDA_PREFIX/lib ./conti_v_chunky && h5ls -v foo.h5
write took 3.368258 s
Opened "foo.h5" with sec2 driver.
data Dataset {1000/1000, 2560/2560, 2560/2560}
Location: 1:800
Links: 1
Chunks: {1, 2560, 2560} 13107200 bytes
Storage: 13107200000 logical bytes, 13107200000 allocated bytes, 100.00% utilization
Type: native short
# hyperslab contiguous
gcc conti_v_chunky.c -o conti_v_chunky -I$CONDA_PREFIX/include -L$CONDA_PREFIX/lib -lhdf5 && LD_LIBRARY_PATH=$CONDA_PREFIX/lib ./conti_v_chunky && h5ls -v foo.h5
write took 2.069583 s
Opened "foo.h5" with sec2 driver.
data Dataset {1000/1000, 2560/2560, 2560/2560}
Location: 1:800
Links: 1
Storage: 13107200000 logical bytes, 13107200000 allocated bytes, 100.00% utilization
Type: native short
## NEVER_FILL
# direct chunk
gcc conti_v_chunky.c -DNEVER_FILL -DCHUNKED -DWRITE_CHUNK -o conti_v_chunky -I$CONDA_PREFIX/include -L$CONDA_PREFIX/lib -lhdf5 && LD_LIBRARY_PATH=$CONDA_PREFIX/lib ./conti_v_chunky && h5ls -v foo.h5
write took 1.632858 s
Opened "foo.h5" with sec2 driver.
data Dataset {1000/1000, 2560/2560, 2560/2560}
Location: 1:800
Links: 1
Chunks: {1, 2560, 2560} 13107200 bytes
Storage: 13107200000 logical bytes, 13107200000 allocated bytes, 100.00% utilization
Type: native short
# hyperslab chunk
gcc conti_v_chunky.c -DNEVER_FILL -DCHUNKED -o conti_v_chunky -I$CONDA_PREFIX/include -L$CONDA_PREFIX/lib -lhdf5 && LD_LIBRARY_PATH=$CONDA_PREFIX/lib ./conti_v_chunky && h5ls -v foo.h5
write took 1.641345 s
Opened "foo.h5" with sec2 driver.
data Dataset {1000/1000, 2560/2560, 2560/2560}
Location: 1:800
Links: 1
Chunks: {1, 2560, 2560} 13107200 bytes
Storage: 13107200000 logical bytes, 13107200000 allocated bytes, 100.00% utilization
Type: native short
# hyperslab contiguous
gcc conti_v_chunky.c -DNEVER_FILL -o conti_v_chunky -I$CONDA_PREFIX/include -L$CONDA_PREFIX/lib -lhdf5 && LD_LIBRARY_PATH=$CONDA_PREFIX/lib ./conti_v_chunky && h5ls -v foo.h5
write took 2.069205 s
Opened "foo.h5" with sec2 driver.
data Dataset {1000/1000, 2560/2560, 2560/2560}
Location: 1:800
Links: 1
Storage: 13107200000 logical bytes, 13107200000 allocated bytes, 100.00% utilization
Type: native short
## LATEST_FMT
# direct chunk
gcc conti_v_chunky.c -DLATEST_FMT -DCHUNKED -DWRITE_CHUNK -o conti_v_chunky -I$CONDA_PREFIX/include -L$CONDA_PREFIX/lib -lhdf5 && LD_LIBRARY_PATH=$CONDA_PREFIX/lib ./conti_v_chunky && h5ls -v foo.h5
write took 1.643421 s
Opened "foo.h5" with sec2 driver.
data Dataset {1000/1000, 2560/2560, 2560/2560}
Location: 1:195
Links: 1
Modified: 2022-05-12 17:55:14 CEST
Chunks: {1, 2560, 2560} 13107200 bytes
Storage: 13107200000 logical bytes, 13107200000 allocated bytes, 100.00% utilization
Type: native short
# hyperslab chunk
gcc conti_v_chunky.c -DLATEST_FMT -DCHUNKED -o conti_v_chunky -I$CONDA_PREFIX/include -L$CONDA_PREFIX/lib -lhdf5 && LD_LIBRARY_PATH=$CONDA_PREFIX/lib ./conti_v_chunky && h5ls -v foo.h5
write took 3.233817 s
Opened "foo.h5" with sec2 driver.
data Dataset {1000/1000, 2560/2560, 2560/2560}
Location: 1:195
Links: 1
Modified: 2022-05-12 17:55:16 CEST
Chunks: {1, 2560, 2560} 13107200 bytes
Storage: 13107200000 logical bytes, 13107200000 allocated bytes, 100.00% utilization
Type: native short
# hyperslab contiguous
gcc conti_v_chunky.c -DLATEST_FMT -o conti_v_chunky -I$CONDA_PREFIX/include -L$CONDA_PREFIX/lib -lhdf5 && LD_LIBRARY_PATH=$CONDA_PREFIX/lib ./conti_v_chunky && h5ls -v foo.h5
write took 2.068250 s
Opened "foo.h5" with sec2 driver.
data Dataset {1000/1000, 2560/2560, 2560/2560}
Location: 1:195
Links: 1
Modified: 2022-05-12 17:55:20 CEST
Storage: 13107200000 logical bytes, 13107200000 allocated bytes, 100.00% utilization
Type: native short
## NEVER_FILL and LATEST_FMT
# direct chunk
gcc conti_v_chunky.c -DNEVER_FILL -DLATEST_FMT -DCHUNKED -DWRITE_CHUNK -o conti_v_chunky -I$CONDA_PREFIX/include -L$CONDA_PREFIX/lib -lhdf5 && LD_LIBRARY_PATH=$CONDA_PREFIX/lib ./conti_v_chunky && h5ls -v foo.h5
write took 1.633859 s
Opened "foo.h5" with sec2 driver.
data Dataset {1000/1000, 2560/2560, 2560/2560}
Location: 1:195
Links: 1
Modified: 2022-05-12 17:55:22 CEST
Chunks: {1, 2560, 2560} 13107200 bytes
Storage: 13107200000 logical bytes, 13107200000 allocated bytes, 100.00% utilization
Type: native short
# hyperslab chunk
gcc conti_v_chunky.c -DNEVER_FILL -DLATEST_FMT -DCHUNKED -o conti_v_chunky -I$CONDA_PREFIX/include -L$CONDA_PREFIX/lib -lhdf5 && LD_LIBRARY_PATH=$CONDA_PREFIX/lib ./conti_v_chunky && h5ls -v foo.h5
write took 1.611976 s
Opened "foo.h5" with sec2 driver.
data Dataset {1000/1000, 2560/2560, 2560/2560}
Location: 1:195
Links: 1
Modified: 2022-05-12 17:55:24 CEST
Chunks: {1, 2560, 2560} 13107200 bytes
Storage: 13107200000 logical bytes, 13107200000 allocated bytes, 100.00% utilization
Type: native short
# hyperslab contiguous
gcc conti_v_chunky.c -DNEVER_FILL -DLATEST_FMT -o conti_v_chunky -I$CONDA_PREFIX/include -L$CONDA_PREFIX/lib -lhdf5 && LD_LIBRARY_PATH=$CONDA_PREFIX/lib ./conti_v_chunky && h5ls -v foo.h5
write took 2.029573 s
Opened "foo.h5" with sec2 driver.
data Dataset {1000/1000, 2560/2560, 2560/2560}
Location: 1:195
Links: 1
Modified: 2022-05-12 17:55:26 CEST
Storage: 13107200000 logical bytes, 13107200000 allocated bytes, 100.00% utilization
Type: native short