HDF5 raw-data chunk cache
The HDF5 raw-data chunk cache retains decoded dataset chunks in memory subject to byte capacity, hash-slot collisions and eviction policy.
Separate limits: colliding chunks cannot coexist in the cache even when byte capacity remains. Cache bytes and slot count therefore constrain different resources. [1]
Measured example: four compressed chunks and 32 scalar selections required 32 raw chunk reads with one slot, but four with 17 slots and enough bytes. Grouping the same selections by chunk also needed four reads with one slot. These are in-memory file-driver counts, not disk traffic or a timing speedup. [3]
Scope: each dataset has its own cache. Effective settings and library version matter; the byte budget is not a cap on all application memory. [2]
Verification history: in the HDF5 1.14.6 control, a strict read reused values loaded earlier with checking disabled or a continuing failure callback. Fresh-reader and zero-cache controls rejected the same damaged bytes. Separate permissive salvage from acceptance; a later checking flag alone does not establish the history of decoded cached data. [4] [5]
Relations
- related
- HDF5, HDF5 chunked layout, Page cache, Cache pollution
Citations
- The HDF Group: Chunking in HDF5, chunk caching and filters
- h5py 3.15: File objects, Python file-like objects and chunk cache
- Hesela: HDF5 chunk cache, measured file-driver reads
- HDF5 1.14.6: H5Dchunk.c, edge filtering and chunk-cache paths
- Hesela: HDF5 checksum coverage and reader-state observations
Sources & caveats
- The measured control used h5py 3.15.0 with HDF5 1.14.6. Seventeen slots was not established as a general optimum; decode volume was inferred, not directly instrumented.