Stage 13, Part 4 of 9 · p. 113, AI/ML Workload Orchestration

PART 4: CAPACITY PLANNING & COST MODELING

16. GPU Utilization and Cost Modeling

GPU Utilization Targets

MetricTargetAction if Below
GPU utilization> 70%Rightsize, consolidate
KV-cache hit rate> 50%Cache-aware routing
Queue depth< 5Scale up
Batch sizeMaximizeTune 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

StrategySavings
vLLM vs naive2–24x throughput
Continuous batching2–4x
PagedAttention2–4x memory efficiency
KV-cache offloading30–50%
Cache-aware routing10x on cache hits
Quantization2x memory reduction

17. Cost Per Token Optimization

The Four Levers

LeverImpactEffort
Inference engine2–24xLow
Batching2–4xLow
KV-cache10x on hitsMedium
Hardware2–3xHigh

Real-World Results

CompanyResult
Stripe73% cost reduction with vLLM (50M daily calls, 1/3 fleet)
Google CloudTiered KV-cache extends effective cache size
Kubex80% 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

TargetArchitecture
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

StrategyCold StartSLA Impact
No caching5 min❌ Autoscaling fails
Local NVMe30 sec⚠️ Slow but works
Warm pool<10 sec✅ Acceptable
Always-on0 sec✅ Best but costly

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