vllm - 💡(How to fix) Fix [Bug]: Local prefix cache hit rate can be over-counted when scheduling retries after KV allocation failure [2 pull requests]

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…

Fix Action

Fixed

Code Example

Your output of `python collect_env.py` here
RAW_BUFFERClick to expand / collapse

Your current environment

<details> <summary>The output of <code>python collect_env.py</code></summary>
Your output of `python collect_env.py` here
</details>

🐛 Describe the bug

I observed that in some workloads the reported local prefix cache hit rate can become unexpectedly high.

After checking the scheduler path, it looks like local prefix cache stats may be recorded before the request is actually scheduled. In KVCacheManager.get_computed_blocks(), prefix cache stats are updated immediately after a local prefix cache lookup. However, the scheduler may later fail to allocate KV slots for that request, leaving it in the waiting queue.

If the same request is retried in a later scheduling step, it can perform the same local prefix cache lookup again and be counted again, even though it was not scheduled in the previous attempt.

Before submitting a new issue...

  • Make sure you already searched for relevant issues, and asked the chatbot living at the bottom right corner of the documentation page, which can answer lots of frequently asked questions.

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING