[Paper Review] Sage: Leveraging ML to Diagnose Unpredictable Performance in Cloud Microservices
Sage is an unsupervised machine learning system that diagnoses unpredictable performance in cloud microservices by modeling RPC-level dependencies via Causal Bayesian Networks and generating counterfactual latencies using a Graphical Variational Autoencoder. It achieves high root cause detection accuracy (on par with oracle methods) and enables real-time corrective actions without trace labeling or application instrumentation, significantly improving performance predictability in large-scale microservice deployments.
Cloud applications are increasingly shifting from large monolithic services, to complex graphs of loosely-coupled microservices. Despite their advantages, microservices also introduce cascading QoS violations in cloud applications, which are difficult to diagnose and correct. We present Sage, a ML-driven root cause analysis system for interactive cloud microservices. Sage leverages unsupervised learning models to circumvent the overhead of trace labeling, determines the root cause of unpredictable performance online, and applies corrective actions to restore performance. On experiments on both dedicated local clusters and large GCE clusters we show that Sage achieves high root cause detection accuracy and predictable performance.
Motivation & Objective
- To address the challenge of diagnosing unpredictable performance in complex, loosely-coupled cloud microservices where traditional methods are error-prone and labor-intensive.
- To eliminate the need for costly and intrusive trace labeling in root cause analysis by leveraging unsupervised learning.
- To enable real-time detection and correction of QoS violations in interactive microservices with minimal system overhead.
- To scale effectively across large, production-grade clusters such as Google Compute Engine, maintaining high accuracy and low latency.
Proposed method
- Sage models microservice dependencies using Causal Bayesian Networks (CBN), representing metric nodes (CPU, memory), latency nodes (client, server, network), and latent variables for unobserved stochastic factors.
- It employs a Graphical Variational Autoencoder (GVAE) to generate counterfactual latency scenarios, simulating what end-to-end latency would have been had certain events not occurred.
- The system infers root causes by comparing observed end-to-end latency with GVAE-generated counterfactuals, identifying the microservice(s) whose behavior most significantly deviates.
- Sage uses lightweight, non-invasive tracing that does not require application code changes or kernel instrumentation, enabling deployment in production environments.
- It applies corrective actions—such as resource scaling—based on detected root causes to restore performance predictability.
- Transfer learning is used to adapt models quickly when microservice architectures change, reducing training time by at least an order of magnitude compared to retraining from scratch.
Experimental results
Research questions
- RQ1Can an unsupervised machine learning system detect the root cause of unpredictable performance in microservices without requiring labeled traces or application instrumentation?
- RQ2How accurately can such a system identify the true source of QoS violations compared to supervised or threshold-based baselines?
- RQ3To what extent does the system scale across large, production-grade clusters like Google Compute Engine while maintaining detection accuracy and low inference overhead?
- RQ4How effective is the system in restoring performance predictability through automated corrective actions after detecting a root cause?
- RQ5Can transfer learning significantly reduce training time when microservice topologies evolve, without degrading detection accuracy?
Key findings
- Sage achieves detection accuracy comparable to an offline oracle method that uses manually labeled thresholds, significantly outperforming both autoscaling baselines and existing supervised systems.
- False positive and false negative rates are minimal, minimizing both unnecessary resource allocation and missed QoS violations.
- On Google Compute Engine with 188 instances, Sage maintains detection accuracy within 1% of its performance on a local cluster, with marginal increases in false positives and false negatives.
- Training time on GCE is 148 minutes (vs. 124 minutes on local cluster), and inference takes only 62ms—representing a 26.5% increase in inference time despite 6.7x more containers.
- Transfer learning reduces training time by at least an order of magnitude when adapting to new microservice topologies, without impacting detection accuracy.
- In real-world scenarios, Sage identifies root causes and applies corrective actions immediately, restoring performance much faster than threshold-based schemes, which often suffer from delayed recovery.
Read this paper
Open the full text in the Nubint reader and ask about any passage as you read.
Read this paper on NubintThis review was generated by AI from the original paper. Please check the paper before citing it.