Carat: collaborative energy diagnosis for mobile devices

Adam J. Oliner, Anand P. Iyer, Ion Stoica, Eemil Lagerspetz, Sasu TarkomaSenSys 2013 · DOI

TL;DR

This paper introduces Carat, a collaborative, black-box system for diagnosing energy anomalies on mobile devices. By aggregating data from over 500,000 users, Carat can identify apps that excessively drain battery life and provide actionable recommendations, leading to significant battery life improvements for users.

What Problem Does This Paper Address?

Mobile devices, particularly smartphones and tablets, are ubiquitous, but their battery life is a constant concern. Beyond typical battery drain from system configurations and user behavior, a class of "energy bugs" and "energy hogs" can cause abnormally heavy battery consumption. Diagnosing these issues is challenging because a single device lacks a baseline for "normal" energy use and cannot account for variations in configurations, usage patterns, or device-specific quirks. Existing methods often require intrusive instrumentation or kernel modifications, which are impractical for end-users. This paper tackles the problem of diagnosing these energy anomalies in a non-intrusive, collaborative manner, providing actionable insights to users.

Methods

Carat employs a collaborative, black-box approach. A client app on the user's device intermittently collects coarse-grained measurements, such as battery level, running processes, device model, and OS version. These measurements are sent to a central server, which then correlates higher expected energy use with client properties.

The core of Carat's analysis involves building and comparing conditional probability distributions of energy drain rates. It distinguishes between two types of anomalies:

  • Hogs: Apps that statistically drain the battery significantly faster than the community average when running.
  • Bugs: Anomalies where an app drains the battery significantly faster on a specific client or subset of clients compared to other instances of the same app.

Carat uses a diagnosis tree structure called MCAD (Minimal Complete Actionable Diagnosis) to translate these findings into concrete recommendations for users, such as killing a specific app or upgrading the OS. The system quantifies the error and confidence associated with each diagnosis and projects the potential battery life improvement.

Datasets

The primary dataset used in this paper is collected from the Carat deployment itself, involving over 500,000 mobile devices (iOS and Android). This large-scale, real-world data collection forms the basis for training and evaluating Carat's anomaly detection and diagnosis capabilities. The paper also mentions using a modified Wikipedia app for injected anomaly experiments.

Key Insights and Ideas

  • Collaboration is Key: Diagnosing energy anomalies, especially distinguishing between "hogs" and "bugs," is impossible with data from a single device. A community-driven approach is essential to establish baselines and identify deviations.
  • Black-Box is Sufficient: Intrusive instrumentation or kernel access is not strictly necessary for effective energy anomaly diagnosis. Carat demonstrates that using publicly available APIs can yield accurate and actionable insights.
  • Actionable Recommendations Matter: Simply identifying an anomaly isn't enough. Carat's strength lies in providing concrete, personalized recommendations that users can act upon, leading to tangible battery life improvements.
  • Hogs vs. Bugs Distinction is Crucial: The ability to differentiate between an app that is inherently power-hungry (hog) and one that exhibits abnormal behavior under specific conditions (bug) is vital for providing the correct advice (e.g., kill vs. restart/investigate).

Key Results

  • High Detection Rate: Carat detected 100% of synthetically injected energy anomalies in controlled experiments.
  • No Known False Positives: The system produced no known instances of false positives among the thousands of anomalies diagnosed in the wild.
  • Accurate Projections: Carat projected battery impact with 95% accuracy, with 95.2% of predicted improvements falling within the 95% confidence bounds.
  • Significant User Improvement: Users who followed Carat's recommendations saw an average battery life increase of 11.7% after two weeks, and a substantial 41% increase for long-term users.
  • Low Overhead: Carat imposes negligible battery overhead, with its energy consumption being indistinguishable from running nothing.
  • Scalability: The Carat architecture scales linearly with the number of users, and the analysis backend (Spark) shows near-linear scaling with the number of samples.

Limitations and Future Work

  • Black-Box Limitations: Carat's black-box nature means it cannot see internal mechanisms (code, messages, kernel state) and is passive. This limits its ability to pinpoint the exact cause of an anomaly, especially when multiple apps are correlated.
  • Data Dependency: The effectiveness of Carat relies on having sufficient data from a large community. If a specific app or anomaly is rare, it might not be detected.
  • Actionability Constraints: The current client UI primarily suggests killing or restarting apps. Future work aims to incorporate more specific recommendations derived from MCADs, such as disabling WiFi or upgrading the OS.
  • Developer-Focused Diagnosis: The authors suggest that enabling finer-grained diagnoses for developers through in-app instrumentation (e.g., via a developer API) would be a valuable future direction.
  • Leveraging Platform-Specific Data: While Carat currently aims for cross-platform parity, future versions could leverage more detailed platform-specific information (especially from Android) for richer diagnoses.

Summary updated

BibTeX
@inproceedings{oliner2013carat,
  author = {Adam J. Oliner and Anand P. Iyer and Ion Stoica and Eemil Lagerspetz and Sasu Tarkoma},
  title = {{Carat: collaborative energy diagnosis for mobile devices}},
  booktitle = {SenSys},
  year = {2013},
  doi = {10.1145/2517351.2517354},
}
Figure