Stage 13, Part 3 of 9, AI/ML Workload Orchestration

Text

PART 3: PRODUCTION FAILURE MODES

13. Top 10 AI/ML Orchestration Failures

#FailureSymptomRoot CauseFix
1Distributed training deadlockAll pods PendingNo gang schedulingUse Volcano/KAI
2Cold start timeoutAutoscaling failsModel loading takes 5+ minModel caching, warm pool
3KV-cache miss stormHigh latency, low throughputCache-blind routingllm-d, Gateway API
4GPU OOMKillPod killed mid-requestModel + KV-cache exceeds VRAMReduce batch size, quantize
5KEDA metric unavailableAutoscaling stuckPrometheus scrape failureFix ServiceMonitor
6Model cache staleWrong model servedCache not invalidatedVersion cache keys
7Gang scheduling deadlockPods Pending foreverminMember > available GPUsReduce workers, add GPUs
8Queue starvationOne team monopolizes GPUNo fair-share policyKueue/KAI queues
9Tensor parallel mismatchOOMKill mid-requestnum-shard > GPU countMatch num-shard to GPUs
10Cache-aware routing misconfiguredNo cache hitsWrong routing policyTune llm-d policies

14. AI Workload Debugging Runbook

"Distributed Training Job is Deadlocked" — Step-by-Step

text
STEP 1: Check job status
  $ kubectl get pods -l job-name=<job>
  # Look for Pending pods

STEP 2: Check PodGroup/Workload status
  $ kubectl get podgroup <name> -o yaml
  # Check minMember vs scheduled

STEP 3: Check GPU availability
  $ kubectl describe nodes | grep -A5 "nvidia.com/gpu"

STEP 4: Check gang scheduling
  $ kubectl get job <name> -o yaml | grep schedulerName
  # Should be "volcano" or "kai-scheduler"

STEP 5: Check queue status
  $ kubectl get queue -o yaml

STEP 6: Check for resource deadlock
  # How many GPUs needed? How many available?
  # If needed > available → deadlock

STEP 7: Fix
  # Option A: Reduce workers
  # Option B: Add GPUs
  # Option C: Check other jobs holding GPUs

STEP 8: Escalate

"Inference Latency is High" — Step-by-Step

text
STEP 1: Check GPU utilization
  $ kubectl port-forward -n gpu-operator svc/nvidia-dcgm-exporter 9400:9400
  curl localhost:9400/metrics | grep DCGM_FI_DEV_GPU_UTIL

STEP 2: Check vLLM queue depth
  $ kubectl port-forward svc/vllm 8000:8000
  curl localhost:8000/metrics | grep num_requests_waiting

STEP 3: Check KV-cache hit rate
  curl localhost:8000/metrics | grep prefix_cache_hit

STEP 4: Check routing
  # Is traffic going to the same pod?
  $ kubectl get endpoints vllm

STEP 5: Check model caching
  # Is the model cached locally?
  $ kubectl exec -it <vllm-pod> -- ls /models

STEP 6: Escalate

15. Blast Radius Analysis

What Happens When AI Orchestration Fails?

ComponentImpactSeverity
Gang scheduling failureAll distributed training deadlockedSEV-1
Inference engine downAll LLM requests failSEV-1
KEDA downNo autoscaling, capacity fixedSEV-2
KV-cache routing failure10x latency, 10x costSEV-2
Model cache corruptionWrong model servedSEV-1
Queue starvationOne team blocks othersSEV-2
Cold start timeoutAutoscaling ineffectiveSEV-2

Mitigation Strategies

StrategyImplementation
Gang schedulingVolcano or KAI Scheduler
Model cachingLocal NVMe, warm pools
Cache-aware routingllm-d, Gateway API
KEDA autoscalingQueue-depth metrics
Queue fairnessKueue, KAI queues
GPU monitoringDCGM, Prometheus

1:1 copy of the class Google Doc, code in code blocks.