← /blog
· ACE Engineering#in-house-gpu-fleet-stack #gpu-autoscaling #heterogeneous-dispatch #elastic-scaling #capacity-planning #cloud-infrastructure #finops #orchestration

Workload-Aware GPU Autoscaling: Eliminating Inference Cold Starts and Capacity Droop

Why standard Kubernetes cluster autoscalers fail on LLM inference workloads by over-provisioning wrong instance types or causing 10-minute cold starts. How workload-aware geometry matching and gateway merit-order spillover guarantee 100% inference uptime.

Executive Summary & TL;DR

  • The Priority: For enterprise AI platforms, production LLM inference pipelines must remain up 100% of the time. Customer-facing agents, real-time trading algorithms, and mission-critical APIs cannot tolerate request timeouts, cold-start stalls, or capacity droop during sudden traffic surges.
  • The Problem: When inference traffic spikes, existing on-premise or cloud GPU clusters reach saturation. Default Kubernetes cluster autoscalers (Karpenter, Cluster Autoscaler) fail inference in two critical ways: (1) they take 5 to 10 minutes to provision and boot new GPU instances, during which inference queues overflow, and (2) they are topology-blind, frequently provisioning mismatched instances (such as PCIe nodes without NVLink or cards with insufficient VRAM for large KV caches).
  • The Solution: ACE implements a Workload-Aware Capacity Scale-Up Signal Engine under Skill gpu_autoscaling (15). The engine intercepts pending inference requests, emits structured provisioning signals with exact accelerator geometries, and—crucially—bridges the 5-minute boot gap by immediately spilling excess inference traffic to reserved cloud capacity or managed APIs via merit-order routing.
  • Data-Driven Benchmark Results: Tested across five cluster workload traces comprising over 1,200 accelerators, the engine achieved 100.0% geometry precision across 1,545 evaluated scale-up recommendations, accurately costing capacity shortfalls from $1,508/hr up to $83,498/hr with zero mis-provisioned instances.

1. The Real-Time Inference Dilemma: Traffic Spikes vs. 10-Minute Boot Times

In modern AI serving, inference traffic rarely follows a smooth curve. Workloads experience sudden, massive surges:

  • A quantitative trading model executes a high-frequency hedging cascade during market volatility.
  • An enterprise workflow tool experiences thousands of concurrent user logins at the start of the business day.
  • A recursive agent workflow spawns dozens of parallel sub-agents, each submitting multi-turn context calls simultaneously.

When this surge exceeds local cluster capacity, traditional Kubernetes orchestration fails:

                            Standard Karpenter / CAS View:
                           ┌──────────────────────────────┐
                           │ Request: "nvidia.com/gpu: 8" │
                           └──────────────┬───────────────┘
                                          │
                  ┌───────────────────────┴───────────────────────┐
                  ▼                                               ▼
      ┌───────────────────────┐                       ┌───────────────────────┐
      │  8x L40S PCIe Node    │                       │ 8x H100 SXM5 NVLink   │
      │  ($16.50/hr)          │                       │ ($28.00/hr)           │
      └───────────┬───────────┘                       └───────────┬───────────┘
                  │                                               │
                  ▼                                               ▼
         ❌ Workload Crashes:                             ✅ Correct Placement:
       Requires 900 GB/s NVLink                         Tensor Parallelism Satisfied

The Three Fatal Inference Autoscaling Traps

  1. Topology Blindness: A tensor-parallel inference replica requiring TP=8TP=8 requests 8 GPUs. The autoscaler provisions instances connected via PCIe Gen 4 instead of NVLink. The inference engine crashes on startup during distributed communication initialization.
  2. KV-Cache VRAM Truncation: Serving long-context models (e.g. 128k token context) requires massive VRAM for the KV cache. A generic autoscaler provisions standard 80GB H100 cards instead of 141GB H200 cards, triggering immediate CUDA Out of Memory (OOM) errors under concurrency.
  3. The 5-to-10 Minute Boot Void: Even when the autoscaler picks the correct instance, spinning up a cloud GPU VM, loading a 40GB container image, initializing drivers, and downloading 70B model weights takes 5 to 10 minutes. During this window, inference requests queue up, gateway timeouts trigger (HTTP 504), and uptime SLAs are breached.

2. Delivering 100% Inference Uptime: Dual-Track Resolution

To guarantee that inference is up 100% of the time, ACE separates immediate request continuity from longer-term node provisioning through a dual-track architecture:

┌────────────────────────────────────────────────────────┐
│ Incoming Inference Surge (Token Velocity Spikes)       │
│ Gateway Queue Depth Exceeds Cluster Headroom Threshold │
└───────────────────────────┬────────────────────────────┘
                            │
            ┌───────────────┴───────────────┐
            ▼                               ▼
┌─────────────────────────────────┐   ┌─────────────────────────────────┐
│ Track 1: Immediate Zero-Cold-   │   │ Track 2: Workload-Aware JIT     │
│ Start Merit-Order Overflow      │   │ Node Autoscaling (Karpenter)    │
├─────────────────────────────────┤   ├─────────────────────────────────┤
│ • Immediately spills overflow   │   │ • Generates exact geometry CRD  │
│   requests to reserved cloud    │   │ • Matches cloud instance catalog│
│   capacity (Azure PTU / Bedrock)│   │   (e.g., aws.p5.48xlarge)       │
│ • Or bursts to managed APIs     │   │ • Pro-rates hourly shortfall cost│
│ • ZERO request drops, 0 latency │   │ • Provisions node in background │
│   cold-start spikes             │   │ • Ingests node into local pool  │
└─────────────────────────────────┘   └─────────────────────────────────┘
  1. Immediate Continuity via Merit Order: While new physical nodes are booting, excess inference queries are routed instantly to reserved cloud throughput (e.g. Azure PTU or Bedrock Model Units) or managed frontier endpoints. Not a single inference request is dropped, and users experience zero cold-start delay.
  2. Just-In-Time Node Provisioning: Simultaneously, the ACE Capacity Scale-Up Engine dispatches a precise CRD to Karpenter or KEDA, provisioning the exact instance type needed to bring the burst back onto cost-effective dedicated infrastructure.

3. Real-Time Pro-Rated Shortfall Costing

The scale-up engine computes exact hourly financial requirements based on hardware amortization and cloud on-demand pricing:

Estimated Hourly Cost=kOnDemandRate(Tk)×SliceFractionk\text{Estimated Hourly Cost} = \sum_{k} \text{OnDemandRate}(T_k) \times \text{SliceFraction}_k

For fractional GPU requests (MPS / MIG slices), the cost is pro-rated proportionally to requested memory:

Slice Cost=Base GPU Cost×min(1.0,max(0.01,VRAMrequestedVRAMphysical))\text{Slice Cost} = \text{Base GPU Cost} \times \min\left(1.0, \max\left(0.01, \frac{\text{VRAM}_{\text{requested}}}{\text{VRAM}_{\text{physical}}}\right)\right)

This formulation ensures that a single 10GB slice request on an H100 node triggers a small pro-rated recommendation rather than misrepresenting an immediate full-node $28.00/hr capital expenditure.


4. Empirical Benchmark Results Across 5 Cluster Traces

We evaluated the capacity scale-up engine across five diverse cluster workload traces to test geometry precision and financial reconciliation under heavy queue contention:

Workload Trace Profile Cluster Nodes / GPUs Total Scale-Up Signals Geometry Precision % Unplaced Gang Resolution Estimated Hourly Shortfall Cost
Alibaba Cloud PAI Trace 20 nodes / 160 GPUs 108 100.0% 100.0% $1,508.00/hr
Microsoft Research Helios 25 nodes / 200 GPUs 196 100.0% 100.0% $3,855.96/hr
Azure LMM Production 2025 32 nodes / 256 GPUs 239 100.0% 100.0% $7,475.80/hr
Quantitative Fleet Trace 48 nodes / 384 GPUs 502 100.0% 100.0% $24,348.00/hr
MLPerf v4 Training HPC 24 nodes / 192 GPUs 500 100.0% 100.0% $83,498.40/hr

Benchmark Telemetry Insights

  1. 100.0% Geometry Precision: Across all 1,545 evaluated scale-up recommendations, the engine correctly identified the exact hardware archetype, VRAM boundary, and interconnect requirement for every unschedulable pod.
  2. Zero Mis-Provisioned Instances: Unlike standard autoscalers that provision mismatched instances under pressure, ACE's topology-aware matching prevented 100% of non-NVLink placements.
  3. Accurate Capital Forecasting: In the 24-hour MLPerf v4 trace characterized by massive distributed demand, the engine accurately quantified an $83,498.40/hr shortfall cost, giving infrastructure managers instant visibility into the exact cost required to achieve zero-queue makespan completion.

5. Architectural Data Flow: From Inference Gateway to Cloud Node

The autoscaling control plane acts as an intelligent intermediary between API gateway queues and cloud infrastructure provisioning APIs:

┌────────────────────────────────────────────────────────┐
│ ACE Inference Gateway (Hot Path)                       │
│ • Monitors incoming token rate and queue depth         │
│ • Detects capacity threshold breach in <5 milliseconds │
└───────────────────────────┬────────────────────────────┘
                            │
                            ▼
┌────────────────────────────────────────────────────────┐
│ ACE Workload-Aware Geometry Matcher                    │
│ • Extracts accelerator, VRAM, and gang clique constraints│
│ • Maps constraints to hardware instance catalog        │
│   (e.g., AWS p5.48xlarge, Azure NDv5, GCP A3-Mega)     │
└───────────────────────────┬────────────────────────────┘
                            │
                            ▼
┌────────────────────────────────────────────────────────┐
│ Real-Time FinOps Shortfall Calculator                  │
│ • Evaluates spot availability vs. on-demand pricing    │
│ • Calculates pro-rated slice fractions for sub-GPU jobs │
└───────────────────────────┬────────────────────────────┘
                            │
                            ▼
┌────────────────────────────────────────────────────────┐
│ Karpenter NodePool / Cloud Provider Dispatcher         │
│ • Dispatches exact NodePool CRD with explicit labels   │
│ • Binds target instance directly to awaiting pod gang  │
└────────────────────────────────────────────────────────┘
  1. Immediate Queue Interception: The controller intercepts pods entering the Pending state immediately, eliminating standard 5-to-10 minute autoscaler evaluation timeouts.
  2. Deterministic Instance Sizing: Unplaced requirements are matched against a continuously updated cloud hardware catalog, ensuring that only certified instance types with verified topology are requested.
  3. Tight Karpenter Integration: Generated CRDs include precise node selectors and taints, ensuring newly launched cloud instances are claimed exclusively by the pods that triggered them.

6. Recommendations for AI Platform Engineering Teams

  1. Never Rely on Host Autoscalers Alone for Inference: Node autoscaling takes minutes; inference requires sub-second answers. Always pair node autoscaling with gateway-level merit-order burst routing.
  2. Enforce Hard Topology Selectors in Karpenter: Define explicit NodePool selectors specifying accelerator generation and interconnect architecture (gpu.family: h100-sxm5) rather than generic GPU resource counts.
  3. Audit Scale-Up Recommendations in Shadow Mode: Run the capacity scale-up engine in shadow mode to benchmark potential cloud spend against real user demand before enabling automated node provisioning.

Conclusion: The Unified GPU Control Plane for Inference

Across this four-part benchmark series, we have demonstrated the four pillars of modern AI cluster efficiency:

  1. Sample-Granular Waste Accounting: Exposing true dollar waste beneath 95% allocation graphs without endangering live inference.
  2. Sub-Second GPU Preemption: Achieving 607ms turnaround to serve time-critical workloads without waiting on cloud cold starts.
  3. Topological GPU Binpacking: Preserving contiguous NVLink domains for tensor-parallel inference serving.
  4. Workload-Aware Autoscaling: Converting pending queues into exact cloud instance provisioning signals while bridging the boot gap with gateway merit-order routing.

Together, these capabilities transform GPU infrastructure from an unpredictable bottleneck into a deterministic, high-availability serving fabric capable of delivering 100% inference uptime at optimal unit economics.


References

  1. The Karpenter Authors. Karpenter: Just-in-Time Kubernetes Node Provisioning Architecture. CNCF 2024. karpenter.sh
  2. KEDA Authors. Kubernetes Event-driven Autoscaling (KEDA) Specification. CNCF 2024. keda.sh
  3. S. Sheng, L. Zheng, B. Yuan, et al. FlexGen: High-Throughput Generative Inference of Large Language Models with a Single GPU. ICML 2023. arXiv:2303.06865
  4. S. Rajbhandari, J. Rasley, O. Ruwase, Y. He. ZeRO: Memory Optimizations Toward Training Trillion Parameter Models. SC 2020. arXiv:1910.02054
  5. P. Patel, E. Choukse, C. Zhang, et al. Splitwise: Efficient Generative LLM Serving Using Phase Splitting. ISCA 2024. arXiv:2311.18677
  6. H. Scarf. The Optimality of (S, s) Policies in the Dynamic Inventory Problem. Mathematical Methods in the Social Sciences, Stanford University Press, 1960.
  7. Amazon Web Services. Amazon EC2 P5 and P5e Instances Powered by NVIDIA H100 and H200 GPUs. AWS Documentation 2024. docs.aws.amazon.com

Sign up to ACE now