Stage 13, Part 4 of 9, AI/ML Workload Orchestration
Text
PART 4: CAPACITY PLANNING & COST MODELING
16. GPU Utilization and Cost Modeling
GPU Utilization Targets
| Metric | Target | Action if Below |
| GPU utilization | > 70% | Rightsize, consolidate |
| KV-cache hit rate | > 50% | Cache-aware routing |
| Queue depth | < 5 | Scale up |
| Batch size | Maximize | Tune continuous batching |
Cost Per Token
The optimization goal for inference is cost per token:
text
Cost per token = (GPU cost per hour) / (Tokens per hour)
Example:
- A100: $3/hour
- Throughput: 10,000 tokens/second
- Tokens per hour: 36M
- Cost per token: $3 / 36M = $0.000000083
Optimization Playbook
| Strategy | Savings |
| vLLM vs naive | 2–24x throughput |
| Continuous batching | 2–4x |
| PagedAttention | 2–4x memory efficiency |
| KV-cache offloading | 30–50% |
| Cache-aware routing | 10x on cache hits |
| Quantization | 2x memory reduction |
17. Cost Per Token Optimization
The Four Levers
| Lever | Impact | Effort |
| Inference engine | 2–24x | Low |
| Batching | 2–4x | Low |
| KV-cache | 10x on hits | Medium |
| Hardware | 2–3x | High |
Real-World Results
| Company | Result |
| Stripe | 73% cost reduction with vLLM (50M daily calls, 1/3 fleet) |
| Google Cloud | Tiered KV-cache extends effective cache size |
| Kubex | 80% of containers underutilizing GPU allocation |
18. SLA & Availability Design
Availability Math
text
99.9% = 8.76 hours downtime/year
99.99% = 52.56 minutes downtime/year
99.999% = 5.26 minutes downtime/year
AI Workload SLA Design
| Target | Architecture |
| 99.9% | Single inference replica, basic monitoring |
| 99.99% | Multiple replicas, KEDA autoscaling, model caching |
| 99.999% | Multi-region, warm pools, cache-aware routing, chaos-tested |
Cold Start SLA
| Strategy | Cold Start | SLA Impact |
| No caching | 5 min | ❌ Autoscaling fails |
| Local NVMe | 30 sec | ⚠️ Slow but works |
| Warm pool | <10 sec | ✅ Acceptable |
| Always-on | 0 sec | ✅ Best but costly |
1:1 copy of the class Google Doc, code in code blocks.