vllm
vllm copied to clipboard
[Performance]: Profile & optimize the BlockManagerV2
Proposal to improve performance
We've recently rewritten the block management subsystem for better testability. We need to profile it under real load to make sure it is performant enough to replace the block manager V1, and fix any issues.
We should do this once the block manager v2 is feature complete (still missing a few items).
Known issue:
- Prefix caching
num_total_tokensis O(N^2) instead of O(N) (see https://github.com/vllm-project/vllm/pull/4142#discussion_r1585245813)