All entries

    vLLM Extensible KV Cache: Measure Throughput and Latency Separately

    Evaluate vLLM's extensible KV cache with a fair workload: separate throughput, first-token delay, per-token latency, memory use and failed requests.

    A pixel-art GPU workbench with expandable memory drawers beside two separate timing instruments and a queue of model requests.
    Original GPT-generated pixel-art editorial illustration; conceptual artwork, not a product screenshot or test result.

    A larger KV cache can help a server handle more work without making every individual answer faster. When evaluating vLLM's extensible KV cache, measure aggregate throughput and interactive latency separately. The useful result is a workload-specific trade-off, not a single speedup number detached from model, hardware and concurrency.

    Understand what is being stored

    During autoregressive generation, the KV cache retains attention-related state so the model does not recompute all earlier state for every generated token. Its footprint depends on model architecture, context, active sequences and implementation details. It is not interchangeable with the model weights or the operating system's file cache.

    The vLLM 0.34 release describes an extensible cache sized from memory available after warmup. Review the exact release notes and tuning documentation before changing defaults. A deployment sharing a GPU with other processes has a different memory situation from an otherwise idle dedicated device.

    Define the question before collecting numbers

    For a coding assistant, a useful question might be whether short interactive requests remain responsive while several long contexts are active. For a batch job, completed work per unit time may matter more. These are different acceptance criteria, so do not select a metric only after seeing which one improved.

    Write down the model revision, quantisation, GPU, runtime version, context limits and workload distribution. Keep them fixed across the comparison unless the change is explicitly part of the experiment. Include a warmup procedure and distinguish startup from steady-state service.

    EXPLAINED / SIDE BY SIDE

    Capacity and responsiveness are separate axes

    A larger usable cache may change admission and batching, while an individual request still has a latency budget.

    Capacity

    1. KV allocation

      Stores attention state for active sequences.

    2. Concurrent work

      More usable capacity can change how much work fits.

    Responsiveness

    1. First token

      Includes waiting and prompt processing on the observed path.

    2. Later tokens

      Decode timing affects how the answer arrives after it starts.

    THE KEY DISTINCTION

    Report both request-level timing and completed work. Neither substitutes for the other.

    Author-created explanatory diagram. Arrows show the process described in the article, not measured performance.

    Record a timing ledger for each request

    At minimum, retain submission time, first-token time, completion time, output-token count and final status using one monotonic timing source. Include queueing in the client-observed latency when that is what your user experiences. Server-only execution timing answers a narrower question.

    Scroll the table horizontally to see all columns.

    Record a timing ledger for each request
    MetricWhat it answersWhat to state alongside it
    Time to first tokenHow long until output starts?Queueing, prompt length and warmup state
    Time per output tokenHow quickly do later tokens arrive?Token-count definition and calculation method
    Output throughputHow much output completes over the interval?Concurrency and failed requests
    Completion latencyHow long until the full result is ready?Output length and stopping conditions
    Memory failuresHow often does the configuration fail?Attempt count and workload shape

    Use a transparent arithmetic example

    Suppose an invented request starts at zero, emits its first token at 0.8 seconds and finishes at 2.8 seconds with 21 output tokens. A simple post-first-token average is two seconds divided by 20 intervals, or 0.1 seconds per interval. This is a teaching calculation, not a vLLM benchmark or a claim about a particular GPU.

    The denominator matters. Dividing by all 21 tokens gives a different number. State the method, especially when comparing a tool that defines per-token timing differently. A polished chart cannot repair mismatched definitions between two runs.

    Sweep concurrency without moving every other variable

    Run the same workload at a few deliberate concurrency levels and retain raw per-request results. Separate short and long prompts if their behaviour differs. Use repeated runs and report variability rather than one best attempt. Do not hide a configuration that fails only at the highest offered load.

    If you compare cache modes or settings, use the supported options for the exact vLLM version and record their effective values. A cache improvement may increase completed work while changing decode timing. Whether that is acceptable depends on the service's latency and reliability targets, not on a universal ranking.

    Turn results into a deployment decision

    Choose the configuration that meets your actual constraints: interactive delay, completion reliability, cost and capacity. If a larger cache helps batch throughput but harms an important interactive path, consider workload separation or admission control rather than presenting the throughput gain as a blanket win.

    Publish the test method and limitations with any future chart. Until measurements exist, use a conceptual diagram such as this article's figure. It communicates the trade-off without manufacturing numerical evidence that readers might use to buy hardware or size a service.

    Frequently asked questions

    Does a bigger KV cache always reduce latency? No. Capacity, batching, concurrency and decode behaviour interact. Measure first-token and per-token timing under your representative workload instead of inferring latency from cache size.

    Are the performance figures in vLLM release notes our results? No. They are the project's reported results under its stated conditions. This guide describes how to run and label a separate comparison without claiming those measurements as ours.

    Should failed requests count in a benchmark? Yes. Report attempts, completed requests and failures. A throughput figure that quietly drops OOMs or timeouts can make an unreliable configuration look faster.

    FURTHER READING

    Sources

    Technical references checked .

    END OF ENTRY / 128
    Eeshan Singh with Big Ben in London
    BEHIND THE JOURNAL

    Eeshan Singh

    I’m Eeshan Singh Pokharia, an AI Full Stack Developer and CoFounder of UltraFit360. I work across AI features, full-stack product development, and web and mobile experiences—from Figma and frontend interactions to the systems behind them.

    The diagram is explanatory, and the timing examples are arithmetic fixtures. This article contains no invented GPU measurements and does not turn vLLM's release-note benchmarks into results from our own infrastructure.

    Meet the author
    THE CONVERSATION

    Your side of the story.