Skip to content

Expose KV-cache hit metrics by storage tier #18465

Closed

Description

@cquil11

Problem

TensorRT-LLM exposes aggregate KV-cache metrics such as kv_cache_hit_rate and prompt_cached_tokens_total, plus host-cache utilization and onboard/offload byte counters.

When KV-cache offloading is enabled, these metrics do not identify whether reused tokens were served from GPU memory, host memory, disk, or another tier. Transfer counters cannot reliably reconstruct cache-hit attribution.

Request

Please expose monotonic Prometheus counters attributing reused tokens or blocks to their source tier, for example:

trtllm_prompt_cached_tokens_total{cache_tier="gpu"}
trtllm_prompt_cached_tokens_total{cache_tier="host"}
trtllm_prompt_cached_tokens_total{cache_tier="disk"}
trtllm_prompt_cached_tokens_total{cache_tier="remote"}

An equivalent tier-labeled cache-hit counter would also work. Ideally:

  • Every cache hit is attributed to exactly one tier.
  • Tier totals sum to the existing aggregate value.
  • Host-cache hits are distinguishable from GPU-resident prefix-cache hits.
  • Metrics work with disaggregated serving and supported KV-cache managers.
  • Existing aggregate metrics remain available for compatibility.
  • Counter and reset semantics are documented.

Motivation

This would allow users to measure whether CPU offloading is actually serving requests, evaluate each cache tier, and correctly visualize token sources. Host utilization and transfer volume show data movement, but not whether requests benefited from host-cache hits.

Related work: #11243, #12132, and #12854.

Activity

  1. added
    Disaggregated serving
    on Aug 31, 2026
  2. self-assigned this
    on Sep 1, 2026
  3. removed their assignment
    on Sep 2, 2026
  4. zheyuf commented on Sep 2, 2026

    @zheyuf
    Collaborator

    Remove self-assign as @yizhang-nv already has an open PR.

  5. added a commit that references this issue on Sep 17, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Disaggregated serving

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions