Unicorn: Reasoning about Configurable System Performance through the lens of Causality

Md Shahriar Iqbal, Rahul Krishna, Mohammad Ali Javidian, Baishakhi Ray, Pooyan Jamshidi

Introduction

Modern computer systems, from data analytics pipelines to deep learning frameworks, possess massive configuration spaces. While these settings offer flexibility, they also introduce a significant risk: misconfigurations. Unlike traditional software bugs that cause crashes, performance misconfigurations often lead to "non-functional faults"—severe, hard-to-diagnose drops in throughput or massive spikes in energy consumption.

Traditionally, developers have relied on predictive machine learning (ML) models, such as regression, to map configuration options to performance outcomes. However, these models rely purely on correlation, which leads to two critical failures. First, they provide incorrect explanations by being fooled by confounding variables. Second, they lack transferability; because they memorize specific environments, they break down when software is deployed on new hardware or different workloads.

A performance misconfiguration in a high-dimensional space, where a specific configuration leads to high energy consumption (122J) despite low throughput (6.8 FPS).

The Causal Approach: Unicorn

To address these challenges, this paper introduces Unicorn, a novel approach that replaces standard correlation-based ML with causal inference. Unicorn models the system as a Directed Acyclic Graph (DAG) where nodes represent configuration options, intermediate system events (like context switches or cache misses), and performance objectives.

Why Correlation is a Trap

A primary insight of Unicorn is that correlation can be physically misleading. For example, a standard ML model might observe that higher cache misses correlate with higher throughput and incorrectly recommend increasing cache misses to improve performance. In reality, a hidden background process—such as a change in cache policy—might be causing both. By identifying the true cause-and-effect relationships, Unicorn avoids these spurious correlations.

Causal vs. Correlational reasoning: (a) shows a misleading positive correlation between misses and throughput, while (b) and (c) reveal that the Cache Policy is the true causal driver.

Methods

Unicorn operates through three main phases:

  1. Structure Learning: It utilizes the Fast Causal Inference (FCI) algorithm to learn the causal graph. FCI is robust to unobserved confounders (hidden variables), using entropic causality to determine the direction of influence.
  2. Active Learning: Instead of random sampling, Unicorn estimates the causal effect of different options and iteratively tests configurations most likely to provide useful information.
  3. Counterfactual Reasoning: To optimize performance or fix bugs, Unicorn employs do-calculus. It asks "what-if" questions, such as: "What is the probability of fixing our latency issue if we intervene and change the BufferSize, holding all other variables constant?"

Key Results and Transferability

The authors evaluated Unicorn across six real-world systems, including Deepstream, BERT, and SQLite, deployed on various NVIDIA Jetson hardware platforms. The results demonstrate that causality is a powerful tool for system optimization:

  • Speed and Accuracy: Unicorn resolved faults up to 13x faster than state-of-the-art baselines like BugDoc and SMAC. In one real-world case study involving a scene detection system, Unicorn identified a root cause in 22 minutes that had previously taken human experts two days to diagnose, eventually yielding a 7x improvement in throughput.
  • True Transferability: Because Unicorn learns the underlying "physics" of the system's performance rather than just environment-specific data, its models are highly reusable. When moving from an NVIDIA Xavier to a TX2 board, Unicorn required only 25 new samples to fine-tune its model, achieving performance comparable to training from scratch.
  • Scalability: System performance graphs are surprisingly sparse. This sparsity allows Unicorn to navigate trillions of possible configuration combinations without the exponential compute time required by traditional methods.

Conclusion

Unicorn demonstrates that understanding why a system performs the way it does is more valuable than simply predicting what the performance will be. While learning causal structures can be computationally intensive upfront, the benefits in debugging speed, accuracy, and model transferability represent a significant leap forward for managing modern, highly configurable software systems.

Summary updated

BibTeX
@inproceedings{iqbal2022unicorn,
  author = {Md Shahriar Iqbal and Rahul Krishna and Mohammad Ali Javidian and Baishakhi Ray and Pooyan Jamshidi},
  title = {{Unicorn: Reasoning about Configurable System Performance through the lens of Causality}},
  booktitle = {EuroSys},
  year = {2022},
  doi = {10.1145/3492321.3519575},
}
Figure