This whitepaper documents a power and performance data profiling tool on Android* devices –Intel® Power Monitoring Tool for Android Devices. Intel Power Monitoring Tool monitors component-level power-related performance data and is intended to make it easy for Android software developers/engineers to:
ii) allow for offline diagnosis of any issues by providing a log file.
In this document, we present the features of Power Monitoring Tool and provide two representative user scenarios of Power Monitoring Tool, including a case study on how a software developer can utilize the Power Monitoring Tool to identify a power/performance issue. The user manual for Power Monitoring Tool is in the Appendix.
Table of Contents
- Intel® Power Monitoring Tool Features
- Intel® Power Monitoring Tool Usage Models
- Appendix: Intel® Power Monitoring Tool User Manual
Nowadays battery-equipped mobile devices are increasing dramatically with the growth of consumer demands. Many mobile operating systems are emerging with more interactive UIs for mobile devices like tablets and phones. Android is one of the mainstream mobile operating systems, and hosts a large number of applications with rich features. Since the mobile devices are battery-energy constrained, system/app software developers have more challenges to develop power-efficient system/apps.
To develop energy-efficient systems or applications, software developers seek statistical data to identify and diagnose power / performance related issues. Unfortunately it is time-consuming to explore key power related data in the oceans of available data. In this paper, we investigate system level devices and extract minimum sets of power-related data. Power Monitoring Tool provides the feature to collect the set of power-related data in a periodic manner. In such a way, the system and application power-related states are recorded in a log file. Then software developer can have historical data to identify and diagnose power and performance related issues.
One of the major characteristics of Android is that most applications run in full screen mode in order to provide better interaction between the end user and devices. This makes it challenging for software developers to monitor the system and application statistical data in real time. Power Monitoring Tool helps to close the gap that provides real-time monitoring of key power-related system/app data.
Power Monitoring Tool maintains a non-intrusive way to collect a minimum set of power related data in the background. The overhead of CPU utilization of Power Monitoring Tool is fairly low (at most 3%).
Intel® Power Monitoring Tool Features
Intel® Power Monitoring Tool provides three major features for experienced and non-experienced software developers on Android.
Component level power related data on Android
The following components are responsible for the majority of the power consumption on a mobile device (tablet/handheld) and play a crucial part in the battery life of the device.
- Primary Storage (SSD & EMMC)
- External Storage (SD-Card)
OS and application behavior plays a big role in the overall power consumption/battery life of the device as well. Developers can use this tool to gauge the power characteristics of the device at idle (OS and services running), and also observe the effect of a particular application on the overall power consumption of the device. The table below outlines the power related data this tool collects for the above components.
1 The relationship description between power and data is based on our experience with several Android tablets or phones. The relationships in other devices or other components could vary.
In addition to the component level power data collected, the Intel® Power Monitoring Tool for Android also collects power related data for a running application, shown below:
Real-Time system and application monitoring
Intel® Power Monitoring Tool provides system and application monitoring in real-time based on the configured sampling interval. When the Android system is running or an app is running, this tool provides a small window on the right side of status bar which shows the key power related data. The screen shot below shows the tool monitoring the Browser app and the system. The data in the window updates in near real-time and includes the following information:
Timestamp: BP, battery discharged power, CPU, overall CPU frequency, CPU0 utilization, CPU1 utilization, Wifi, Wifi Tx packets, Wifi Rx packets, App, App state, App thread #, App utilization.
2 The relationship description between power and data is based on our experience with several Android tablets or phones. The relationships in other devices or other components could vary.
The snapshot shows that the browser is monitored in real-time by Power Monitoring Tool.
The right bottom of window (shown above) in the status bar illustrates that at time 21:33:37, current battery discharged is 6.26W; CPU0 frequency is 0.60GHz, CPU1 frequency is 0.60GHz; CPU0 utilization is 22.05%, CPU1 utilization is 25.51%; Wifi transmits 176 packets and receives 118 packets from the last sampling time; the browser app is currently in sleep state with 27 threads, which consumes near 1.30% CPU utilization.
This allows the user to monitor the system or a particular app in near real-time manner while interacting with the device.
Non-intrusive profiling in the background
Power Monitoring Tool provides profiling service in the background with negligible overhead when Android system and apps are running.
The start/stop of profiling service actions are triggered by tapping the Power Monitoring Tool app. After user stops power profiling service, a log file named "powermonitor.log" is generated on internal storage or external storage, if available. The file includes all the power related data addressed in the previous section for the sampling interval between the start and stop times of profiling service. Below is a snapshot of the log file.
The content in the log file are listed in the table below:
As we can see from the log file example, the sampling time in the logging file is 1 second. The sampling rate is user configurable. The table below shows the overhead of the tool with different sampling rates. The table below shows that with 1 second interval sampling rate, the overhead of the tool is below 3%.
Users can select the email option to send out the powermonitor.log to their own email address after the profiling service stops. This allows for easy collection and extraction of the data from the device to the users’ computers.
Intel® Power Monitoring Tool Usage Models
Here are two possible usage models/scenarios under which the tool can be used.
Mark is an app software developer for Android mobile devices. He has developed a book reader app called EReader. He would like to see whether the developed app has severe power/performance related issue. He decides to utilize Power Monitoring Tool to identify issues.
He first starts Power Monitoring Tool app and clicks the "Start Profiling" button. Then he inputs "EReader" into the Edit box of "Enter your app name". He clicks "Monitor app" and "Set data notify" buttons. Then he notices that a small window appearing on the right left side of status bar with online updated data.
Mark starts his EReader app and opens an e-book to read. He noticed that the CPU utilization and app CPU utilization are high at almost 100% without any interaction. He decides to take a look at the profiling data to figure out whether this is an issue.
Mark opens the Power Monitoring Tool app again and clicks the "Stop Profiling" button to stop the profiling service. Then he pulls out and plots the data with app user and system cpu utilizations as shown in the figure below. In the figure, the application user cpu utilization is high at 50%, which means that the application fully uses one core to execute codes in the user space. Then Mark determines, using the application cpu utilization hint provided by the Power Monitoring Tool, that the high point for cpu utilization was when he opened a book. Mark felt this might be caused by the code snippet he wrote for opening the e-book. He checks that piece of code and figures out an infinite loop bug.
Susan is a non-experienced Android phone user. She notices that her phone loses power more frequently even with a full battery charge. She calls a phone support technical engineer about this issue. The technical engineer instructs her to use the Power Monitoring Tool for profiling 2-4 hours. Then Susan sent the powermonitor.log to the engineer by clicking the "Send out log file" button after she clicks "Stop profiling" button. The engineer identifies the issue by first reading the battery data to exclude battery issue. Then he checks whether there is any malicious behavior among CPU, display, wifi and modem etc. data according to the powermonitor.log file to diagnose the problem.
Power Monitoring Tool is intended to provide experienced software developers and non-experienced users a way to monitor, identify and diagnosis system level power or performance related issues. The real-time monitoring feature provides software developers straightforward view to find problems. The logging feature gives software developers historic trace of the data for further identification. The minimum power-related data collection saves software developers time for exploring oceans of data to find the key power/performance related data, and provides for non-intrusive data profiling with negligible overhead.
Appendix: User manual of Intel® Power Monitoring Tool for Android Devices
Availability of Intel® Power Monitoring Tool for Android Devices
- The app was released via the Google Market Place mid-January, 2012.
The link is: https://market.android.com/details?id=com.intel.PowerMonitoringTool&feature=search_result#?t=W251bGwsMSwyLDEsImNvbS5pbnRlbC5Qb3dlck1vbml0b3JpbmdUb29sIl0.
User manual of Intel® Power Monitoring Tool for Android Devices
- Supported operating systems
Currently Intel® Power Monitoring Tool supports recent Android GingerBread/HoneyComb/IceCreamSandwich*.
- How to use the app at this stage
1. Install Power Monitoring Tool app
adb install -r com.intel.PowerMonitoringTool.apk
- How to use some features
1. Use profiling feature and send out the log via email
d) Open Power Monitoring Tool app and click "Stop profiling"
e) Input your email address in the edit box
g) Select the email app from a list – powermonitor.log should be automatically attached
2. Use on-line monitoring feature for tablets.
b) Click "Display data"
3. Use application monitoring feature
b) Enter the application name or partial application name. For example, to monitor "browser" app, you can input "browser" into the "Enter app name:" edit box, or input "browse" app into the edit box. Then Power Monitoring Tool seeks for the first app that its name contains the input words.