﻿# GKE TGI autoscaling: batch, queue and latency evidence

Google’s L4/TGI study compares batch, queue and GPU-activity scaling signals. Preserve its latency definition and workload-specific target selection.

Author: Retrivium editorial team
Updated: 2026-11-05
Canonical URL: https://retrivium.ai/journal/gke-tgi-autoscaling-batch-queue-latency-study/
Language: en

## What Google's TGI experiment compared

Google's [GKE autoscaling study](https://cloud.google.com/blog/products/containers-kubernetes/tuning-the-gke-hpa-to-run-inference-on-gpus?hl=en) compares GPU duty cycle, current batch size and waiting queue size for TGI serving Llama 2 7B on L4 GPUs. It is a concrete experiment about choosing a scaling signal. It does not establish one threshold for every model, accelerator or inference engine.

A signal should represent the pressure the controller is meant to relieve. A busy GPU can be processing an efficient batch or struggling with a queue. The same activity percentage therefore need not imply the same user-visible latency. Conversely, an empty waiting queue does not mean that active requests have completed.

## Preserve the latency metric's definition

The study's mean time per token combines prefill and decode duration and divides by generated output tokens per request. It is not a measurement of every individual gap in a streamed response. An average of this kind can also change when the output-length distribution changes.

The burst experiments report queue-based scaling keeping this mean below about 0.4 seconds, while batch-based scaling stays almost below about 0.3 seconds. Those are conditional observations from the reported workload. They should not be relabeled as guaranteed tail-token latency or as an availability objective.

To assess user experience separately, retain first-token time, streaming gaps, completion times and unsuccessful requests. A controller may improve an average while some requests still wait too long. The [goodput guide](/journal/llm-goodput-vs-tokens-per-second/) explains why useful completions require an explicit acceptance rule.

## Calibrate the target against a workload curve

Google selected targets experimentally from throughput-versus-latency behavior and then tested traffic bursts. The study's two groups of experiments use different machine configurations. Their numerical targets should remain attached to their respective experiments rather than treated as interchangeable defaults.

For a new workload, the reviewable output is a curve and a chosen operating region. Include prompt and output distributions, offered traffic, ready capacity and queue evolution. A target close to maximum batching may leave little room for a scaling signal to cross its threshold. A more conservative target can trade retained capacity for lower delay; the tradeoff needs measurement rather than a universal ranking.

## The metric is only one part of the loop

[Kubernetes documents HPA](https://kubernetes.io/docs/concepts/workloads/autoscaling/horizontal-pod-autoscale/) as an intermittent control loop. It also documents downscale stabilization using the highest recent recommendation within the configured window. Metric sampling, recommendation history, permitted scaling changes and model readiness are different stages.

Changing a queue target cannot make unloaded weights immediately ready. Similarly, delayed downscaling can reflect stabilization rather than a failure to observe lower traffic. The [stabilization and warmup guide](/journal/guide-ks-hpa-stabilization/) explains how to keep these mechanisms separate when reading a timeline.

## What the study supports in practice

The experiment provides evidence that server-level batch and queue metrics can track this TGI workload more usefully than GPU activity alone. It does not independently validate the same behavior in another engine simply because a similarly named metric exists.

Before transferring the result, verify the metric's unit, aggregation population and measurement boundary in the selected server release. Then compare the same traffic trace under matched resource accounting, including warmup and failures. This preserves the study's practical lesson without turning its observed averages into a service guarantee.
