SlideShare una empresa de Scribd logo
1 de 49
Mobile Energy Consumption
               Frank Maker
                  Eric Jung
               Yichuan Wang

       University of California, Davis
Outline
•   Mobile Platform

•   Measuring Power / Energy

•   User Profiles (Eric Jung)

•   Synchronization Manager (Yichuan Wang)

•   Optimizations

•   Research

•   Q&A
Mobile Platform
How is Mobile Platform
        Different?
                          Mobile8               Laptop9
   Main Purpose           Phone Calls            Anything
Power Budget (Watts)           3                    73
     Size (cm)         11.9 x 5.98 x 1.15   2.41 x 14.35 x 9.82
   Volume (cm3)              81.84                339.61
      Cooling             Passive Air           Forced Air
Nexus One BOM                                                                                    *




* http://www.isuppli.com/News/Pages/Google-Nexus-One-Carries-$17415-Materials-Cost-iSuppli-Teardown-Reveals.aspx
Apple iPhone
Battery Technology[3]

            •      Three main problems


                •       Limited power density for
                        passive air cooled systems


                •       Slow battery energy density
                        growth


                •       30-40% battery lifetime
                        increase


            •      Capacity degrades over time

[1] http://www.nexergy.com/
[2] Intel
Energy Budget                          [1]

 Average Battery Size: 820 - 1150 mAh (3.7V)
        Component                      Power Consumption
Cellular Model and RF Amplifier              1200mW
     Application Processor                  600mW
           Memories                         200mW
        User Interface                      300mW
             Audio                          300mW
Other (BT, Energy Manager, etc.)            400mW
             Total                           ~3W

                                   8
Measuring Power/Energy
Power vs Energy
•   Energy is power integrated over time

•   Electic power is “the rate at which electrical energy is
    transferred by an electric circuit”10

•   Electric energy is the total amount of work that can
    be done by electrons

•   Analogy with driving a car

    •   MPH power
    •   Distance energy
Measuring Energy
•   Use a model

    •   Google using this for Power
                                                          Android
                                                         Developer
        Profiler                                           Phone 1



•   Battery Simulator

    •   Jeffrey Sharkey used Monsoon       GPIB


•   Digital Power Supply               DC Power Supply




    •   Make your own!
User Profiles
    Eric Jung
User Protection in Mobile
          Apps
•   Mobile Apps should not drain excessive energy

    •   Most mobile apps considered “secondary”

    •   Mobile users want to protect battery life for primary uses
        like phone call/sms, although this may change

•   User Context should be included in App Design

    •   User context: Identity (user profile), Activity, Time, Location

    •   Programmers should have potential energy use, potential
        loss of future phone use in mind
User Profiles Vary Greatly




•   Normalized histogram of 53-day call history for 2 users

•   Usage pattern varies dramatically


                                                              5
Different Ways to Look at
               User Profile
•   Based on different types of
    profile measurements

    •   Call arrival prob (top)

    •   Ave remaining minutes
        (bottom)

    •   Data, SMS use not shown

•   Use user-profile to predict/
    reserve battery energy
Energy Threshold
      •   For each time t, find energy level that satisfies all future
          voice with some probability based on history
•     Example:
	

   85% Threshold
      based on “binomial
      call” assumption
•     85% probability that
      calls from history
      are served
•     Measures how much
      battery life is
      needed
Two Example Days
• Depending on call day, different actions might be better




          Light Call                 Heavy Call
Sample App – Data
           Synchronization

• Created sample app that
  syncs email/twitter

• Goal: Balance need for
  repeated data
  synchronizations (email,
  Twitter) with future
  energy needs
Energy Threshold Policy

•   Policy using energy threshold:

    1.   Calculate remaining_syncs possible at time t:

    remaining_syncs = (current battery-energy threshold)/(energy cost to sync)

    2.   Calculate sync_period given remaining syncs

    sync_period = (next_recharge-current time)/remaining_syncs

    Policy:   If time since last sync > sync_period, synchronize
Simulation
• System Parameters:
 - 16 hour discharge period (i.e. charge every night)

 - Energy to synchronize measured from voltmeter
    connected to phone

• Compare Markov Decision Process Policy
  (considered optimal) with threshold 85%, periodic
  sync policies
20 Min Call Day
• Light Call Day: 20 Minutes
• On a light call day, we want to synchronize email
  more often

                                                               • Dynamic adjust to
            MDP1        85%  type1      Period  5 Period  10
sync_both          220           220         191          95
mean_tau1          4.35          4.35       5.02      10.03      call load
dev_tau1           4.18          4.66       0.16       0.23
minutes
t(E=0)
                     20
                   960
                                   20
                                 960
                                              20
                                             960       960
                                                          20
                                                               • Remaining energy
E(T)               0.58          0.58     45.33 193.44           lower for 85%
•   Note: 960 = 16 Hours in minutes                              threshold
•   Note 2: Battery is out of 400 (instead of
    100)                                                        • Syncs More
121 Min Call Day
 • Heavy Call Day: 121 Minutes
 • On heavy day, we want to synchronize less to
     ensure battery life for calls
                                                       • Dynamic adjust to
          MDP1      85%  type1    Period  5 Period  10   call load
sync_both        23            23       99          59
mean_tau1    39.88          41.43     5.54      11.25  • Periodic syncs too
dev_tau1    116.48          119.5     3.25       5.27    much
minutes        121           121        82       102
t(E=0)         960           960       566       668      – Battery dies
E(T)           0.43          1.52         0          0      before end of
                                                            day
                                                          – Calls not all
                                                            served
Things To Consider
•   User Protection

    •   Ensure that phones reserve resources for its primary use

    •   Resource reserves calculated from phone usage profile

•   App Specific

    •   Dynamically adjust app processes to user context

    •   What granularity of battery level reserve is needed?

    •   Does app have periodic or one-shot characteristic?
Synchronization Manager
        Yichuan Wang
Motivation


• 'Internet device'
• Direct Interaction vs Data Synchronization 
• Data Synchronization as a system service
Traditional ways to do
       Synchronization
• Initial effort: to make adoption as easy as possilbe
• So what are people using to sync?
• Timer
• Handler
• AsyncTask
• Make a optimized version of those APIs
Traditional ways to do
    Synchronization (1 of 3)
•   Periodically wake up

•   Pull remote/local changes

•   Update local/remote data

•   Optionally update UI to notify user

•   TimerTask fetchMail  = new FetchMail();
    //perform the task once a day at 4 a.m.,
    //starting tomorrow morning
    Timer timer = new Timer();
    timer.scheduleAtFixedRate(fetchMail,
        getTomorrowMorning4am(), fONCE_PER_DAY);
Traditional ways to do
    Synchronization (2 of 3)
•   Handler

•   private final Handler mHandler = new Handler() {
            public void handleMessage(Message msg) {
                // Do the deed.

                // Repeat every 1 second.
                sendMessageDelayed(obtainMessage
    (TICK_MSG), 3 * 1000);
       
            }
    };
Traditional ways to do
    Synchronization (3 of 3)
•   AsyncTask
     private class DownTask extends AsyncTask<URL, Integer, Long> {
         protected Long doInBackground(URL... urls) {
         }

         protected void onProgressUpdate(Integer... progress) {
             setProgressPercent(progress[0]);
         }

         protected void onPostExecute(Long result) {
             showDialog("Downloaded " + result + " bytes");
         }
     }
New SyncAdapter in
        Android 2.0
• Google goes one step further
• A framework for Account, Contact and Sync
  management

• The new Account&Sync settings
• A little rough around the edges
Authentication
•       Starting point: AuthenticationService

    •     listen for intent: android.accounts.AccountAuthenticator

    •     meta-data: unique accountType and other resources

    •     onBind: return Authenticator's binder

•       Authenticator:  AbstractAccountAuthenticator

•       Override methods to provide implementation

    •     getAuthToken; addAccount; confirmCredentials

•       AuthenticatorActivity: The login Screen
Synchronization
•   Starting point: SyncService

    •   listen for intent: android.content.SyncAdapter

    •   meta-data: info about syncAdapter and contact structure

    •   onBind: return SyncAdapter binder

•   SyncAdapter: AbstractThreadedSyncAdapter

    •   onPerformSync: pull data and update using
        ContactContract API
Internal


• ContentService -> SyncManager
• ServiceManager->"Content Manager"
Optimizations
Parsers [11]


• Mainly two types
 • Tree (ex. DOM)
 • Event (ex. SAX)
• Consider how much of the information is used
 • Tree pre-parses everything, but is take initial hit
 • Event parses as needed, but spread out
Radios[11]


• Check if connectivity is available
• Reduce data
• Tradeoff computation and communication
 • Bluetooth slow but, low power
 • Wi-fi fast, but high power
 • Can use GZip compression
Wake Locks / Services

• Be conservative
                            • Give user a choice
• Can keep phone on
  longer than necessary    • Consider
                             AlarmManager instead
• Do you really need it?
                            • setInexactRepeating
• Services should be          to allow binning
  short not daemons
Use the Cloud, Luke
• More scalable
• Offloads power usage
• Might be more efficient
• Communication
 • energy cost could be an issue
 • RESTful interface
Profiling

•   Hit the big targets first   •   Traceviewer

•   Consider native code           •   Recycle Java objects

    •   floating point          •   Hierarchyviewer

    •   matrices                   •   Decrease height of
                                       view hierarchy
    •   long loops
                               •   Think like C++
Sensors
•   Different rates available

    •   UI, Gaming, Normal, etc

    •   Almost 10x difference from Fastest and Slowest

•   GPS

    •   Coarse location much cheaper (10x less)

    •   No satellites, LocationManager keeps looking

    •   Let LocationManager find best one for you
GPS Acquisition Time
Research
Motivation
•   Industry collects est. 13 million phones each year

•   Estimated to be only 10% of 130 million taken out of
    service

•   ReCellular found 80% were still functional

•   Surveys find people replace about every 4 years

    •   Battery worn out

    •   Want something new
Challenges
•   ReCellular received 1,100 different handset in 2008

•   Heterogeneity

    •   Operating System

    •   Accelerators

    •   Radios

•   Searching configurations for optimal energy point to
    run repurposed phone at
Solution(s)
• Artificial Intelligence to find best operating point
• Solar panel power supply to remove worn battery
• Use offline Markov Decision Process to find optimal
  point
References
1.    Cellular Phones as Embedded Systems, Yrjö Neuvo, International Solid-State Circuits Conference
      2004

2.    Augmented Smartphone Applications Through Clone Cloud Execution

3.    UC Davis EEC216 - Professor Rajaveen Amirtharajah

4.    Powermonkey-eXplorer, https://powertraveller.com/iwantsome/primatepower/powermonkey-explorer/

5.    Lumedyne V-Power Energy Harvester Technology, http://www.lumedynetechnologies.com/Energy
      %20Harvester.html

6.    Thermo Life, http://www.poweredbythermolife.com/thermolife.htm

7.    Geared Turbine, http://www.kidwind.org/xcart/product.php?productid=42&cat=4&page=1

8.    http://www.google.com/phone/static/en_US-nexusone_tech_specs.html

9.    http://www.apple.com/macbookpro/specs.html

10.   http://en.wikipedia.org/wiki/Electric_power

11.   http://dl.google.com/io/2009/pres/W_0300_CodingforLife-BatteryLifeThatIs.pdf

12.   http://www.recellular.com/images/ReCel_Sustainability.pdf




                                                    46
Thanks
      Frank Maker
  flmaker@ece.ucdavis.edu
fmaker@handycodeworks.com

         Eric Jung
    eajung@ucdavis.edu

       Yichuan Wang
   yicwang@ucdavis.edu
Binomial Call Energy
              Threshold

             : probability of call arrival based on call profile
          : random variable denoting call arrival at time t
    • Assume each call minute is a binomial variable with
      probability
                : CDF of remaining call time after time t
•                   Energy threshold         :
GPS Power Cycling

Más contenido relacionado

Destacado

Electric meter reading
Electric meter readingElectric meter reading
Electric meter reading
Kenneth Crane
 
How to Lower Android Power Consumption Without Affecting Performance
How to Lower Android Power Consumption Without Affecting PerformanceHow to Lower Android Power Consumption Without Affecting Performance
How to Lower Android Power Consumption Without Affecting Performance
rickschwar
 
Music and math lesson plan
Music and math lesson planMusic and math lesson plan
Music and math lesson plan
Rebecca Hill
 
Lesson plan in mathematics
Lesson plan in mathematicsLesson plan in mathematics
Lesson plan in mathematics
Emilyn Ragasa
 

Destacado (17)

Energy efficiency of android
Energy efficiency of androidEnergy efficiency of android
Energy efficiency of android
 
How to Minimize Your App’s Power Consumption
How to Minimize Your App’s Power Consumption How to Minimize Your App’s Power Consumption
How to Minimize Your App’s Power Consumption
 
Global Energy Consumption and alternative technologies
Global Energy Consumption and alternative technologiesGlobal Energy Consumption and alternative technologies
Global Energy Consumption and alternative technologies
 
Energy consumption Part 1
Energy consumption Part 1Energy consumption Part 1
Energy consumption Part 1
 
Electric meter reading
Electric meter readingElectric meter reading
Electric meter reading
 
Math Lesson Plan
Math Lesson PlanMath Lesson Plan
Math Lesson Plan
 
How to Lower Android Power Consumption Without Affecting Performance
How to Lower Android Power Consumption Without Affecting PerformanceHow to Lower Android Power Consumption Without Affecting Performance
How to Lower Android Power Consumption Without Affecting Performance
 
State of Mobile Commerce 2014 (Sucharita Mulpuru)
State of Mobile Commerce 2014 (Sucharita Mulpuru)State of Mobile Commerce 2014 (Sucharita Mulpuru)
State of Mobile Commerce 2014 (Sucharita Mulpuru)
 
Music and math lesson plan
Music and math lesson planMusic and math lesson plan
Music and math lesson plan
 
Slide share ppt
Slide share   pptSlide share   ppt
Slide share ppt
 
System on Chip (SoC)
System on Chip (SoC)System on Chip (SoC)
System on Chip (SoC)
 
Low power vlsi design
Low power vlsi designLow power vlsi design
Low power vlsi design
 
Semi-Detailed Lesson Plan in Math VI
Semi-Detailed Lesson Plan in Math VISemi-Detailed Lesson Plan in Math VI
Semi-Detailed Lesson Plan in Math VI
 
The Greenhouse Effect
The Greenhouse EffectThe Greenhouse Effect
The Greenhouse Effect
 
Brakes
BrakesBrakes
Brakes
 
Lesson plan in mathematics
Lesson plan in mathematicsLesson plan in mathematics
Lesson plan in mathematics
 
Wireless Power Transmission(Future is Here)
Wireless Power Transmission(Future is Here)Wireless Power Transmission(Future is Here)
Wireless Power Transmission(Future is Here)
 

Similar a Learn about energy consumption and battery life on Android devices

MRI Energy-Efficient Cloud Computing
MRI Energy-Efficient Cloud ComputingMRI Energy-Efficient Cloud Computing
MRI Energy-Efficient Cloud Computing
Roger Rafanell Mas
 
Results 1 Spanish City Council
Results 1 Spanish City CouncilResults 1 Spanish City Council
Results 1 Spanish City Council
Juan Pablo Garcia
 
참여기관_발표자료-국민대학교 201301 정기회의
참여기관_발표자료-국민대학교 201301 정기회의참여기관_발표자료-국민대학교 201301 정기회의
참여기관_발표자료-국민대학교 201301 정기회의
DzH QWuynh
 
Reducing energy consumption of computing
Reducing energy consumption of computing Reducing energy consumption of computing
Reducing energy consumption of computing
NGUYEN VAN LUONG
 

Similar a Learn about energy consumption and battery life on Android devices (20)

Trading Power and Performance to Achieve Optimal Thermal Design for Battery-P...
Trading Power and Performance to Achieve Optimal Thermal Design for Battery-P...Trading Power and Performance to Achieve Optimal Thermal Design for Battery-P...
Trading Power and Performance to Achieve Optimal Thermal Design for Battery-P...
 
Fighting Zombie Servers
Fighting Zombie ServersFighting Zombie Servers
Fighting Zombie Servers
 
Mitsubishi energy saving data collecting server eco-webserverⅲ_dienhathe.vn
Mitsubishi energy saving data collecting server eco-webserverⅲ_dienhathe.vnMitsubishi energy saving data collecting server eco-webserverⅲ_dienhathe.vn
Mitsubishi energy saving data collecting server eco-webserverⅲ_dienhathe.vn
 
Mitsubishi energy saving data collecting server eco webserver ⅲ_dienhathe.vn
Mitsubishi energy saving data collecting server eco webserver ⅲ_dienhathe.vnMitsubishi energy saving data collecting server eco webserver ⅲ_dienhathe.vn
Mitsubishi energy saving data collecting server eco webserver ⅲ_dienhathe.vn
 
Mitsubishi electric energy saving data collection server eco webserveriii-die...
Mitsubishi electric energy saving data collection server eco webserveriii-die...Mitsubishi electric energy saving data collection server eco webserveriii-die...
Mitsubishi electric energy saving data collection server eco webserveriii-die...
 
Mitsubishi electric energy saving data collection server eco webserveriii
Mitsubishi electric energy saving data collection server eco webserveriiiMitsubishi electric energy saving data collection server eco webserveriii
Mitsubishi electric energy saving data collection server eco webserveriii
 
How to achieve 95%+ Accurate power measurement during architecture exploration?
How to achieve 95%+ Accurate power measurement during architecture exploration? How to achieve 95%+ Accurate power measurement during architecture exploration?
How to achieve 95%+ Accurate power measurement during architecture exploration?
 
Performance Oriented Design
Performance Oriented DesignPerformance Oriented Design
Performance Oriented Design
 
Cloudsim & greencloud
Cloudsim & greencloud Cloudsim & greencloud
Cloudsim & greencloud
 
Cloudsim & Green Cloud
Cloudsim & Green CloudCloudsim & Green Cloud
Cloudsim & Green Cloud
 
OK Labs - Virtualization as the Nexus of Multicore Power Management
OK Labs - Virtualization as the Nexus of Multicore Power ManagementOK Labs - Virtualization as the Nexus of Multicore Power Management
OK Labs - Virtualization as the Nexus of Multicore Power Management
 
04 performance
04 performance04 performance
04 performance
 
Intern presentation nicolechiou_2018_vareximaging_sanitized
Intern presentation nicolechiou_2018_vareximaging_sanitizedIntern presentation nicolechiou_2018_vareximaging_sanitized
Intern presentation nicolechiou_2018_vareximaging_sanitized
 
MRI Energy-Efficient Cloud Computing
MRI Energy-Efficient Cloud ComputingMRI Energy-Efficient Cloud Computing
MRI Energy-Efficient Cloud Computing
 
gcce-uapm-slide-20131001-1900
gcce-uapm-slide-20131001-1900gcce-uapm-slide-20131001-1900
gcce-uapm-slide-20131001-1900
 
Results 1 Spanish City Council
Results 1 Spanish City CouncilResults 1 Spanish City Council
Results 1 Spanish City Council
 
참여기관_발표자료-국민대학교 201301 정기회의
참여기관_발표자료-국민대학교 201301 정기회의참여기관_발표자료-국민대학교 201301 정기회의
참여기관_발표자료-국민대학교 201301 정기회의
 
VM HA and Cross-Region Scaling
VM HA and Cross-Region ScalingVM HA and Cross-Region Scaling
VM HA and Cross-Region Scaling
 
Tanay Nagjee - Electric Cloud - Better Continuous Integration with Test Accel...
Tanay Nagjee - Electric Cloud - Better Continuous Integration with Test Accel...Tanay Nagjee - Electric Cloud - Better Continuous Integration with Test Accel...
Tanay Nagjee - Electric Cloud - Better Continuous Integration with Test Accel...
 
Reducing energy consumption of computing
Reducing energy consumption of computing Reducing energy consumption of computing
Reducing energy consumption of computing
 

Más de Marakana Inc.

Behavior Driven Development
Behavior Driven DevelopmentBehavior Driven Development
Behavior Driven Development
Marakana Inc.
 
Why Java Needs Hierarchical Data
Why Java Needs Hierarchical DataWhy Java Needs Hierarchical Data
Why Java Needs Hierarchical Data
Marakana Inc.
 
Pictures from "Learn about RenderScript" meetup at SF Android User Group
Pictures from "Learn about RenderScript" meetup at SF Android User GroupPictures from "Learn about RenderScript" meetup at SF Android User Group
Pictures from "Learn about RenderScript" meetup at SF Android User Group
Marakana Inc.
 
2010 07-18.wa.rails tdd-6
2010 07-18.wa.rails tdd-62010 07-18.wa.rails tdd-6
2010 07-18.wa.rails tdd-6
Marakana Inc.
 
Graphicsand animations devoxx2010 (1)
Graphicsand animations devoxx2010 (1)Graphicsand animations devoxx2010 (1)
Graphicsand animations devoxx2010 (1)
Marakana Inc.
 

Más de Marakana Inc. (20)

Android Services Black Magic by Aleksandar Gargenta
Android Services Black Magic by Aleksandar GargentaAndroid Services Black Magic by Aleksandar Gargenta
Android Services Black Magic by Aleksandar Gargenta
 
JRuby at Square
JRuby at SquareJRuby at Square
JRuby at Square
 
Behavior Driven Development
Behavior Driven DevelopmentBehavior Driven Development
Behavior Driven Development
 
Martin Odersky: What's next for Scala
Martin Odersky: What's next for ScalaMartin Odersky: What's next for Scala
Martin Odersky: What's next for Scala
 
Why Java Needs Hierarchical Data
Why Java Needs Hierarchical DataWhy Java Needs Hierarchical Data
Why Java Needs Hierarchical Data
 
Deep Dive Into Android Security
Deep Dive Into Android SecurityDeep Dive Into Android Security
Deep Dive Into Android Security
 
Securing Android
Securing AndroidSecuring Android
Securing Android
 
Pictures from "Learn about RenderScript" meetup at SF Android User Group
Pictures from "Learn about RenderScript" meetup at SF Android User GroupPictures from "Learn about RenderScript" meetup at SF Android User Group
Pictures from "Learn about RenderScript" meetup at SF Android User Group
 
Android UI Tips, Tricks and Techniques
Android UI Tips, Tricks and TechniquesAndroid UI Tips, Tricks and Techniques
Android UI Tips, Tricks and Techniques
 
2010 07-18.wa.rails tdd-6
2010 07-18.wa.rails tdd-62010 07-18.wa.rails tdd-6
2010 07-18.wa.rails tdd-6
 
Efficient Rails Test-Driven Development - Week 6
Efficient Rails Test-Driven Development - Week 6Efficient Rails Test-Driven Development - Week 6
Efficient Rails Test-Driven Development - Week 6
 
Graphicsand animations devoxx2010 (1)
Graphicsand animations devoxx2010 (1)Graphicsand animations devoxx2010 (1)
Graphicsand animations devoxx2010 (1)
 
What's this jQuery? Where it came from, and how it will drive innovation
What's this jQuery? Where it came from, and how it will drive innovationWhat's this jQuery? Where it came from, and how it will drive innovation
What's this jQuery? Where it came from, and how it will drive innovation
 
jQuery State of the Union - Yehuda Katz
jQuery State of the Union - Yehuda KatzjQuery State of the Union - Yehuda Katz
jQuery State of the Union - Yehuda Katz
 
Pics from: "James Gosling on Apple, Apache, Google, Oracle and the Future of ...
Pics from: "James Gosling on Apple, Apache, Google, Oracle and the Future of ...Pics from: "James Gosling on Apple, Apache, Google, Oracle and the Future of ...
Pics from: "James Gosling on Apple, Apache, Google, Oracle and the Future of ...
 
Efficient Rails Test Driven Development (class 4) by Wolfram Arnold
Efficient Rails Test Driven Development (class 4) by Wolfram ArnoldEfficient Rails Test Driven Development (class 4) by Wolfram Arnold
Efficient Rails Test Driven Development (class 4) by Wolfram Arnold
 
Efficient Rails Test Driven Development (class 3) by Wolfram Arnold
Efficient Rails Test Driven Development (class 3) by Wolfram ArnoldEfficient Rails Test Driven Development (class 3) by Wolfram Arnold
Efficient Rails Test Driven Development (class 3) by Wolfram Arnold
 
Learn about JRuby Internals from one of the JRuby Lead Developers, Thomas Enebo
Learn about JRuby Internals from one of the JRuby Lead Developers, Thomas EneboLearn about JRuby Internals from one of the JRuby Lead Developers, Thomas Enebo
Learn about JRuby Internals from one of the JRuby Lead Developers, Thomas Enebo
 
Replacing Java Incrementally
Replacing Java IncrementallyReplacing Java Incrementally
Replacing Java Incrementally
 
Learn to Build like you Code with Apache Buildr
Learn to Build like you Code with Apache BuildrLearn to Build like you Code with Apache Buildr
Learn to Build like you Code with Apache Buildr
 

Último

Russian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in Delhi
Russian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in DelhiRussian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in Delhi
Russian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in Delhi
kauryashika82
 

Último (20)

Unit-IV- Pharma. Marketing Channels.pptx
Unit-IV- Pharma. Marketing Channels.pptxUnit-IV- Pharma. Marketing Channels.pptx
Unit-IV- Pharma. Marketing Channels.pptx
 
ICT Role in 21st Century Education & its Challenges.pptx
ICT Role in 21st Century Education & its Challenges.pptxICT Role in 21st Century Education & its Challenges.pptx
ICT Role in 21st Century Education & its Challenges.pptx
 
Russian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in Delhi
Russian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in DelhiRussian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in Delhi
Russian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in Delhi
 
This PowerPoint helps students to consider the concept of infinity.
This PowerPoint helps students to consider the concept of infinity.This PowerPoint helps students to consider the concept of infinity.
This PowerPoint helps students to consider the concept of infinity.
 
Measures of Dispersion and Variability: Range, QD, AD and SD
Measures of Dispersion and Variability: Range, QD, AD and SDMeasures of Dispersion and Variability: Range, QD, AD and SD
Measures of Dispersion and Variability: Range, QD, AD and SD
 
microwave assisted reaction. General introduction
microwave assisted reaction. General introductionmicrowave assisted reaction. General introduction
microwave assisted reaction. General introduction
 
Mixin Classes in Odoo 17 How to Extend Models Using Mixin Classes
Mixin Classes in Odoo 17  How to Extend Models Using Mixin ClassesMixin Classes in Odoo 17  How to Extend Models Using Mixin Classes
Mixin Classes in Odoo 17 How to Extend Models Using Mixin Classes
 
Paris 2024 Olympic Geographies - an activity
Paris 2024 Olympic Geographies - an activityParis 2024 Olympic Geographies - an activity
Paris 2024 Olympic Geographies - an activity
 
Mehran University Newsletter Vol-X, Issue-I, 2024
Mehran University Newsletter Vol-X, Issue-I, 2024Mehran University Newsletter Vol-X, Issue-I, 2024
Mehran University Newsletter Vol-X, Issue-I, 2024
 
APM Welcome, APM North West Network Conference, Synergies Across Sectors
APM Welcome, APM North West Network Conference, Synergies Across SectorsAPM Welcome, APM North West Network Conference, Synergies Across Sectors
APM Welcome, APM North West Network Conference, Synergies Across Sectors
 
Measures of Central Tendency: Mean, Median and Mode
Measures of Central Tendency: Mean, Median and ModeMeasures of Central Tendency: Mean, Median and Mode
Measures of Central Tendency: Mean, Median and Mode
 
Accessible design: Minimum effort, maximum impact
Accessible design: Minimum effort, maximum impactAccessible design: Minimum effort, maximum impact
Accessible design: Minimum effort, maximum impact
 
PROCESS RECORDING FORMAT.docx
PROCESS      RECORDING        FORMAT.docxPROCESS      RECORDING        FORMAT.docx
PROCESS RECORDING FORMAT.docx
 
Código Creativo y Arte de Software | Unidad 1
Código Creativo y Arte de Software | Unidad 1Código Creativo y Arte de Software | Unidad 1
Código Creativo y Arte de Software | Unidad 1
 
Grant Readiness 101 TechSoup and Remy Consulting
Grant Readiness 101 TechSoup and Remy ConsultingGrant Readiness 101 TechSoup and Remy Consulting
Grant Readiness 101 TechSoup and Remy Consulting
 
Advanced Views - Calendar View in Odoo 17
Advanced Views - Calendar View in Odoo 17Advanced Views - Calendar View in Odoo 17
Advanced Views - Calendar View in Odoo 17
 
Sports & Fitness Value Added Course FY..
Sports & Fitness Value Added Course FY..Sports & Fitness Value Added Course FY..
Sports & Fitness Value Added Course FY..
 
Z Score,T Score, Percential Rank and Box Plot Graph
Z Score,T Score, Percential Rank and Box Plot GraphZ Score,T Score, Percential Rank and Box Plot Graph
Z Score,T Score, Percential Rank and Box Plot Graph
 
Nutritional Needs Presentation - HLTH 104
Nutritional Needs Presentation - HLTH 104Nutritional Needs Presentation - HLTH 104
Nutritional Needs Presentation - HLTH 104
 
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
 

Learn about energy consumption and battery life on Android devices

  • 1. Mobile Energy Consumption Frank Maker Eric Jung Yichuan Wang University of California, Davis
  • 2. Outline • Mobile Platform • Measuring Power / Energy • User Profiles (Eric Jung) • Synchronization Manager (Yichuan Wang) • Optimizations • Research • Q&A
  • 4. How is Mobile Platform Different? Mobile8 Laptop9 Main Purpose Phone Calls Anything Power Budget (Watts) 3 73 Size (cm) 11.9 x 5.98 x 1.15 2.41 x 14.35 x 9.82 Volume (cm3) 81.84 339.61 Cooling Passive Air Forced Air
  • 5. Nexus One BOM * * http://www.isuppli.com/News/Pages/Google-Nexus-One-Carries-$17415-Materials-Cost-iSuppli-Teardown-Reveals.aspx
  • 7. Battery Technology[3] • Three main problems • Limited power density for passive air cooled systems • Slow battery energy density growth • 30-40% battery lifetime increase • Capacity degrades over time [1] http://www.nexergy.com/ [2] Intel
  • 8. Energy Budget [1] Average Battery Size: 820 - 1150 mAh (3.7V) Component Power Consumption Cellular Model and RF Amplifier 1200mW Application Processor 600mW Memories 200mW User Interface 300mW Audio 300mW Other (BT, Energy Manager, etc.) 400mW Total ~3W 8
  • 10. Power vs Energy • Energy is power integrated over time • Electic power is “the rate at which electrical energy is transferred by an electric circuit”10 • Electric energy is the total amount of work that can be done by electrons • Analogy with driving a car • MPH power • Distance energy
  • 11. Measuring Energy • Use a model • Google using this for Power Android Developer Profiler Phone 1 • Battery Simulator • Jeffrey Sharkey used Monsoon GPIB • Digital Power Supply DC Power Supply • Make your own!
  • 12. User Profiles Eric Jung
  • 13. User Protection in Mobile Apps • Mobile Apps should not drain excessive energy • Most mobile apps considered “secondary” • Mobile users want to protect battery life for primary uses like phone call/sms, although this may change • User Context should be included in App Design • User context: Identity (user profile), Activity, Time, Location • Programmers should have potential energy use, potential loss of future phone use in mind
  • 14. User Profiles Vary Greatly • Normalized histogram of 53-day call history for 2 users • Usage pattern varies dramatically 5
  • 15. Different Ways to Look at User Profile • Based on different types of profile measurements • Call arrival prob (top) • Ave remaining minutes (bottom) • Data, SMS use not shown • Use user-profile to predict/ reserve battery energy
  • 16. Energy Threshold • For each time t, find energy level that satisfies all future voice with some probability based on history • Example: 85% Threshold based on “binomial call” assumption • 85% probability that calls from history are served • Measures how much battery life is needed
  • 17. Two Example Days • Depending on call day, different actions might be better Light Call Heavy Call
  • 18. Sample App – Data Synchronization • Created sample app that syncs email/twitter • Goal: Balance need for repeated data synchronizations (email, Twitter) with future energy needs
  • 19. Energy Threshold Policy • Policy using energy threshold: 1. Calculate remaining_syncs possible at time t: remaining_syncs = (current battery-energy threshold)/(energy cost to sync) 2. Calculate sync_period given remaining syncs sync_period = (next_recharge-current time)/remaining_syncs Policy: If time since last sync > sync_period, synchronize
  • 20. Simulation • System Parameters: - 16 hour discharge period (i.e. charge every night) - Energy to synchronize measured from voltmeter connected to phone • Compare Markov Decision Process Policy (considered optimal) with threshold 85%, periodic sync policies
  • 21. 20 Min Call Day • Light Call Day: 20 Minutes • On a light call day, we want to synchronize email more often • Dynamic adjust to MDP1 85%  type1 Period  5 Period  10 sync_both 220 220 191 95 mean_tau1 4.35 4.35 5.02 10.03 call load dev_tau1 4.18 4.66 0.16 0.23 minutes t(E=0) 20 960 20 960 20 960 960 20 • Remaining energy E(T) 0.58 0.58 45.33 193.44 lower for 85% • Note: 960 = 16 Hours in minutes threshold • Note 2: Battery is out of 400 (instead of 100) • Syncs More
  • 22. 121 Min Call Day • Heavy Call Day: 121 Minutes • On heavy day, we want to synchronize less to ensure battery life for calls • Dynamic adjust to MDP1 85%  type1 Period  5 Period  10 call load sync_both 23 23 99 59 mean_tau1 39.88 41.43 5.54 11.25 • Periodic syncs too dev_tau1 116.48 119.5 3.25 5.27 much minutes 121 121 82 102 t(E=0) 960 960 566 668 – Battery dies E(T) 0.43 1.52 0 0 before end of day – Calls not all served
  • 23. Things To Consider • User Protection • Ensure that phones reserve resources for its primary use • Resource reserves calculated from phone usage profile • App Specific • Dynamically adjust app processes to user context • What granularity of battery level reserve is needed? • Does app have periodic or one-shot characteristic?
  • 24. Synchronization Manager Yichuan Wang
  • 25. Motivation • 'Internet device' • Direct Interaction vs Data Synchronization  • Data Synchronization as a system service
  • 26. Traditional ways to do Synchronization • Initial effort: to make adoption as easy as possilbe • So what are people using to sync? • Timer • Handler • AsyncTask • Make a optimized version of those APIs
  • 27. Traditional ways to do Synchronization (1 of 3) • Periodically wake up • Pull remote/local changes • Update local/remote data • Optionally update UI to notify user • TimerTask fetchMail  = new FetchMail(); //perform the task once a day at 4 a.m., //starting tomorrow morning Timer timer = new Timer(); timer.scheduleAtFixedRate(fetchMail,     getTomorrowMorning4am(), fONCE_PER_DAY);
  • 28. Traditional ways to do Synchronization (2 of 3) • Handler • private final Handler mHandler = new Handler() {         public void handleMessage(Message msg) {             // Do the deed.             // Repeat every 1 second.             sendMessageDelayed(obtainMessage (TICK_MSG), 3 * 1000);             } };
  • 29. Traditional ways to do Synchronization (3 of 3) • AsyncTask  private class DownTask extends AsyncTask<URL, Integer, Long> {      protected Long doInBackground(URL... urls) {      }      protected void onProgressUpdate(Integer... progress) {          setProgressPercent(progress[0]);      }      protected void onPostExecute(Long result) {          showDialog("Downloaded " + result + " bytes");      }  }
  • 30. New SyncAdapter in Android 2.0 • Google goes one step further • A framework for Account, Contact and Sync management • The new Account&Sync settings • A little rough around the edges
  • 31. Authentication • Starting point: AuthenticationService • listen for intent: android.accounts.AccountAuthenticator • meta-data: unique accountType and other resources • onBind: return Authenticator's binder • Authenticator:  AbstractAccountAuthenticator • Override methods to provide implementation • getAuthToken; addAccount; confirmCredentials • AuthenticatorActivity: The login Screen
  • 32. Synchronization • Starting point: SyncService • listen for intent: android.content.SyncAdapter • meta-data: info about syncAdapter and contact structure • onBind: return SyncAdapter binder • SyncAdapter: AbstractThreadedSyncAdapter • onPerformSync: pull data and update using ContactContract API
  • 33. Internal • ContentService -> SyncManager • ServiceManager->"Content Manager"
  • 35. Parsers [11] • Mainly two types • Tree (ex. DOM) • Event (ex. SAX) • Consider how much of the information is used • Tree pre-parses everything, but is take initial hit • Event parses as needed, but spread out
  • 36. Radios[11] • Check if connectivity is available • Reduce data • Tradeoff computation and communication • Bluetooth slow but, low power • Wi-fi fast, but high power • Can use GZip compression
  • 37. Wake Locks / Services • Be conservative • Give user a choice • Can keep phone on longer than necessary • Consider AlarmManager instead • Do you really need it? • setInexactRepeating • Services should be to allow binning short not daemons
  • 38. Use the Cloud, Luke • More scalable • Offloads power usage • Might be more efficient • Communication • energy cost could be an issue • RESTful interface
  • 39. Profiling • Hit the big targets first • Traceviewer • Consider native code • Recycle Java objects • floating point • Hierarchyviewer • matrices • Decrease height of view hierarchy • long loops • Think like C++
  • 40. Sensors • Different rates available • UI, Gaming, Normal, etc • Almost 10x difference from Fastest and Slowest • GPS • Coarse location much cheaper (10x less) • No satellites, LocationManager keeps looking • Let LocationManager find best one for you
  • 43. Motivation • Industry collects est. 13 million phones each year • Estimated to be only 10% of 130 million taken out of service • ReCellular found 80% were still functional • Surveys find people replace about every 4 years • Battery worn out • Want something new
  • 44. Challenges • ReCellular received 1,100 different handset in 2008 • Heterogeneity • Operating System • Accelerators • Radios • Searching configurations for optimal energy point to run repurposed phone at
  • 45. Solution(s) • Artificial Intelligence to find best operating point • Solar panel power supply to remove worn battery • Use offline Markov Decision Process to find optimal point
  • 46. References 1. Cellular Phones as Embedded Systems, Yrjö Neuvo, International Solid-State Circuits Conference 2004 2. Augmented Smartphone Applications Through Clone Cloud Execution 3. UC Davis EEC216 - Professor Rajaveen Amirtharajah 4. Powermonkey-eXplorer, https://powertraveller.com/iwantsome/primatepower/powermonkey-explorer/ 5. Lumedyne V-Power Energy Harvester Technology, http://www.lumedynetechnologies.com/Energy %20Harvester.html 6. Thermo Life, http://www.poweredbythermolife.com/thermolife.htm 7. Geared Turbine, http://www.kidwind.org/xcart/product.php?productid=42&cat=4&page=1 8. http://www.google.com/phone/static/en_US-nexusone_tech_specs.html 9. http://www.apple.com/macbookpro/specs.html 10. http://en.wikipedia.org/wiki/Electric_power 11. http://dl.google.com/io/2009/pres/W_0300_CodingforLife-BatteryLifeThatIs.pdf 12. http://www.recellular.com/images/ReCel_Sustainability.pdf 46
  • 47. Thanks Frank Maker flmaker@ece.ucdavis.edu fmaker@handycodeworks.com Eric Jung eajung@ucdavis.edu Yichuan Wang yicwang@ucdavis.edu
  • 48. Binomial Call Energy Threshold : probability of call arrival based on call profile : random variable denoting call arrival at time t • Assume each call minute is a binomial variable with probability : CDF of remaining call time after time t • Energy threshold :