Ensure pages from cold collections never enter the block cache

XMLWordPrintableJSON

    • Type: Task
    • Resolution: Fixed
    • Priority: Major - P3
    • WT12.0.0, 9.0.0-rc0
    • Affects Version/s: None
    • Component/s: Block Cache
    • None
    • Storage Engines - Persistence
    • 368.61
    • SE Persistence backlog
    • None

      Motivation
      Caching cold-collection pages in the disaggregated victim block cache wastes capacity that should serve hot data. The victim cache is populated exclusively from eviction, via __evict_page_victim_cache() -> plh_cache_put(). Today that path admits cold and hot pages equally.

      Approach
      __evict_page_victim_cache() (src/evict/evict_page.c) is the only caller of plh_cache_put in WiredTiger, so the fix can live entirely in WiredTiger — no MongoDB/PALI change is required. Add an early return alongside the existing eligibility guards (root page, modified page, non-leaf) when the btree's storage tier is cold:

      /* Pages from cold collections must never enter the victim cache. */
      if (S2BT(session)->storage_tier == WT_BTREE_STORAGE_TIER_COLD)
          return;
      

      Placing the guard early also skips the compression, checksum and byte-swap work the function performs before the cache put, so cold pages become cheaper to evict, not more expensive.

      This supersedes the earlier MongoDB-side approach (propagating WT_PAGE_LOG_COLD into BlockCache::put() in pali_block_cache.cpp); handling it at the source means the flag never has to cross into PALI for this purpose.

      Definition of Done

      • Cold-collection pages are never inserted into the disaggregated victim block cache.
      • A statistic reflects cold pages skipped on eviction.
      • A test confirms a cold-tier btree's evicted page is not cached while a hot page is.

            Assignee:
            Etienne Petrel
            Reporter:
            Etienne Petrel
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: