Improving the Performance of Smartphone Apps with Soft Hang Bug Detection and Dynamic Resource Management

Improving the Performance of Smartphone Apps with Soft Hang Bug Detection and Dynamic Resource Management

Improving the Performance of Smartphone Apps with Soft Hang Bug Detection and Dynamic Resource Management Dissertation Presented in Partial Fulfillment of the Requirements for the Degree Doctor of Philosophy in the Graduate School of The Ohio State University By Marco Brocanelli, M.S. Graduate Program in Electrical and Computer Engineering The Ohio State University 2018 Dissertation Committee: Dr. Xiaorui Wang, Advisor Dr. Feng Qin Dr. Christopher C. Stewart ⃝c Copyright by Marco Brocanelli 2018 Abstract Two critical quality factors for mobile devices (e.g., smartphones, tablets) are battery life and apps’ user perceived performance. For example, apps that require frequent user actions with the user interface should have high responsiveness, which indicates how fast an app reacts to user actions. On the other hand, apps used mostly for video/music play should have a high throughput, which allows for example a video to be played smoothly without perceivable frame rate loss. Two main causes of poor performance for these apps are soft hang bugs and resource contention. A soft hang bug causes the app to have soft hangs, i.e., the app’s response time of handling a certain user action is longer than a user-perceivable delay. A soft hang bug is a blocking operations that executes on the app’s main thread and can be fixed by moving the execution of this operation to a background worker thread. Resource contention can cause concurrent foreground apps to miss their performance target. Indeed, during recent years, the improvements in mobile operating system performance and the increasing display size have brought these resource constrained devices to be able to execute multiple apps at the same time, e.g., watch a video while chatting with a friend. As a result, the resource contention among the apps sharing the screen can either cause performance degradation for at least one of the concurrent apps or cause an unnecessarily high energy consumption. In this dissertation, we first introduce Hang Doctor, a runtime soft hang detection and diagnosis methodology that runs in the wild on user devices. Hang Doctor helps developers ii track the responsiveness performance of their apps and provides diagnosis information for them to fix soft hangs. Hang Doctor exploits performance event counters toensure high detection quality and low overhead. In particular, we propose a soft hang filter that examines the performance event counters during the app execution to automatically prune false positives. We have implemented Hang Doctor and tested it with the latest releases of 114 real-world apps. Hang Doctor has found 34 new soft hang bugs previously unknown to their developers. So far, 62% of the bugs have already been confirmed by the developers and 68% are missed by offline detection algorithms. Second, in order to ensure good user-perceived performance of concurrent apps and low energy consumption, we propose SURF, Supervisory control of User-perceived peRFor- mance. Specifically, first, SURF dynamically balances the performance of the concurrent apps to regulate the resource allocation among the concurrent apps according to their actual performance needs. Then, when the concurrent foreground apps have balanced performance, SURF manipulates CPU DVFS (dynamic voltage and frequency scaling) to ensure that the user-perceived performance of all the apps stay close to their desired values while mini- mizing the energy consumption. A key advantage of SURF is that it is designed rigorously based on supervisory control theory, which provides analytical stability and performance guarantees compared to heuristic solutions. We test SURF on several mobile device models with real-world open-source apps and show that it can reduce the CPU energy consumption by 30-90% compared to state-of-the-art solutions while causing no perceivable performance degradation. iii Dedicated to all the people that guided me to this life achievement iv Acknowledgments The first person that I want to thank is my advisor Dr. Xiaorui Wang. Since thefirstday in my Ph.D., he pushed me to improve myself and do things that I didn’t know I could do. He thought me how to properly conduct scientific research, develop projects, write papers, and present in front of a large amount of people. I really appreciate his great contribution to my personal and professional development, which will positively impact my future. I would like to thank Dr. Feng Qin, Dr. Christopher Stewart, Dr. Fusun Ozguner, and Dr. Jian Tan for being part of my candidacy and final exam committees. They all gave me insightful feedbacks on my projects and I really hope to collaborate with them in the future. I also want to thank my present and former lab mates Kuangyu Zheng, Li Li, Bruce Beitman, Yunhao Bai, Wenli Zheng, Zichen Xu, Kai Ma, and Xiaodong Wang for all the invaluable time spent discussing research ideas, which has highly contributed to the successful publication of many papers. Special thanks go to Dr. Andrea Serrani, who helped me come to The Ohio State University at the end of my master studies. My life would be so much different without his help and I would have probably not even started a Ph.D. if it was not for him. Last but not least, I would like to thank my family. I want to thank my mom Lorella, my sister Linda, and all the rest of my Italian family for encouraging and supporting me to pursue a career outside my home-country, Italy. In addition, I would like to thank my wife Paula and my Colombian family for all the moral support and kindness given to me. v Vita 2012-Present . Ph.D., Electrical and Computer Engineering, The Ohio State University, USA. 2010 . Visiting Scholar, Control Engineer, The Ohio State University, USA. 2008 . M.S., Control Systems, University of Rome Tor Vergata, Italy. 2005 . B.S., Control Systems, University of Rome Tor Vergata, Italy. Publications Research Publications Marco Brocanelli, Xiaorui Wang. “SURF: Supervisory Control of User-Perceived Per- formance for Mobile Device Energy Savings”. International Conference on Distributed Computing Systems (ICDCS), July 2018. Marco Brocanelli, Xiaorui Wang. “Hang Doctor: Runtime Detection and Diagnosis of Soft Hangs for Smartphone Apps”. European Conference on Computer Systems (EuroSys), April 2018. Marco Brocanelli, Xiaorui Wang. “Smartphone Radio Interface Management for Longer Battery Lifetime”. IEEE International Conference on Autonomic Computing (ICAC), July 2017. vi Marco Brocanelli, Sen Li, Xiaorui Wang, Wei Zhang. “Maximizing the revenues of data centers in regulation market by coordinating with electric vehicles”. Sustainable Computing: Informatics and Systems, 6: 26-38. June 2015. Marco Brocanelli, Wenli Zheng, Xiaorui Wang. “Reducing the expenses of geo-distributed data centers with portable containerized modules”. IFIP WG 7.3 Performance14, September 2014. Sen Li, Marco Brocanelli, Wei Zhang, Xiaorui Wang. “Integrated Power Management of Data Centers and Electric Vehicles for Energy and Regulation Market Participation”. IEEE Transactions on Smart Grid, 5(5): 2283-2294. June 2014. Marco Brocanelli, Sen Li, Xiaorui Wang, Wei Zhang. “Joint management of data centers and electric vehicles for maximized regulation profits”. International Green Computing Conference (IGCC), June 2013. Sen Li, Marco Brocanelli, Wei Zhang, Xiaorui Wang. “Data center power control for frequency regulation”. Power and Energy Society General Meeting (PES), July 2013. Marco Brocanelli, Yakup Gunbatar, Andrea Serrani, Michael Bolender, “Robust Control for Unstart Recovery in Hypersonic Vehicles”. AIAA Guidance, Navigation, and Control Conference, August 2012. Fields of Study Major Field: Electrical and Computer Engineering vii Table of Contents Page Abstract . ii Dedication . iv Acknowledgments . .v Vita ........................................... vi List of Tables . .x List of Figures . xi 1. Introduction . .1 1.1 Soft Hang Bugs . .2 1.2 Resource Contention . .3 1.3 Major Contributions . .4 2. Hang Doctor: Runtime Detection and Diagnosis of Soft Hangs for Smartphone Apps........................................6 2.1 Background and Motivation . 10 2.1.1 Background . 10 2.1.2 Motivation . 13 2.2 Design of Hang Doctor . 15 2.2.1 Goals and Challenges . 15 2.2.2 Design Overview . 16 2.2.3 First Phase: S-Checker . 20 2.2.4 Second Phase: Diagnoser . 31 2.2.5 Hang doctor Implementation . 33 2.3 Evaluation . 34 viii 2.3.1 Baselines and Performance Metrics . 34 2.3.2 Result Summary and Developers’ Response . 36 2.3.3 Example Runtime Hang Bug Detection . 40 2.3.4 Detection Performance Comparison . 43 2.3.5 Overhead Analysis . 46 2.3.6 Alternative Approaches and Limitations . 47 2.4 Related Work . 49 3. SURF: Supervisory Control of User-Perceived Performance for Mobile Device Energy Savings . 51 3.1 Related Work . 54 3.2 Background and Motivation . 55 3.2.1 Background . 55 3.2.2 Motivation . 56 3.3 Design of SURF . 61 3.3.1 Design Overview . 61 3.3.2 Inner Loop: Performance Balancer . 64 3.3.3 Outer Loop: Performance Controller . 70 3.3.4 Discussion . 72 3.4 Experimental Results . 73 3.4.1 Experimental Setup . 73 3.4.2 SURF: Overall Summary of Results . 75 3.4.3 Inner Loop: Performance Balancer . 77 3.4.4 Outer Loop: Performance Controller . 78 3.4.5 Integrated Solution: SURF . 80 4. Conclusions . 85 Bibliography . 87 ix List of Tables Table Page 2.1 Apps with well-known soft hang bugs tested in the motivation study. The commit number refers to the app version that has the bug. 13 2.2 The timeout value influences the performance of Timeout-based runtime detection algorithms. The numbers report the average numbers of true positives and false positives detected for the apps in Table 2.1. 14 2.3 Correlation analysis results used for the design of S-Checker. Top-10 most correlated performance events for soft hang diagnosis. (a) Monitoring main thread and render thread increases the correlation of about 14% on average compared to (b) monitoring only the main thread.

View Full Text

Details

  • File Type
    pdf
  • Upload Time
    -
  • Content Languages
    English
  • Upload User
    Anonymous/Not logged-in
  • File Pages
    109 Page
  • File Size
    -

Download

Channel Download Status
Express Download Enable

Copyright

We respect the copyrights and intellectual property rights of all users. All uploaded documents are either original works of the uploader or authorized works of the rightful owners.

  • Not to be reproduced or distributed without explicit permission.
  • Not used for commercial purposes outside of approved use cases.
  • Not used to infringe on the rights of the original creators.
  • If you believe any content infringes your copyright, please contact us immediately.

Support

For help with questions, suggestions, or problems, please contact us