Change default nslots value for chunk cache to 8191 (#5956)

In order to reduce hash collisions and take advantage of modern memory capacity, the default hash table size for the chunk cache has been increased from 521 to 8191. This means the hash table will consume approximately 64 KiB per open dataset. This value can be changed with H5Pset_cache() or H5Pset_chunk_cache(). This value was chosen because it is a prime number close to 8K.
This commit is contained in:
Neil Fortner
2025-10-31 14:48:05 -05:00
committed by GitHub
parent a6d7b94c0c
commit 85f7f8f083
5 changed files with 15 additions and 7 deletions
+2 -2
View File
@@ -720,7 +720,7 @@ public class TestH5Pfapl {
double[] rdcc_w0 = {0};
try {
H5.H5Pget_cache(fapl_id, null, rdcc_nelmts, rdcc_nbytes, rdcc_w0);
assertTrue("H5P_cache default", rdcc_nelmts[0] == 521);
assertTrue("H5P_cache default", rdcc_nelmts[0] == 8191);
assertTrue("H5P_cache default", rdcc_nbytes[0] == (8 * 1024 * 1024));
assertTrue("H5P_cache default", rdcc_w0[0] == 0.75);
}
@@ -748,7 +748,7 @@ public class TestH5Pfapl {
double[] rdcc_w0 = {0};
try {
H5.H5Pget_chunk_cache(dapl_id, rdcc_nslots, rdcc_nbytes, rdcc_w0);
assertTrue("H5P_chunk_cache default", rdcc_nslots[0] == 521);
assertTrue("H5P_chunk_cache default", rdcc_nslots[0] == 8191);
assertTrue("H5P_chunk_cache default", rdcc_nbytes[0] == (8 * 1024 * 1024));
assertTrue("H5P_chunk_cache default", rdcc_w0[0] == 0.75);
}