Startup Memory Race Condition in vLLM Multi-Instance GPU Sharing: Cisco DevNet Engineers Explain Why Two Flags Are Indispensable
The Cisco DevNet platform engineering team encountered a concurrent startup memory race condition when deploying three vLLM inference instances on a single NVIDIA A10G GPU. They explain how vLLM's default mechanism of allocating KV cache based on visible free memory at startup leads to overselling among multiple instances, and why using only the --kv-cache-memory flag to fix the cache size is insufficient—lowering the --gpu-memory-utilization target is also required, otherwise subsequent instances will fail to come online due to startup check failures.
Time-slicing divides the GPU's compute time among multiple instances but does not partition video memory (VRAM). The Cisco DevNet platform engineering team configured AWS g5.2xlarge instances to run three time-sliced replicas per NVIDIA A10G (approximately 23 GiB VRAM) for their GPU learning labs. This means three learners share the same VRAM pool with no hardware isolation boundary between them. Since the A10G does not support MIG (Multi-Instance GPU), hardware-level partitioning is not an option.
The issue lies in vLLM's startup logic. Each vLLM instance determines its own KV cache size based on the free VRAM it sees at startup. When three instances start almost simultaneously, each believes it has exclusive access to most of the VRAM and requests a large chunk of cache independently—resulting in overselling. Typically, only the first instance starts successfully, while the other two report errors: "No available memory for the cache blocks." This phenomenon is documented in vLLM community issue #10643, but no complete solution for multi-instance coexistence was provided there.
The Cisco team's fix requires two flags working together because vLLM makes two separate memory decisions at startup. The first is --kv-cache-memory 3120851354, which fixes each instance's KV cache at 2.91 GiB, stopping dynamic measurement from free memory. Without measurement, there is no race—three instances no longer compete for the same unoccupied space.