Identify statistics to track block cache performance improvements

XMLWordPrintableJSON

    • Type: Task
    • Resolution: Done
    • Priority: Major - P3
    • None
    • Affects Version/s: None
    • Component/s: Block Cache
    • None
    • Storage Engines - Persistence
    • 896.214
    • SE Persistence backlog
    • None

      Motivation
      To justify enabling the block cache in production we need to quantify the benefit it delivers. Today the blockCache ServerStatus section (pali_block_cache.cpp) reports only requests.total/cached/noncached and cache size/count — enough for a raw hit ratio, but not enough to show the IO/latency avoided by serving a page from cache instead of the page server.

      Approach

      • Add counters for bytes/pages served from the cache (hits) versus fetched from the page server (misses) in BlockCache::tryGet() / put() (pali_block_cache.cpp).
      • Add an estimate of page-server round-trips and IO/latency avoided on hits (the disagg.pali.handle.GetCache AutoStat timings can inform this).
      • Surface the new counters in the blockCache ServerStatus section so they flow into FTDC and can drive the Grafana panels.

      Definition of Done

      • New perf stat(s) (bytes served from cache, page-server fetches avoided, estimated IO/latency saved) appear under db.serverStatus().blockCache and in FTDC.
      • A unit test in pali_test.cpp exercises hits and misses and confirms the counters reflect them.

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

              Created:
              Updated:
              Resolved: