GPU Failures in Kubernetes: Handling Device Failures Without Endless Pending
Meta
NVIDIA
In 2024, Meta's cluster of 16,384 H100s training Llama 3 405B experienced 419 interruptions, with 58.7% attributed to GPUs. Kubernetes often handles such failures by simply restarting containers on the same dead device, leading to endless Pending states. This article explains how the new Dynamic Resource Allocation (DRA) features in Kubernetes 1.36 finally offer a way out, using a live demo on a VK Cloud managed cluster.
The article highlights Meta's experience training Llama 3 405B, where the cluster of 16,384 H100 GPUs saw 419 interruptions, 58.7% of which were GPU-related. It points out that Kubernetes traditionally treats device failures like stateless service failures, attempting a restart on the same broken GPU, which leads to a crash loop. To address this, Kubernetes 1.36 introduces several mechanisms: DRA (Dynamic Resource Allocation) is stable since 1.34, providing an object-based model instead of a simple counter; prioritized list (firstAvailable) for backup devices; device health status in pod status; device taints and tolerations; and device binding conditions, among others. The author builds a test stand on VK Cloud Managed Kubernetes 1.36 with a GPU node and simulates a GPU failure by hot-removing the PCIe device. They show that the node reports the device as unhealthy and the allocatable count drops, but the pod keeps restarting on the dead GPU without any rescheduling. The article concludes by explaining why Kubernetes offers no built-in descheduling for CrashLoopBackOff pods and mentions DIY patterns like node health controllers that kill the entire node, which is a blunt instrument.
- Сокращения
- GPU = Graphics Processing Unit — графический процессор
- H100 = Hopper 100 — модель GPU NVIDIA
- K8s = Kubernetes — кубернетес
- DRA = Dynamic Resource Allocation — динамическое выделение ресурсов
- Xid = Xid error code — код ошибки Xid
- PCIe = Peripheral Component Interconnect Express — шина PCI Express
- NVML = NVIDIA Management Library — библиотека управления NVIDIA
- NVLink = NVIDIA NVLink — высокоскоростной интерфейс NVIDIA
- HBM3 = High Bandwidth Memory 3 — высокопропускная память третьего поколения
- CNCF = Cloud Native Computing Foundation — CNCF
- API = Application Programming Interface — программный интерфейс приложения
- KEP = Kubernetes Enhancement Proposal — предложение улучшения Kubernetes
- DCGM = NVIDIA Data Center GPU Manager — менеджер GPU центров обработки данных NVIDIA
- DRA-драйвер = DRA driver — драйвер DRA
- MIG = Multi-Instance GPU — многоинстансный GPU
Source: Habr — хаб ML —
original
