The Cold-Start Penalty in LLM Inference: How Queue Depth and Warm Pools Balance Latency and GPU Spend

The Cold-Start Penalty in LLM Inference: How Queue Depth and Warm Pools Balance Latency and GPU Spend
The Cold-Start Penalty in LLM Inference: How Queue Depth and Warm Pools Balance Latency and GPU Spend

Autoscaling a typical stateless web service is straightforward: when load rises, start another copy, and it is ready within seconds. Autoscaling LLM inference is harder. A new GPU replica has to be scheduled onto a node, download a container image, load model weights into GPU memory, initialize the inference engine, and only then can it accept its first request.

That delay is the cold-start penalty. If you scale on the same signals you use for web services, new capacity will arrive after the damage is done. Our earlier post covers cold starts and queue-based scaling on Nebula Block. This post goes deeper on how many warm replicas to keep.

The short answer

Scale on queue depth and queue wait time, not on GPU utilization. Keep a warm pool (replicas that are already loaded and idle) sized to your traffic bursts, not to your average load. There is no free setting: every warm GPU costs money, and every cold start costs latency. Make that trade-off explicit.

What happens during a cold start

A new replica goes through several phases before it can serve traffic:

Phase

What takes the time

Scheduling

Finding a GPU node, or waiting for one to be provisioned

Image pull

Downloading a multi-gigabyte container image to the node

Weight load

Reading model weights from storage into GPU memory

Engine initialization

Setting up the runtime and preparing it to serve

The weight load is easy to underestimate. At 2 bytes per parameter, a 70B-parameter model in FP16 has about 140 GB of weights (70 billion × 2 bytes). Reading that much data into GPU memory takes time proportional to your storage bandwidth: at 1 GB/s it is over two minutes, and at 5 GB/s it is under 30 seconds.

How long each phase takes depends on your model, hardware, storage and infrastructure, so measure your own end-to-end cold-start time per model instead of relying on generic numbers. For large models it is typically a matter of minutes rather than seconds, and that is the number every other decision in this post depends on.

During those minutes, requests that arrive because you are already saturated wait in a queue.

Why GPU utilization is the wrong trigger

GPU utilization tells you a replica is busy. It does not tell you how many requests are waiting. Modern inference engines batch requests continuously, which keeps GPUs busy whether the queue holds two requests or two hundred. By the time utilization looks high, you have no information about how bad things are about to get.

The metrics that predict the spike

Watch these, roughly in this order of usefulness:

  1. Queue depth: requests accepted but not yet scheduled on a replica. It is one of the first signals to move when you are falling behind.
  2. Queue wait time (p95): how long a request sits before processing starts. This is the delay your users feel first.
  3. Active requests per replica vs. the configured maximum: how close each replica is to its limit.
  4. KV cache headroom: when the memory used for attention state is full, a replica stops accepting new requests even if its compute looks idle.
  5. Time to first token (p95): the symptom. If you alert only on this, you are already late.

A practical starting point: trigger scale-up when p95 queue wait reaches a fraction of your time-to-first-token budget, such as 25–30%, instead of waiting until it hits the budget. Because new replicas take a full cold-start time to arrive, scaling has to begin before users are affected. Tune the fraction against your own traffic.

Warm pools: paying to skip the queue

A warm pool is a set of replicas that are loaded and idle, ready to accept requests immediately. The design question is how many to keep.

Approach

How it works

Trade-off

Fixed floor

Always keep N replicas warm

Predictable, but wasteful when traffic is low

Schedule-based

Change N by hour or day based on historical traffic

Cheap for regular patterns, blind to surprises

Burst-headroom

Keep enough spare capacity to absorb the largest burst seen recently

Follows reality, but needs good metrics

Sizing for burst headroom

The idea: new replicas cannot arrive within one cold start, so the capacity that is already warm must absorb whatever burst arrives during that window. The steps:

  1. Measure the peak arrival rate over windows as long as your cold-start time (use a high percentile, such as p95, over the last several days).
  2. Multiply it by the average request duration to get the number of requests being processed at once (this is Little's law: concurrency = arrival rate × time in system).
  3. Divide by the concurrent requests one replica can handle, and round up.

An example with made-up numbers:

peak_arrival_rate     = 30 requests/min
avg_request_duration  = 1.5 min
capacity_per_replica  = 12 concurrent requests
concurrent load       = 30 × 1.5 = 45 requests
replicas needed       = 45 / 12 = 3.75, so 4

If you normally run fewer than 4 replicas at that moment, the difference is the warm capacity you need to hold idle. Multiply it by your GPU hourly price to see what it costs to never show a cold start to users at p95. Whether that is worth it is a business decision, and this calculation makes the cost visible.

Shrinking the penalty itself

Warm pools hide cold starts. These measures make them shorter:

  • Pre-pull container images onto GPU nodes so the download is off the critical path.
  • Keep model weights on fast local storage (such as local NVMe) or a fast shared cache. Weight loading is usually the largest single phase for big models.
  • Use a smaller or quantized model as an overflow tier. A model that loads faster can serve the burst while full-size replicas come up.
  • Apply admission control with honest backpressure. A fast 429 Too Many Requests with a Retry-After header is better for clients than a long wait that ends in a timeout.

Scale-down is where the money is

Most teams tune scale-up and forget scale-down. Two rules help:

  • Drain, don't kill. Let in-flight requests finish and stop sending new ones to the replica.
  • Add hysteresis. Scale down only after the queue has stayed near zero for longer than one cold start. Otherwise you risk flapping: removing a replica and immediately needing it back, which costs you both the idle GPU time and another cold start.

Checklist

  • Measure your actual cold-start time end to end, for each model.
  • Put weights on fast local storage and pre-pull images.
  • Add scale-down hysteresis of at least one cold start.
  • Size the warm pool from your measured peak, and write its cost down next to it.
  • Start scaling up early enough to cover one cold-start time.
  • Alert on p95 queue wait, not on GPU utilization.

Takeaway

The cold-start penalty is a fixed tax on every scale-up event. You can pay it in latency (no warm pool), in GPU hours (a large warm pool), or in engineering effort (shrinking the penalty itself). The mistake is not choosing. It is letting GPU utilization choose for you.

Learn more at