Sage: Using Unsupervised Learning for Scalable Performance Debugging in Microservices

Yu Gan, Mingyu Liang, Sundar Dev, David Lo, Christina DelimitrouarXiv 2021

Abstract

Cloud applications are increasingly shifting from large monolithic services to complex graphs of loosely-coupled microservices. Despite the advantages of modularity and elasticity microservices offer, they also complicate cluster management and performance debugging, as dependencies between tiers introduce backpressure and cascading QoS violations. We present Sage, a machine learning-driven root cause analysis system for interactive cloud microservices. Sage leverages unsupervised ML models to circumvent the overhead of trace labeling, captures the impact of dependencies between microservices to determine the root cause of unpredictable performance online, and applies corrective actions to recover a cloud service's QoS. In experiments on both dedicated local clusters and large clusters on Google Compute Engine we show that Sage consistently achieves over 93% accuracy in correctly identifying the root cause of QoS violations, and improves performance predictability.

Introduction

The transition from monolithic architectures to microservices has revolutionized cloud application development, offering modularity and independent scalability. However, this shift introduces significant operational complexity. In a microservices "graph," a performance bottleneck in a single downstream service can propagate upstream, leading to cascading Quality of Service (QoS) violations. Identifying the root cause of such violations is a daunting task for Site Reliability Engineers (SREs), as traditional debugging tools often require extensive manual labeling or invasive instrumentation that adds significant overhead.

System Architecture

Sage addresses these challenges through an unsupervised root cause analysis (RCA) framework that combines causal modeling with generative machine learning.

Sage System Overview: Integrating Causal Bayesian Networks (CBN) and Graphical Variational Autoencoders (GVAE) for root cause analysis.

Causal Bayesian Networks (CBN)

Sage automatically constructs a dependency graph of microservices using standard RPC-level traces (e.g., Jaeger). By applying the Markov Property of Latency Propagation, Sage recognizes that a service's latency is conditionally independent of its ancestors given its immediate children. This allows for an efficient representation of how performance issues propagate through the system.

Graphical Variational Autoencoder (GVAE)

The core of Sage is a GVAE, a generative model that learns the joint distribution of "normal" system metrics (CPU, memory, network latency) across the microservice graph. Because it is unsupervised, Sage does not require labeled failure data; it learns what "healthy" looks like from raw telemetry.

Root Cause Detection via Counterfactual Reasoning

When a QoS violation is detected at the frontend, Sage employs counterfactual reasoning—a "But-For" test—to isolate the root cause. It uses the GVAE to simulate hypothetical scenarios: "If this specific resource on this service were behaving normally, would the end-to-end latency still violate the QoS target?"

Counterfactual Reasoning: Sage compares the observed QoS violation against simulated counterfactual scenarios to pinpoint the root cause.

By systematically intervening on nodes in the causal graph and observing the predicted impact on frontend latency, Sage can distinguish between the actual root cause and services merely suffering from backpressure.

Evaluation and Results

Sage was evaluated using the DeathStarBench suite (specifically the Social Network application) and synthetic topologies on both local clusters and large-scale Google Compute Engine (GCE) deployments.

  • High Accuracy: Sage consistently achieved over 93% accuracy in identifying root causes across different architectures, significantly outperforming traditional autoscalers and even offline oracles. It maintained high accuracy (94%) even when up to 50% of microservices were not instrumented.
  • Scalability: Inference time remains low even as the system scales. In a GCE environment with 188 containers, inference took only 62ms, a modest increase from 49ms on smaller local clusters.
  • Efficiency: Sage is robust to low sampling rates (as low as 1%) and utilizes selective partial retraining. This allows it to adapt to microservice updates 10x faster than full model retraining by only updating the GVAE components corresponding to the changed service and its neighbors.

Conclusion

Sage provides a scalable, unsupervised solution for performance debugging in modern cloud environments. By leveraging the inherent causal structure of microservice interactions and the power of generative modeling, it enables rapid and accurate root cause analysis without the burden of manual data labeling or high-overhead instrumentation. Future work will explore proactive learning through chaos engineering to further enhance Sage's resilience to novel failure modes.

Summary updated

BibTeX
@misc{gan2021sage,
  author = {Yu Gan and Mingyu Liang and Sundar Dev and David Lo and Christina Delimitrou},
  title = {{Sage: Using Unsupervised Learning for Scalable Performance Debugging in Microservices}},
  year = {2021},
  eprint = {2101.00267},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2101.00267},
}
Figure