﻿# MLServer queue metrics: batching backlog differs from worker backlog

Read MLServer batch_request_queue and parallel_request_queue as different queue boundaries, then connect them to request latency without inventing model-compute timings.

Author: Retrivium editorial team
Updated: 2026-11-04
Canonical URL: https://retrivium.ai/journal/fg2-mlserver-batch-worker-queue-metrics-model-compute/
Language: en

## 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](https://docs.seldon.ai/mlserver/user-guide/metrics) 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](https://docs.seldon.ai/mlserver/user-guide/adaptive-batching) 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](/journal/triton-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](https://docs.seldon.ai/mlserver/user-guide/parallel-inference) 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](/journal/provider-terminal-request-record-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.
