Time-Slicing Cross-Pod VRAM Exhaustion
Kubernetes GPU time-slicing multiplexes compute execution time, but it provides absolutely zero hardware-level memory isolation. If a physical GPU with 24GB VRAM is time-sliced into 4 logical GPUs, Kubernetes allows scheduling 4 pods to it. If Pod A (the 'noisy neighbor') allocates 20GB of VRAM, Pods B, C, and D will instantly encounter CUDA OOM errors because the physical memory pool is exhausted, despite Kubernetes acting as if they each possess dedicated resources.
Kubernetes GPU time-slicing multiplexes compute execution time, but it provides absolutely zero hardware-level memory isolation.
- Root cause
- Kubernetes GPU time-slicing multiplexes compute execution time, but it provides absolutely zero hardware-level memory isolation. If a physical GPU with 24GB VRAM is time-sliced into 4 logical GPUs, Kubernetes allows scheduling 4 pods to it. If Pod A (the 'noisy neighbor') allocates 20GB of VRAM, Pods B, C, and D will instantly encounter CUDA OOM errors because the physical memory pool is exhausted, despite Kubernetes acting as if they each possess dedicated resources.
- Recommended fix
- Enforce Application-Level Memory Limits For PyTorch: torch.cuda.set_per_process_memory_fraction(0.25) / For TF: set memory_growth or virtual_device memory limit. Since the infrastructure cannot isolate the memory, the applications must be configured to artificially restrict their own VRAM allocation, preventing them from stepping on each other.
- How Denpex helps
- Denpex investigates Time-Slicing Cross-Pod VRAM Exhaustion using the evidence you provide or your connected workload collects. Earlier rank, host or application evidence is needed to distinguish an initiating failure from a downstream report.
What this failure is
Time-Slicing Cross-Pod VRAM Exhaustion is a Memory failure seen during ML training runs. Kubernetes GPU time-slicing multiplexes compute execution time, but it provides absolutely zero hardware-level memory isolation. If a physical GPU with 24GB VRAM is time-sliced into 4 logical GPUs, Kubernetes allows scheduling 4 pods to it. If Pod A (the 'noisy neighbor') allocates 20GB of VRAM, Pods B, C, and D will instantly encounter CUDA OOM errors because the physical memory pool is exhausted, despite Kubernetes acting as if they each possess dedicated resources. Common tags: Isolation.
Is this what broke your run? Paste your log.
You're reading about Time-Slicing Cross-Pod VRAM Exhaustion. Paste your own traceback and relevant evidence for an investigation of your workload, with a next action or a specific missing fact. A reference entry does not establish your cause. No account or card for the free diagnosis. Review data handling before submitting sensitive logs.
Before uploading, review cloud data handling and local options.
Upload your log file. Large files are processed in your browser. Only selected evidence is submitted when you run diagnosis.
Why it happens (the mechanism)
The user requested 'nvidia.com/gpu: 1' in their pod spec, which conventionally implies exclusive access to a GPU. The scheduling succeeds, so the user assumes they have sufficient resources. The failure appears non-deterministic because it depends entirely on the concurrent memory usage of other tenants on the same physical card.
What you'll observe
- CUDA_ERROR_OUT_OF_MEMORY during context initialization
- Failed to allocate memory for the GPU context
Common symptoms and what they mean
| Symptom | Why it happens |
|---|---|
| A newly scheduled pod immediately crashes with an OOM error upon startup. | Kubernetes GPU time-slicing multiplexes compute execution time, but it provides absolutely zero hardware-level memory isolation. If a physical GPU with 24GB VRAM is time-sliced into 4 logical GPUs, Kubernetes allows scheduling 4 pods to it. If Pod A (the 'noisy neighbor') allocates 20GB of VRAM, Pods B, C, and D will instantly encounter CUDA OOM errors because the physical memory pool is exhausted, despite Kubernetes acting as if they each possess dedicated resources. |
| Existing, previously stable pods suddenly crash with CUDA OOMs at random intervals. | Kubernetes GPU time-slicing multiplexes compute execution time, but it provides absolutely zero hardware-level memory isolation. If a physical GPU with 24GB VRAM is time-sliced into 4 logical GPUs, Kubernetes allows scheduling 4 pods to it. If Pod A (the 'noisy neighbor') allocates 20GB of VRAM, Pods B, C, and D will instantly encounter CUDA OOM errors because the physical memory pool is exhausted, despite Kubernetes acting as if they each possess dedicated resources. |
| Occurs exclusively on nodes where GPU time-slicing (e.g., replicas: 4) is enabled. | Kubernetes GPU time-slicing multiplexes compute execution time, but it provides absolutely zero hardware-level memory isolation. If a physical GPU with 24GB VRAM is time-sliced into 4 logical GPUs, Kubernetes allows scheduling 4 pods to it. If Pod A (the 'noisy neighbor') allocates 20GB of VRAM, Pods B, C, and D will instantly encounter CUDA OOM errors because the physical memory pool is exhausted, despite Kubernetes acting as if they each possess dedicated resources. |
Which systems are affected
- NVIDIA GPU Operator
- Time-Slicing Device Plugin
How to confirm this is the problem
Use this checklist to test the hypothesis against a small reproduction. No single line proves the root cause, so preserve the preceding events and compare one variable at a time.
- ✓Check node configuration to confirm time-slicing is active: kubectl get node -o yaml | grep 'nvidia.com/gpu.replicas'
- ✓Run 'nvidia-smi' on the node to view the aggregated memory usage of all processes sharing the GPU.
Root cause
- Kubernetes GPU time-slicing multiplexes compute execution time, but it provides absolutely zero hardware-level memory isolation. If a physical GPU with 24GB VRAM is time-sliced into 4 logical GPUs, Kubernetes allows scheduling 4 pods to it. If Pod A (the 'noisy neighbor') allocates 20GB of VRAM, Pods B, C, and D will instantly encounter CUDA OOM errors because the physical memory pool is exhausted, despite Kubernetes acting as if they each possess dedicated resources.
The fix and how to prevent it
The fix and the prevention pattern
The root cause is on this page and stays free. A free account adds the exact remediation steps, saved history, and the fix on every entry in the encyclopedia.
Sign up free. Unlock the full analysisNo credit card. Daily allowance follows verified trust tier. Instant access.
Diagnose this failure in VS Code
Select the traceback or open the failed terminal, then run Denpex locally to see the initiating rank, collateral failures, exact fix, and verification command without uploading the log.
Install the free VS Code extensionDon't just read the fix, diagnose your run
The encyclopedia tells you what went wrong. Denpex tells you what went wrong in YOUR training run. With your logs, your config, and your stack.