KEA: Tuning an Exabyte-Scale Data Infrastructure

Yiwen Zhu, Subru Krishnan, Konstantinos Karanasos, Isha Tarte, Conor Power, Abhishek Modi, Manoj Kumar, Deli Zhang, Kartheek Muthyala, Nick Jurgens, Sarvesh Sakalanaga, Sudhir Darbha, Minu Iyer, Ankita Agarwal, Carlo Curino

Abstract

KEA is a data-driven framework designed to automate the tuning of Microsoft’s "Cosmos," one of the world's largest big-data infrastructures. By moving from manual expert tuning to a multi-modal machine learning approach, KEA has broken through a performance plateau, saving Microsoft tens of millions of dollars annually across a fleet of over 300,000 machines.

Introduction

Managing exabyte-scale infrastructure is a balancing act between performance, reliability, and cost. For 15 years, Microsoft relied on a dedicated team of experts to manually tune Cosmos. While they achieved an impressive >60% average CPU utilization, they eventually hit a "plateau."

The challenge of tuning at this scale is three-fold:

  1. Scale and Risk: With billions of tasks running daily, a "bad" configuration could have catastrophic business impacts.
  2. Heterogeneity: The fleet contains over 20 generations of hardware (SKUs), each behaving differently.
  3. The "Experimental" Trap: Traditional "ML-for-Systems" approaches often rely on repeated trial-and-error experiments. At this scale, running enough experiments to find an optimal configuration is too slow, too noisy, and too risky.

The KEA Methodology

KEA introduces a structured methodology to move from "gut feeling" to "model-driven" tuning through a three-phase process: Fact Finding, Modeling and Optimization, and Deployment.

The KEA framework workflow across three phases: Fact Finding, Modeling and Optimization, and Deployment.

The framework operates in three distinct modes:

  • Observational Tuning: KEA’s "secret sauce." Instead of running new experiments, it leverages the natural variance in existing telemetry. For example, to find the optimal number of containers per machine, KEA looks at how machines performed historically when they happened to be running at different load levels.
  • Hypothetical Tuning: Used for future planning. KEA builds models to predict the resource needs (like RAM or SSD) of future hardware generations based on current workload trends.
  • Experimental Tuning: Used as a last resort for unpredictable changes (like a new software feature). It uses a "flighting" service to conservatively test configurations on small groups of machines before a fleet-wide rollout.

System Abstractions and Modeling

To make the math tractable, the authors use System Abstractions, simplifying the chaos of billions of tasks into hierarchical levels. This allows the system to model performance from the full system level down to specific machine groups.

Multi-level system abstractions used to simplify complex infrastructure metrics.

KEA primarily utilizes robust regression models (like Huber Regressors) that prioritize explainability—a must-have for domain experts who need to trust the system's decisions before they are applied to hundreds of thousands of machines.

Key Insights and Ideas

  • The Chain-Effect: The authors observed that while system dynamics are complex, the "impact path" is often linear. A configuration change directly affects one metric, which then influences secondary metrics, which finally impacts the objective (e.g., latency). Modeling this "chain" is easier than modeling the whole system at once.
  • Heterogeneity is a Feature: Having 20+ generations of hardware actually helps. It provides a "full spectrum" of data points that allow models to understand how different resource ratios (CPU/RAM/Disk) affect performance.
  • Explainability Over Complexity: The team opted for simpler, more interpretable ML models. In a production environment of this scale, being able to explain why a model suggested a change is more important than a marginal gain in predictive accuracy from a "black box" model.

Key Results

KEA’s deployment led to significant, measurable improvements across the Cosmos infrastructure:

  • Throughput: Improved by 9% (measured by Total Data Read) while maintaining the same latency levels.
  • Job Runtime: Benchmark jobs (TPC-H/DS) saw a 6% average speedup.
  • Capacity Gain: KEA identified a 2% increase in "sell-able capacity" just by tweaking YARN configurations, translating to tens of millions of dollars in avoided hardware costs.
  • Power Efficiency: Through experimental power capping, they identified a 10MW reduction in provisioned power that could be harvested to add more machines to existing data centers.
  • Storage Optimization: Moving local temporary storage from HDD to SSD (SC2 configuration) increased data read per day by 10.9%.

Limitations and Future Work

While KEA is highly effective for static cluster-wide configurations, the authors note some areas for growth. KEA currently focuses on relatively static configurations; moving toward real-time, dynamic adjustments based on hourly workload shifts is a logical next step but introduces significant complexity in stability. Furthermore, observational tuning cannot predict the impact of entirely new software features that haven't been seen in the telemetry yet; these still require the more expensive experimental approach.

Summary updated

BibTeX
@inproceedings{zhu2021kea,
  author = {Yiwen Zhu and Subru Krishnan and Konstantinos Karanasos and Isha Tarte and Conor Power and Abhishek Modi and Manoj Kumar and Deli Zhang and Kartheek Muthyala and Nick Jurgens and Sarvesh Sakalanaga and Sudhir Darbha and Minu Iyer and Ankita Agarwal and Carlo Curino},
  title = {{KEA: Tuning an Exabyte-Scale Data Infrastructure}},
  booktitle = {SIGMOD},
  year = {2021},
  doi = {10.1145/3448016.3457569},
}
Figure