Empowering developers to estimate app energy consumption

Radhika Mittal, Aman Kansal, Ranveer ChandraMobiCom 2012 · DOI

TL;DR

This paper introduces WattsOn, a novel tool that allows mobile app developers to estimate their app's energy consumption directly on their development workstation, without needing physical devices or complex lab setups. By combining resource scaling techniques with new and existing power models, WattsOn provides developers with crucial insights into which components (CPU, network, display) are draining the battery, enabling them to make more informed design decisions for energy-efficient applications.

What Problem Does This Paper Address?

Battery life is a critical factor for user experience on mobile devices, yet developers often struggle to accurately measure and optimize their apps' energy consumption. Existing methods are either tedious and expensive (requiring physical power meters and multiple devices) or limited in their ability to explore various operating conditions (network congestion, signal strength, screen brightness) and provide component-level breakdowns. This lack of accessible tools means developers often lack awareness of their app's energy impact, leading to inefficient software that drains user batteries unnecessarily.

Methods

WattsOn tackles this problem by integrating into existing mobile device emulators (like the Windows Phone Emulator). Its core innovations lie in two key areas:

  • Resource Scaling: This technique adjusts the resources of the development workstation (CPU speed, network characteristics) to mimic those of a real mobile device. This ensures that the app's behavior and timing on the emulator are representative of its performance on a phone. They employ "link shaping" for network scaling, adjusting bandwidth and latency at layer 2.5 of the network stack to match cellular conditions. For the CPU, they scale down the available processor cycles to match the phone's performance.
  • Power Modeling: WattsOn uses empirically derived power models for various mobile device components. Crucially, it introduces a new power model for AMOLED displays, which is more complex than previous LCD/OLED models due to non-linear and non-additive color dependencies. They also refine models for cellular networks by incorporating measurements for varying signal strengths and operators. The system then combines resource usage data from the scaled emulator with these power models to estimate energy consumption.

Datasets

The paper does not explicitly mention large, pre-existing datasets for training or evaluation. Instead, the authors describe their methodology for generating power models and validating their tool:

  • New Power Models: They developed a new power model for AMOLED displays using a lookup table approach based on measurements across a wide range of colors. They also conducted new measurements to parameterize existing cellular network power models for varying signal strengths and operators.
  • Benchmark Applications: To evaluate WattsOn, they developed custom applications that simulate specific usage patterns:
  • Display-only app: Used to test the AMOLED display model.
  • Local computation app: Simulates apps that primarily use the CPU and display, with no network activity.
  • Networked apps: Applications that download files of varying sizes.
  • Internet browsing app: Tests emulation accuracy for webpages of different content sizes and complexity.

Key Insights and Ideas

  • Developer-centric energy estimation is crucial: The paper highlights that empowering developers with tools during development is key to creating energy-efficient apps, rather than relying solely on platform-level optimizations.
  • AMOLED display power is complex: The non-linear and non-additive nature of AMOLED power consumption, dependent on both color and surrounding pixels, necessitates more sophisticated modeling than previously used for LCDs.
  • Resource scaling is vital for accurate emulation: Simply running an app on a powerful workstation won't reflect its energy use on a resource-constrained phone. Scaling CPU and network resources is essential for realistic emulation.
  • Component-level breakdown is highly valuable: WattsOn's ability to break down energy consumption by component (CPU, network, display) allows developers to pinpoint specific areas for optimization, rather than just looking at total energy use.
  • Tail states in network communication significantly impact energy: The paper demonstrates that even after data transmission ends, network interfaces remain in a higher power state for a period, contributing substantially to overall energy consumption.

Key Results

WattsOn was validated against real device measurements for several applications and scenarios. The key quantitative results include:

  • Average energy error: Across various applications, the average energy estimation error ranged from 4% to 9%.
  • Display model accuracy: The AMOLED display model showed very little error, with an average error of 9.3% for a realistic test case involving static images. Sub-sampling pixels (1% or 0.1%) for display tracing did not significantly degrade accuracy.
  • Local computation accuracy: For apps focused on CPU and display, the emulation accuracy was high, with an average error of 9.3%.
  • Networked app accuracy: For applications involving network downloads, the average error was 4.73%.
  • Internet browsing accuracy: Testing with various webpages yielded an average error of 4.64%.

Qualitatively, the tool successfully identified energy-hungry segments and component breakdowns, aiding in design decisions.

Limitations and Future Work

  • GPU Omission: The current WattsOn model largely omits GPU power consumption, which can be significant (averaging 231mW for video playback). While they suggest adding a fixed power value for video playback, more complex GPU usage (like games) is not covered.
  • CPU Model Simplification: The paper acknowledges that the simple linear CPU power model is not perfect and actual consumption can vary. More accurate models exist but are difficult to scale due to architectural differences in performance counters.
  • External Resource Dependency: The emulation of apps that rely on external web services is challenging due to the dynamic nature of network interactions.
  • Future Work: The authors suggest obtaining real-world energy measurements to provide developer feedback, augmenting power models with real measurement data, and expanding the tool to cover more hardware technologies and operating conditions. They also aim to improve the accuracy of CPU and GPU models and explore techniques for multi-component optimization.

Summary updated

BibTeX
@inproceedings{mittal2012empowering,
  author = {Radhika Mittal and Aman Kansal and Ranveer Chandra},
  title = {{Empowering developers to estimate app energy consumption}},
  booktitle = {MobiCom},
  year = {2012},
  doi = {10.1145/2348543.2348583},
}
Figure