﻿# BentoML workers: model copies and request concurrency are different budgets

Understand why extra BentoML workers replicate model memory, while traffic concurrency and adaptive batching control different aspects of inference capacity.

Author: Retrivium editorial team
Updated: 2026-11-04
Canonical URL: https://retrivium.ai/journal/fg2-bentoml-worker-count-model-copy-concurrency-budget/
Language: en

## A larger worker count exhausts memory

An embedding service fits comfortably when started with a small worker count. An operator increases workers to accept a larger burst and the deployment begins failing during initialization. The input model did not grow: the deployment now initializes additional process-local model copies.

Separate the resident-model budget from the number of requests allowed into the service. These settings can interact, but they do not describe the same resource or provide interchangeable controls for overload.

## Each worker is a service process

The [worker guide](https://docs.bentoml.com/en/latest/build-with-bentoml/parallelize-requests.html) explains that workers execute homogeneous service logic in separate processes and load their own model copies. Assess the cumulative requirement, including framework allocations and temporary inference state, rather than multiplying only the checkpoint file size.

Increasing workers can also repeat initialization work and establish additional external connections. The relevant deployment unit is the running process and its dependencies, not just the Python class definition in the source repository.

## Traffic concurrency limits another dimension

The [configuration reference](https://docs.bentoml.com/en/latest/reference/bentoml/configurations.html) documents service traffic settings. A concurrency bound governs admission to the service; it is not a declaration that every admitted request gets a private process or a private accelerator.

[Allocated and reserved memory](/journal/cuda-oom-reserved-vs-allocated/) provides useful background when observing accelerator usage. A process can own framework memory beyond the live tensor payload, so an apparently small request does not establish that another worker will fit safely.

## Batching changes requests per worker

The [batching guide](https://docs.bentoml.com/en/latest/get-started/adaptive-batching.html) describes collecting requests for joint execution. A worker can therefore serve multiple request items without creating a model copy for each item. Batch size, live activations and execution time still need measurement.

Keep the model artifact and input distribution fixed when comparing worker settings. Otherwise an improvement from shorter inputs may be mistaken for a benefit from extra processes, concealing the memory cost under a different workload.

## Verify the deployment under sustained overlap

Record process count, model initialization events, steady resident memory and peak overlapping-request memory. Include cold startup and a sustained burst rather than measuring only an already-warm isolated prediction.

[Host memory pressure signals](/journal/cgroup-v2-memory-high-events/) help explain failures outside accelerator memory. A defensible worker configuration fits the complete deployment and meets its admission policy; it does not depend on the assumption that more processes automatically mean proportionally more useful model capacity.
