Towards Developing Energy Efficient Mobile Applications: Models, Tools, and Guidelines

Shaiful Alam Chowdhury
Software energy efficiency has become a concern for the scale of operations in data centers and for the availability of battery-driven mobile devices. Developers now consider energy efficiency as one of the performance metrics. Unfortunately, developers are not trained enough and do not know how to produce energy efficient software. They demand guidelines and tools for developing energy efficient software. To help energy-aware developers (focusing on Android application developers), we make the
more » ... following contributions. 1) Energy-aware application (app) developers, first and foremost, need to estimate their apps' energy consumption. Without any estimation, they would not know if their effort for energy optimization is effective. Considering Android as an example, we first present a reproducible machine learning-based energy consumption model. Results suggest that with more and more apps in training, we can improve the estimation accuracy of machine learning-based models. However, adding and running a new app requires writing a manual test script for the app, which hinders building an ever improving energy model. To alleviate this problem, we show that automatic random test generation with test selection heuristics can be used. These automatically generated tests can exercise the apps, so we can collect different resource usage (independent variables) and energy consumption of the apps (dependent variable). 2) We then argue that developers also need energy optimization guidelines: what makes an app more energy efficient? Along this direction, we provide ii three different guidelines. First, we show that the new HTTP/2 protocol offers reduced energy consumption when compared to the old HTTP/1.1. Also, the handshaking mechanism for adding transport layer security causes extra energy drain in mobile clients. Energy-aware web app developers should consider deploying the HTTP/2 protocol for saving energy consumption. Second, we show that developers, if prudent, do not need to worry about the energy impact of software logging which is crucial for monitoring apps' health. They need to log less frequently by grouping small log messages together. Finally, we present a new design pattern that developers can adopt for making view updates more energy efficient. We also discuss the potential trade-offs (e.g., user experience, and software maintenance cost) that developers should be aware of before adopting a design choice. iii Preface This thesis is mainly based on five different publications, where I was the main contributor with the supervision of Professor Abram Hindle. I designed the methodology, conducted experiments, evaluated the results, and wrote the papers. In some cases, my other collaborators helped me with data collection
doi:10.7939/r3-0tgz-x060 fatcat:7ggspyd64ffavko33lpur77fd4