Mantis: Efficient Predictions of Execution Time, Energy Usage, Memory Usage and Network Usage on Smart Mobile Devices

We present Mantis, a framework for predicting the computational resource consumption (CRC) of Android applications on given inputs accurately, and efficiently. A key insight underlying Mantis is that program codes often contain features that correlate with performance and these features can be automatically computed efficiently. Mantis synergistically combines techniques from program analysis and machine learning. It constructs concise CRC models by choosing from many program execution features only a handful that are most correlated with the program's CRC metric yet can be evaluated efficiently from the program's input. We apply program slicing to reduce evaluation time of a feature and automatically generate executable code snippets for efficiently evaluating features. Our evaluation shows that Mantis predicts four CRC metrics of seven Android apps with estimation error in the range of 0-11.1 percent by executing predictor code spending at most 1.3 percent of their execution time on Galaxy Nexus.

[1]  Koushik Sen,et al.  WISE: Automated test generation for worst-case complexity , 2009, 2009 IEEE 31st International Conference on Software Engineering.

[2]  David W. Binkley,et al.  Program slicing , 2008, 2008 Frontiers of Software Maintenance.

[3]  Reinhard Wilhelm,et al.  Determining Bounds on Execution Times , 2005, Embedded Systems Handbook.

[4]  Simon Goldsmith,et al.  Measuring empirical computational complexity , 2007, ESEC-FSE '07.

[5]  Feng Mao,et al.  Exploiting statistical correlations for proactive prediction of program behaviors , 2010, CGO '10.

[6]  Ondrej Lhoták,et al.  Program analysis using binary decision diagrams , 2006 .

[7]  Manu Sridharan,et al.  Thin slicing , 2007, PLDI '07.

[8]  Michael F. P. O'Boyle,et al.  Automatic Feature Generation for Machine Learning Based Optimizing Compilation , 2009, 2009 International Symposium on Code Generation and Optimization.

[9]  Sumit Gulwani,et al.  A Numerical Abstract Domain Based on Expression Abstraction and Max Operator with Application in Timing Analysis , 2008, CAV.

[10]  Michael F. P. O'Boyle,et al.  Mapping parallelism to multi-cores: a machine learning based approach , 2009, PPoPP '09.

[11]  Yunheung Paek,et al.  CMcloud: Cloud Platform for Cost-Effective Offloading of Mobile Applications , 2014, 2014 14th IEEE/ACM International Symposium on Cluster, Cloud and Grid Computing.

[12]  Huber Flores,et al.  Adaptive code offloading for mobile cloud applications: exploiting fuzzy sets and evidence-based learning , 2013, MCS '13.

[13]  David M. Brooks,et al.  Accurate and efficient regression modeling for microarchitectural performance and power prediction , 2006, ASPLOS XII.

[14]  Stephen P. Boyd,et al.  An Interior-Point Method for Large-Scale $\ell_1$-Regularized Least Squares , 2007, IEEE Journal of Selected Topics in Signal Processing.

[15]  Warren Smith Prediction Services for Distributed Computing , 2007, 2007 IEEE International Parallel and Distributed Processing Symposium.

[16]  Léon Bottou,et al.  Large-Scale Machine Learning with Stochastic Gradient Descent , 2010, COMPSTAT.

[17]  Klaus E. Schauser,et al.  Predicting the running times of parallel programs by simulation , 1998, Proceedings of the First Merged International Parallel Processing Symposium and Symposium on Parallel and Distributed Processing.

[18]  Y. N. Srikant,et al.  Microarchitecture Sensitive Empirical Models for Compiler Optimizations , 2007, International Symposium on Code Generation and Optimization (CGO'07).

[19]  Chetan Gupta,et al.  PQR: Predicting Query Execution Times for Autonomous Workload Management , 2008, 2008 International Conference on Autonomic Computing.

[20]  Albert G. Greenberg,et al.  WebProphet: Automating Performance Prediction for Web Services , 2010, NSDI.

[21]  José A. B. Fortes,et al.  On the Use of Machine Learning to Predict the Time and Resources Consumed by Applications , 2010, 2010 10th IEEE/ACM International Conference on Cluster, Cloud and Grid Computing.

[22]  Michael I. Jordan,et al.  Statistical Machine Learning Makes Automatic Control Practical for Internet Datacenters , 2009, HotCloud.

[23]  Brad Calder,et al.  Automatically characterizing large scale program behavior , 2002, ASPLOS X.

[24]  Jeffrey S. Chase,et al.  Learning Application Models for Utility Resource Planning , 2006, 2006 IEEE International Conference on Autonomic Computing.

[25]  Yunheung Paek,et al.  Techniques to Minimize State Transfer Costs for Dynamic Execution Offloading in Mobile Cloud Computing , 2014, IEEE Transactions on Mobile Computing.

[26]  Brad Calder,et al.  Basic block distribution analysis to find periodic behavior and simulation points in applications , 2001, Proceedings 2001 International Conference on Parallel Architectures and Compilation Techniques.

[27]  Sharad Malik,et al.  Performance analysis of real-time embedded software , 1997 .

[28]  Laura Vasiliu,et al.  CloneCloud: Elastic Execution between Mobile Device and Cloud , 2012 .

[29]  David W. Binkley,et al.  Interprocedural slicing using dependence graphs , 1990, TOPL.

[30]  Sumit Gulwani,et al.  SPEED: precise and efficient static estimation of program computational complexity , 2009, POPL '09.

[31]  Sanjit A. Seshia,et al.  Game-theoretic timing analysis , 2008, 2008 IEEE/ACM International Conference on Computer-Aided Design.

[32]  Hyesoon Kim,et al.  Qilin: Exploiting parallelism on heterogeneous multiprocessors with adaptive mapping , 2009, 2009 42nd Annual IEEE/ACM International Symposium on Microarchitecture (MICRO).

[33]  R. Tibshirani,et al.  Least angle regression , 2004, math/0406456.

[34]  R. Tibshirani Regression Shrinkage and Selection via the Lasso , 1996 .

[35]  Eric R. Ziegel,et al.  The Elements of Statistical Learning , 2003, Technometrics.

[36]  Michael I. Jordan,et al.  Scalable statistical bug isolation , 2005, PLDI '05.

[37]  Tong Zhang,et al.  Adaptive Forward-Backward Greedy Algorithm for Sparse Learning with Linear Models , 2008, NIPS.

[38]  Byung-Gon Chun,et al.  CloneCloud: elastic execution between mobile device and cloud , 2011, EuroSys '11.

[39]  Alec Wolman,et al.  MAUI: making smartphones last longer with code offload , 2010, MobiSys '10.

[40]  Eric A. Brewer,et al.  High-level optimization via automated statistical modeling , 1995, PPOPP '95.

[41]  Jan Gustafsson,et al.  Automatic Derivation of Loop Bounds and Infeasible Paths for WCET Analysis Using Abstract Execution , 2006, 2006 27th IEEE International Real-Time Systems Symposium (RTSS'06).

[42]  Josep Sanjuàs-Cuxart,et al.  Load Shedding in Network Monitoring Applications , 2007, USENIX Annual Technical Conference.

[43]  Xu Chen,et al.  COMET: Code Offload by Migrating Execution Transparently , 2012, OSDI.

[44]  Archana Ganapathi,et al.  Predicting Multiple Metrics for Queries: Better Decisions Enabled by Machine Learning , 2009, 2009 IEEE 25th International Conference on Data Engineering.

[45]  William H. Sanders,et al.  Link Gradients: Predicting the Impact of Network Latency on Multitier Applications , 2009, IEEE INFOCOM 2009.

[46]  Thomas W. Reps,et al.  Speeding up slicing , 1994, SIGSOFT '94.

[47]  Frank Tip,et al.  A survey of program slicing techniques , 1994, J. Program. Lang..

[48]  AmmarMostafa,et al.  Answering what-if deployment and configuration questions with wise , 2008 .

[49]  Sanjit A. Seshia,et al.  Quantitative Analysis of Systems Using Game-Theoretic Learning , 2012, TECS.

[50]  Ling Huang,et al.  Predicting Execution Time of Computer Programs Using Sparse Polynomial Regression , 2010, NIPS.

[51]  Bharat K. Bhargava,et al.  A Survey of Computation Offloading for Mobile Systems , 2012, Mobile Networks and Applications.

[52]  Xipeng Shen,et al.  An input-centric paradigm for program dynamic optimizations , 2010, OOPSLA.