Hi vLLM team,
Thanks for the great work on vLLM.
I have a design question regarding the relationship between request priority scheduling and KV cache management.
As I understand it, vLLM currently supports request priorities for scheduling, where higher-priority requests are selected earlier from the waiting queue.
However, once a request starts running and its KV cache blocks are allocated, it seems that the KV cache manager no longer distinguishes between high- and low-priority requests. During cache eviction, blocks are selected according to the cache management policy, without considering the priority of the request that owns them.
This made me wonder whether this separation is an intentional design choice.
For example, suppose we have two requests:
- Request A (priority = high)
- Request B (priority = low)
Both have generated KV cache on the GPU. If GPU memory becomes full, KV blocks belonging to Request A could potentially be evicted before those belonging to Request B, resulting in recomputation and additional latency for the high-priority request.
From a QoS perspective, one could argue that request priority should perhaps influence not only scheduling, but also KV cache retention.
On the other hand, I can also imagine that introducing request priority into cache eviction may reduce overall cache reuse or hurt system throughput, so there are likely important trade-offs involved.
I also came across RFC #37003 on context-aware KV cache retention. My understanding is that the proposed retention priority is primarily motivated by expected future reuse, which seems different from request-level scheduling priority.
I’m curious about the maintainers’ thoughts on the following questions:
- Was it an intentional design decision to keep request scheduling priority and KV cache management independent?
- Have you considered allowing eviction policies to optionally incorporate request priority?
- Do you see request priority and retention priority as two orthogonal concepts, or could they eventually be combined within a unified cache management policy?
I’d really appreciate any insights into the design rationale. Thanks!