TECHNOLOGY

MLServer queue metrics: batching backlog differs from worker backlog

In this article
THE QUICK TAKE

Queue size reports where pending work is observed; it does not by itself establish accelerator utilization or a measured model-execution duration.

The latency graph rises while execution looks stable

A prediction service records stable isolated model durations but slower caller responses during bursts. An operator sees a queue metric grow and immediately adds accelerator capacity. The pending work may instead be observed at a batching boundary or at communication with inference workers, which require different investigation.

Name the boundary represented by each measurement before combining graphs. Request latency, queue occupancy and model computation are related observations, but none is a direct substitute for the others.

MLServer exposes separate internal queues

The metrics guide distinguishes batch_request_queue for adaptive batching from parallel_request_queue for inference-worker communication. It also documents request success and failure counters and transport-specific metrics.

A queue-size observation is not automatically a duration measurement. Its interpretation depends on arrivals, service rate and where the item is counted. Do not label the metric as GPU execution time merely because the queued requests eventually invoke a GPU model.

Batching intentionally introduces a gathering boundary

The adaptive-batching guide describes collecting requests subject to batch size and waiting-time settings. A batching queue can therefore reflect the configured gathering policy as well as a workload that the service cannot keep up with.

Latency-stage diagnosis provides a transferable approach: distinguish arrival waiting, input handling, model work and output delivery. Inspect the request population before attributing every increase to the same cause.

Worker communication has its own capacity path

The parallel-inference guide describes process workers and communication overhead. A growing worker queue should prompt inspection of worker availability, model membership and execution behavior, rather than an assumption that batching settings alone determine the delay.

Terminal request consistency adds another boundary: the final caller outcome needs evidence beyond a model result or queue decrement. A completed model computation may still be followed by response handling or a caller timeout.

Correlate controlled load with several observations

Keep model revision and input distribution fixed, vary arrival intensity and record both queue metrics alongside caller latency and successful responses. Add a clearly scoped runtime measurement when actual model duration is required.

Check whether each metric includes model-name and model-version labels before comparing model slices. A useful diagnosis identifies the observed bottleneck and the scope of the evidence, without presenting a generic queue graph as proof of a specific hardware deficiency.

Earn rental income from GPUs

Have idle GPUs or looking to fund AI infrastructure? Retrivium finds a rental platform, sets up the server and helps you assess income and costs with a pilot.

Explore GPU hosting
← All articles