-
Type:
Improvement
-
Resolution: Unresolved
-
Priority:
Minor - P4
-
None
-
Affects Version/s: None
-
Component/s: None
-
Storage Engines - Persistence
-
358.9
-
SE Persistence backlog
-
None
Follow-up from WT-17788, which converted the cross-checkpoint shared disk cache's hash table from TAILQ to LIST because it never used the tail pointer TAILQ carries.
The (unrelated, older) on-disk block cache in src/block_cache/block_cache.c hashes WT_BLKCACHE_ITEM entries into blkcache->hash the same way: TAILQ_FOREACH / TAILQ_INSERT_HEAD / TAILQ_REMOVE only, on the "hashq" field, never a tail-only operation.
This hash table's bucket count is independently configurable via block_cache.hash_size, with WT_BLKCACHE_HASHSIZE_DEFAULT = 32768, WT_BLKCACHE_HASHSIZE_MIN = 512, and WT_BLKCACHE_HASHSIZE_MAX = 1GB (src/include/block_cache.h). At the default size this is a modest ~256KB saving, but a deployment configured near the max bucket count would waste multiple GB on the unused TAILQ tail pointer alone, making this the largest single opportunity of the hash tables identified as follow-ups to WT-17788.
Requires adding the LIST_* macros to src/include/queue.h if not already present from WT-17788.