Relationship between CPU Usage and Battery Usage


Question

I'm comparing the resource consumption of two Android Apps.




  • App A uses accelerometer


  • App B uses both accelerometer and gyroscope




After reading these sensors, these apps does some processing on the sensor values. Now I measured their CPU usage using dumpsys cpuinfo as well as top command.
In general, App B uses 3-4 times more CPU than App A. The actual numbers are as follows: These results for single CPU and my phone is using Dual-core 1.2 GHz Cortex-A9 CPU (Samsung Galaxy S2).



App A (Average CPU Usage: 5%)
APP B (Average CPU Usage = 20%)


Then I measured the percentage battery usage for these two apps. I kept the Android phone in Aeroplane mode and only one of these two apps were running at a a specific moment of time. After running them for one hour, I get the following results:



Remaining battery level after one hour of use:
Idle mode: 99%
Running App A: 96%
Running App B: 93%


I was expecting the same ratio with these battery level as I observed with CPU Usage.
I also tested these apps on a smartwatch ( CPU: Quad-core 1.2 GHz Cortex-A7) and I observed even smaller difference between the battery use. The observed results for one hour use are as follows:



Remaining battery level after one hour of use:
Idle mode: 99%
Running App A: 87%
Running App B: 85%


So my question: Why the ratio of CPU usage for these apps is not reflected in their remaining battery levels? Or Shouldn't the CPU Usage be linearly related to the battery use ?
Could the reason be that multiple cores are active at the same, that's why I observe small difference between the their battery levels?
PS: I use partial lock in these apps.


Answer

Long story short, battery comsumption depends not only on CPU but also every other part of your device.



Full version. An SoC consists of CPU, GPU, modem, north bridge, south bridge and RAM (on a discrete semiconductor chip but packed together into the same shell) altogether. Also the battery powers not only the SoC but also sensors, screen (which is usually the most power-consuming part) and wireless connection antennae.

A CPU has its own algorithm to control it's power and performance, which is called a 'governor'. A radical CPU governor tends to provide better CPU performance at the cost of high battery consumption, whereas a gentle governor will try to reduce battery consumption, resulting in lower CPU performance. The same applies to GPU and other parts of the SoC.

The screen is often the most battery-consuming part of a device, and the most decisive factors of a screen's power are size, resolution, brightness and technology (LCD or OLED). Cheaper phones and watches use LCD screens while high-end ones use OLED screen, as OLED uses significantly less power than an LCD one of the same specifications.

A watch usually has significantly less battery capacity but not-so-little screen power, which will decrease the draining difference in its battery stats while the screen is on. Besides, the sensors used on the phone and the watch may not be exactly the same, causing various differences.

The bottom line, the battery cost is determined by all parts of a device rather than only CPU. If another part is draining too much battery, you can't find large differences even though the CPU's power is highly variable.


Topics


2D Engines   3D Engines   9-Patch   Action Bars   Activities   ADB   Advertisements   Analytics   Animations   ANR   AOP   API   APK   APT   Architecture   Audio   Autocomplete   Background Processing   Backward Compatibility   Badges   Bar Codes   Benchmarking   Bitmaps   Bluetooth   Blur Effects   Bread Crumbs   BRMS   Browser Extensions   Build Systems   Bundles   Buttons   Caching   Camera   Canvas   Cards   Carousels   Changelog   Checkboxes   Cloud Storages   Color Analysis   Color Pickers   Colors   Comet/Push   Compass Sensors   Conferences   Content Providers   Continuous Integration   Crash Reports   Credit Cards   Credits   CSV   Curl/Flip   Data Binding   Data Generators   Data Structures   Database   Database Browsers   Date &   Debugging   Decompilers   Deep Links   Dependency Injections   Design   Design Patterns   Dex   Dialogs   Distributed Computing   Distribution Platforms   Download Managers   Drawables   Emoji   Emulators   EPUB   Equalizers &   Event Buses   Exception Handling   Face Recognition   Feedback &   File System   File/Directory   Fingerprint   Floating Action   Fonts   Forms   Fragments   FRP   FSM   Functional Programming   Gamepads   Games   Geocaching   Gestures   GIF   Glow Pad   Gradle Plugins   Graphics   Grid Views   Highlighting   HTML   HTTP Mocking   Icons   IDE   IDE Plugins   Image Croppers   Image Loaders   Image Pickers   Image Processing   Image Views   Instrumentation   Intents   Job Schedulers   JSON   Keyboard   Kotlin   Layouts   Library Demos   List View   List Views   Localization   Location   Lock Patterns   Logcat   Logging   Mails   Maps   Markdown   Mathematics   Maven Plugins   MBaaS   Media   Menus   Messaging   MIME   Mobile Web   Native Image   Navigation   NDK   Networking   NFC   NoSQL   Number Pickers   OAuth   Object Mocking   OCR Engines   OpenGL   ORM   Other Pickers   Parallax List   Parcelables   Particle Systems   Password Inputs   PDF   Permissions   Physics Engines   Platforms   Plugin Frameworks   Preferences   Progress Indicators   ProGuard   Properties   Protocol Buffer   Pull To   Purchases   Push/Pull   QR Codes   Quick Return   Radio Buttons   Range Bars   Ratings   Recycler Views   Resources   REST   Ripple Effects   RSS   Screenshots   Scripting   Scroll Views   SDK   Search Inputs   Security   Sensors   Services   Showcase Views   Signatures   Sliding Panels   Snackbars   SOAP   Social Networks   Spannable   Spinners   Splash Screens   SSH   Static Analysis   Status Bars   Styling   SVG   System   Tags   Task Managers   TDD &   Template Engines   Testing   Testing Tools   Text Formatting   Text Views   Text Watchers   Text-to   Toasts   Toolkits For   Tools   Tooltips   Trainings   TV   Twitter   Updaters   USB   User Stories   Utils   Validation   Video   View Adapters   View Pagers   Views   Watch Face   Wearable Data   Wearables   Weather   Web Tools   Web Views   WebRTC   WebSockets   Wheel Widgets   Wi-Fi   Widgets   Windows   Wizards   XML   XMPP   YAML   ZIP Codes