Collaborative Mobile Energy Awareness
Total Page:16
File Type:pdf, Size:1020Kb
Department of Computer Science Series of Publications A Report A-2014-5 Collaborative Mobile Energy Awareness Eemil Lagerspetz To be presented, with the permission of the Faculty of Science of the University of Helsinki, for public examination in Auditorium A129, Chemicum building, Kumpula, Helsinki on November 24th, 2014 at 12 o'clock noon. University of Helsinki Finland Supervisor Sasu Tarkoma, University of Helsinki, Finland Pre-examiners Jukka Riekki, University of Oulu, Finland Cecilia Mascolo, University of Cambridge, United Kingdom Opponent Sumi Helal, University of Florida, United States of America Custos Sasu Tarkoma, University of Helsinki, Finland Contact information Department of Computer Science P.O. Box 68 (Gustaf H¨allstr¨ominkatu 2b) FI-00014 University of Helsinki Finland Email address: [email protected].fi URL: http://www.cs.helsinki.fi/ Telephone: +358 9 1911, telefax: +358 9 191 51120 Copyright c 2014 Eemil Lagerspetz ISSN 1238-8645 ISBN 978-951-51-0460-1 (paperback) ISBN 978-951-51-0461-8 (PDF) Computing Reviews (1998) Classification: B.8, B.8.2, H.1.2 Helsinki 2014 Unigrafia Collaborative Mobile Energy Awareness Eemil Lagerspetz Department of Computer Science P.O. Box 68, FI-00014 University of Helsinki, Finland [email protected].fi http://www.cs.helsinki.fi/u/lagerspe PhD Thesis, Series of Publications A, Report A-2014-5 Helsinki, November 2014, 60+46 pages ISSN 1238-8645 ISBN 978-951-51-0460-1 (paperback) ISBN 978-951-51-0461-8 (PDF) Abstract We have created a mobile energy measurement application and gathered energy measurement data from over 725,000 devices, running over 300,000 applications, in heterogeneous environments, and constructed models of what is normal in each context for each application. We have used this data to find energy abnormalities in the wild, and provide users of our application advice on how to deal with them. These abnormalities cannot be discovered in laboratory conditions due to the rich interaction of the smartphone and its operating environment. Employing a collaborative mobile energy-awareness application with thousands of users allows us to gather a large amount of data in a short time. Such a large and diverse dataset has helped us answer many research questions. Our work is the first collaborative approach in the area of mobile energy debugging. Information received from each device running our application improves the advice given to other users running the same applications. The author has developed a context data gathering hub for smartphones, discovered the need for a common API that unifies network connectivity, energy awareness, and user experience, and investigated the impact of mobile collaborative energy awareness applications, to find previously unknown energy bugs on smartphones, and to improve users' knowledge of smartphone energy behavior. iii iv Computing Reviews (1998) Categories and Subject Descriptors: B.8 Performance and Reliability B.8.2 Performance Analysis and Design Aids H.1.2 User/Machine Systems, Human factors General Terms: Ph.D. thesis, mobile computing, energy awareness, battery, collaborative Additional Key Words and Phrases: context awareness, power saving, user behavior Acknowledgements I extend my appreciation and thanks to my supervisor, professor Sasu Tarkoma, and professor Ion Stoica, who has supported the work on Carat since the beginning. I would like to thank my co-authors, Adam J. Oliner for coming up with the idea of Carat in the first place, Matei Zaharia for building the Spark cluster computing system that I used for Carat data analysis, Petteri Nurmi for his help and expertise in machine learning algorithms since the beginning of my studies, Ella Peltonen for advertising the Carat project at every opportunity, and the University of California at Berkeley and the AMP Lab for hosting me during the development of Carat. I wish to thank the University of Helsinki, Department of Computer Science, where I did most of my work. I would like to thank the FuNeSoMo exchange program and ICSI for arranging my research visit to Berkeley, CA, USA. My work on Carat would not have been possible without the funding from the Helsinki Doctoral Programme in Computer Science (Hecse). This funding enabled work on the project without diversions. In Helsinki, November 17, 2014 Eemil Lagerspetz v Contents List of Reprinted Publications ix 1 Introduction1 1.1 Motivation ........................... 1 1.2 Problem Statement....................... 2 1.3 Methodology .......................... 5 1.4 Thesis Contributions...................... 6 1.5 Thesis Structure ........................ 9 2 Mobile Energy Efficiency: State of the Art 11 2.1 Middleware and Operating System Layer .......... 12 2.2 Single Device Systems..................... 13 2.3 Statistical Techniques ..................... 15 2.4 Collaborative Systems..................... 15 2.5 Large Datasets and Scalability ................ 16 2.5.1 Centralized Programming, Distributed Execution . 16 2.5.2 Clusters and Cloud Computing............ 17 2.5.3 The MapReduce Paradigm and Spark . 18 2.6 User Behavior.......................... 21 2.7 Context and Energy Awareness................ 21 3 Collaborative Mobile Energy Awareness 23 3.1 Data Gathering for Context Awareness............ 23 3.2 Mobile Operating System Energy APIs............ 25 3.3 Collaborative Mobile Energy Awareness........... 25 3.3.1 Carat Overview..................... 26 3.3.2 Large-Scale Data Analytics.............. 26 3.3.3 Data Collection..................... 27 3.3.4 Method......................... 28 3.3.5 Implementation..................... 31 vi Contents vii 3.3.6 Results ......................... 33 3.3.7 Validation........................ 36 3.4 User Experience ........................ 37 4 Discussion 41 4.1 Research Questions Revisited................. 41 4.2 Scientific Contribution..................... 42 4.3 Practical Impact and Limitations............... 43 4.4 Future Work .......................... 43 5 Conclusions 45 References 47 Research Theme A: Context-Awareness with Data Gathering 61 Research Paper I: BeTelGeuse: A Platform for Gathering and Processing Situational Data.................. 62 Research Theme B: Mobile Operating System Energy Effi- ciency APIs 71 Research Paper II: Arching over the Mobile Computing Chasm: Platforms and Runtimes.................... 71 Research Theme C: Collaborative Energy Awareness 79 Research Paper III: Carat: collaborative energy diagnosis for mobile devices ......................... 79 Research Paper IV: How Carat Affects User Behavior: Implications for Mobile Battery Awareness Applications ......... 96 viii Contents List of Reprinted Publications This thesis consists of an overview and four publications, referred to by PI-PIV. The authors have contributed to these publications as follows. Context-Awareness with Data Gathering Research Paper I: Joonas Kukkonen, Eemil Lagerspetz, Petteri Nurmi, and Mikael Andersson, \BeTelGeuse: A Platform for Gathering and Pro- cessing Situational Data," In IEEE Pervasive Computing, IEEE, 2009, vol. 8, no. 2, pp. 49-56 Contribution: The BeTelGeuse project was started by Petteri Nurmi. The author co-developed the system with J. Kukkonen. The author did roughly half of the design, implementation, testing, and analysis of the work. The author was the lead author of the publication with P. Nurmi and J. Kukkonen. Mobile Operating System Energy Efficiency APIs Research Paper II: Sasu Tarkoma and Eemil Lagerspetz, \Arching over the Mobile Computing Chasm: Platforms and Runtimes," In Computer, IEEE, 2011, vol.44, no.4, pp.22-28 Contribution: This publication is a survey of mobile platforms. The author was the lead author with S. Tarkoma. Particularly, the author gathered and wrote information on Java ME, Android, and Windows Phone 7, with special interest on network and energy monitoring. ix x List of Reprinted Publications Collaborative Energy Awareness Research Paper III: Adam J. Oliner, Anand P. Iyer, Ion Stoica, Eemil Lagerspetz, and Sasu Tarkoma, \Carat: collaborative energy diagnosis for mobile devices," In Proceedings of the 11th ACM Conference on Embedded Networked Sensor Systems (SenSys '13), ACM, 2013, Article 10, 14 pages Contribution: A. J. Oliner started the Carat project with the idea to collect battery information from iPhone devices. The author co-authored Carat with Oliner, and came up with the a priori slice weighting for inaccurate iOS battery measurements, as well as the current version of the Carat algorithm, Algorithm1. The author did roughly half of the design, implementation, testing, and analysis of the work. Research Paper IV: Kumaripaba Athukorala, Antti Jylh¨a,Eemil Lager- spetz, Maria von K¨ugelgen,Adam J. Oliner, Sasu Tarkoma, Giulio Jacucci, \How Carat Affects User Behavior: Implications for Mobile Battery Aware- ness Applications," In Proceedings of CHI Conference on Human Factors in Computing Systems (CHI'14), ACM, 2014, pp. 1029-1038 Contribution: This work was directed by K. Athukorala. This publication used data gathered by the Carat Android application, and questionnaire responses from its users. M. von K¨ugelgendesigned the questionnaire together with K. Athukorala. The author designed, implemented, and tested the questionnaire module for Carat that was used to gather ques- tionnaire results from Carat users. The author created the method to match Carat user data with questionnaire responses, and analyze how often users stopped using Hogs and Bugs. The questionnaire responses were analyzed by Athukorala and von K¨ugelgen. Chapter