{
  "slug": "request-hit-ratio",
  "term": "Request hit ratio",
  "aliases": [
    "cache hit ratio",
    "request hit rate"
  ],
  "definition": "Request hit ratio is the fraction of counted cache requests classified as hits at a stated cache boundary.",
  "note": "Count repeated eligible accesses, not distinct keys; specify the request types, observation window, warmup treatment and rule for partial hits. The familiar hits/(hits + misses) formula applies when those categories exhaust the counted requests. A request hit ratio weights accesses equally; a byte hit ratio weights payload bytes. [size-aware]\n\nFor compatible, disjoint observations, divide summed hits by summed requests. An equally weighted average of window ratios describes an average window, not the pooled request population. An empty request population has an undefined ratio, not an observed zero-percent hit ratio. [prometheus-ratios]\n\nRocksDB distinguishes data, index and filter block-cache accesses. [rocksdb-cache] The measurement implication is that block-level counters do not directly establish application-request or SSD mapping-cache hit ratios; those require their own observation boundaries.\n\nA lower cache can observe a stream filtered by an upper cache. [mq-filtered] For a two-level read-only hierarchy with exactly one lower lookup per upper miss, no prefetch, retries or splitting, the application-level hit fraction is h1 + (1 - h1) * h2; h2 is conditional on reaching the lower level. Summing all level-local request counters uses a different population. [hesela-accounting]",
  "status": "shipping",
  "advantages": [],
  "limitations": [
    {
      "text": "A hit ratio alone does not determine latency, backend bytes or NAND operations; record the measurement boundary and cost of misses.",
      "citationIds": [
        "size-aware",
        "hesela-accounting"
      ]
    }
  ],
  "related": [
    "byte-hit-ratio",
    "miss-ratio-curve",
    "cache-admission",
    "mapping-cache"
  ],
  "supersedes": [],
  "supersededBy": [],
  "firstSeen": null,
  "lastSeen": null,
  "citations": [
    {
      "id": "size-aware",
      "title": "Einziger, Eytan, Friedman and Manes. Lightweight Robust Size Aware Cache Management. arXiv:2105.08770v2 (2021), section 1: request and byte hit ratios.",
      "url": "https://arxiv.org/pdf/2105.08770v2",
      "accessed": "2026-10-25"
    },
    {
      "id": "prometheus-ratios",
      "title": "Prometheus documentation. Recording rules: Aggregation; sum numerators and denominators separately before division.",
      "url": "https://prometheus.io/docs/practices/rules/#aggregation",
      "accessed": "2026-10-25"
    },
    {
      "id": "rocksdb-cache",
      "title": "RocksDB project. Block Cache: Statistics; separate data, index and filter block hits and misses.",
      "url": "https://github.com/facebook/rocksdb/wiki/Block-Cache#statistics",
      "accessed": "2026-10-25"
    },
    {
      "id": "hesela-accounting",
      "title": "Hesela. Pool counts before comparing hit ratios: illustrative arithmetic and measurement boundaries.",
      "url": "https://hesela.com/analyses/ssd-mapping-cache-hmb/#hit-ratio-accounting",
      "accessed": "2026-10-25"
    },
    {
      "id": "mq-filtered",
      "title": "Zhou, Philbin and Li. The Multi-Queue Replacement Algorithm for Second Level Buffer Caches. USENIX ATC 2001, pp. 91-104, sections 2.2 and 3.1.",
      "url": "https://www.usenix.org/legacy/event/usenix01/full_papers/zhou/zhou_html/",
      "accessed": "2026-10-25"
    }
  ],
  "updated": "2026-10-25"
}
