Mantis: Predicting System Performance through Program Analysis and Modeling

Byung-Gon Chun, Ling Huang, Sangmin Lee, Petros Maniatis, Mayur NaikarXiv 2010

Abstract

Mantis is a performance prediction framework that bridges the gap between manual analytical modeling and automated black-box approaches. By combining program analysis with sparse regression, Mantis automatically identifies internal program features that drive execution time. It generates efficient "code slices" to evaluate these features at runtime, achieving over 93% prediction accuracy with minimal training data.

Introduction

Predicting program execution time is critical for resource management in data centers and task scheduling in distributed frameworks. Traditional methods typically fall into two categories: complex, non-scalable analytical models and "black-box" models that correlate external inputs (like file size) with performance. However, black-box models often fail because performance is frequently tied to internal program semantics rather than raw input size. Mantis addresses this by "peeking" into the code to identify the true drivers of performance.

Methods

Mantis employs a three-stage pipeline to construct its performance predictors:

  1. Instrumentation and Profiling: The system instruments Java source code to track internal features like loop counts and branch choices. It then profiles the application on sample data to build a training set.
  2. Model Generation: Using LASSO (Least Absolute Shrinkage and Selection Operator), Mantis selects the most significant features from thousands of candidates, building a multivariate polynomial model.
  3. Program Slicing: To predict performance for new inputs without running the full program, Mantis uses static program slicing to create "feature evaluators"—tiny sub-programs that quickly calculate the required feature values.
The Mantis architecture pipeline, showing the flow from source code to feature evaluators and prediction models.

Evaluation and Key Insights

The framework was evaluated on Lucene (search engine) and ImageJ (image processing). A key innovation is the "slicing feedback loop," where the computational cost of a feature's code slice is used as a constraint. If a feature is predictive but too expensive to calculate, Mantis seeks a more efficient alternative. Furthermore, by focusing on semantic features, Mantis is highly data-efficient, reaching peak accuracy with only 5-10% of the training data required by traditional models.

Key Results

Mantis achieved over 93% accuracy (less than 7% error for Lucene and 5.5% for ImageJ), significantly outperforming black-box models which saw error rates of 35-38%. The "feature evaluators" generated by program slicing were highly efficient, taking only 3-4% of the original execution time in the case of Lucene.

Comparison of actual execution time versus predicted time, demonstrating the high correlation and accuracy achieved by Mantis.

Limitations and Future Work

Current limitations include a lack of visibility into native C/C++ libraries and potential "bloat" in static slices. Future work will explore hybrid slicing techniques and incorporating hardware environment sensitivity into the models to predict performance across different cloud instances.

Summary updated

BibTeX
@misc{chun2010mantis,
  author = {Byung-Gon Chun and Ling Huang and Sangmin Lee and Petros Maniatis and Mayur Naik},
  title = {{Mantis: Predicting System Performance through Program Analysis and Modeling}},
  year = {2010},
  eprint = {1010.0019},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/1010.0019},
}
Figure