Fine-Grained Power Modeling for Smartphones Using System Call - - PowerPoint PPT Presentation

fine grained power modeling for smartphones using system
SMART_READER_LITE
LIVE PREVIEW

Fine-Grained Power Modeling for Smartphones Using System Call - - PowerPoint PPT Presentation

Fine-Grained Power Modeling for Smartphones Using System Call Tracing Based on paper and presentation by: Abhinav Pathak, Y. Charlie Hu, Ming Zhang Paramvir Bahl, Yi-Min Wang Damian Rodziewicz Fine-Grained Power Modeling for Smartphones


slide-1
SLIDE 1

Fine-Grained Power Modeling for Smartphones Using System Call Tracing

Damian Rodziewicz Based on paper and presentation by: Abhinav Pathak, Y. Charlie Hu, Ming Zhang Paramvir Bahl, Yi-Min Wang

slide-2
SLIDE 2

Fine-Grained Power Modeling for Smartphones Using System Call Tracing

Smartphone Capabilities

slide-3
SLIDE 3

Fine-Grained Power Modeling for Smartphones Using System Call Tracing

Smartphone Capabilities

Camera

slide-4
SLIDE 4

Fine-Grained Power Modeling for Smartphones Using System Call Tracing Camera GPS

Smartphone Capabilities

slide-5
SLIDE 5

Fine-Grained Power Modeling for Smartphones Using System Call Tracing Camera Wi-Fi GPS

Smartphone Capabilities

slide-6
SLIDE 6

Fine-Grained Power Modeling for Smartphones Using System Call Tracing Camera Wi-Fi GPS Games and applications

Smartphone Capabilities

slide-7
SLIDE 7

Fine-Grained Power Modeling for Smartphones Using System Call Tracing Camera Wi-Fi GPS Games and applications

Smartphone Capabilities

slide-8
SLIDE 8

Fine-Grained Power Modeling for Smartphones Using System Call Tracing

  • Energy – one of the most critical issues in smartphones.
  • Smartphone capabilities are growing rapidly.
  • Battery capacity has only doubled through 10 years.

Smartphone Constraints

"According to unpublished research by the Boston Consulting Group, the amount of energy that a battery can store (its energy density) is growing by 8% a year. Mobile-device power consumption, meanwhile, is growing at more than three times this rate, as backlit colour screens, high-speed wireless networks and more powerful microprocessors draw ever-larger amounts of power."

slide-9
SLIDE 9

Fine-Grained Power Modeling for Smartphones Using System Call Tracing

Key issue

How can we measure energy consumption in our applications?

  • Power meter
  • Online power models for mobile devices
  • Utilization-based power model
  • System call tracing power model
slide-10
SLIDE 10

Fine-Grained Power Modeling for Smartphones Using System Call Tracing

Measuring Energy Consumption

Power meter

  • High cost (~700$)
  • Requires performing surgery on your phone
  • Only whole energy usage
  • Stationary – cannot move with
  • Very accurate (every 200 ms exact power usage)
slide-11
SLIDE 11

Fine-Grained Power Modeling for Smartphones Using System Call Tracing Źródło: http://eurosys2011.cs.uni-salzburg.at/pdf/eurosys2011-pathak-slides.pdf

Online power model

slide-12
SLIDE 12

Fine-Grained Power Modeling for Smartphones Using System Call Tracing

Utilization-based approach

State-of-art creating model Energy usage Ep = Energy used by 1 second of processor En = Energy used by 1 packet of data sent Ed = Energy used by writing/reading 1 byte … same for GPS, camera, and so on ...

slide-13
SLIDE 13

Fine-Grained Power Modeling for Smartphones Using System Call Tracing

State-of-art predicting Read data every second (something like proc in Linux): %Up = % of used Processor Nn = number of packets sent Nd = number of bytes read / written Result = %Up * Ep + Nn * En + Nd * En

Utilization-based approach

slide-14
SLIDE 14

Fine-Grained Power Modeling for Smartphones Using System Call Tracing

State-of-art wrong assumptions

  • Active utilization is the only trigger of power state change
  • File open/close, socket open/close also consume energy
  • Several components have tail energy states (even few seconds)
  • Linear estimation
  • Sending 100 packets does not cost 2 as much energy as sending 50
  • Quantitative utilization
  • Cannot measure energy consumption of camera / GPS
  • The interval can be too large to collect data,
  • r the sampling can become too costly, if done at fine granularity.

Utilization-based approach

slide-15
SLIDE 15

Fine-Grained Power Modeling for Smartphones Using System Call Tracing

Examples of power usage

Utilization-based approach

Źródło: http://eurosys2011.cs.uni-salzburg.at/pdf/eurosys2011-pathak.pdf

slide-16
SLIDE 16

Fine-Grained Power Modeling for Smartphones Using System Call Tracing

Observations

  • System calls provide the only means via which applications

gain access to the hardware (I/O) components.

  • Names and parameters give clear indication of components

and level of utilization. (Encapsulation of utilization-based approach)

  • System call can be naturally related back to the calling subroutine and

the hosting thread and the process.

System-call-based approach

slide-17
SLIDE 17

Fine-Grained Power Modeling for Smartphones Using System Call Tracing

Problems

  • Tail energy states – How much do they consume? How long do they last?
  • Device drivers are closed source (no source / no information given).
  • Power consumption does not add linearly.
  • Energy does not scale linearly.

System-call-based approach

slide-18
SLIDE 18

Fine-Grained Power Modeling for Smartphones Using System Call Tracing

Problems – non linear additivity

System-call-based approach

slide-19
SLIDE 19

Fine-Grained Power Modeling for Smartphones Using System Call Tracing

Problems – non linear scalability

System-call-based approach

slide-20
SLIDE 20

Fine-Grained Power Modeling for Smartphones Using System Call Tracing

Idea

  • Use system calls as triggers in power modelling.
  • Reverse engineer power logic in device drivers.
  • Use Finite-State-Machine (FSM) to model the power states

and transitions between them in components.

  • Nodes: Power States (Either productive state or tail state)
  • Edges: Transitions between states
  • Can be system call, timeout, other condition.
  • We assume that these drivers implement very simple logic
  • We use Linear Regression to connect workload with power usage in states.

System-call-based approach

slide-21
SLIDE 21

Fine-Grained Power Modeling for Smartphones Using System Call Tracing

Creating FSM

  • Create an FSM for one system call.
  • Model all system calls for one component.
  • Shuffle the system calls in a C program, look for new power states.
  • Model one huge FSM for the phone from the components.

System-call-based approach

slide-22
SLIDE 22

Fine-Grained Power Modeling for Smartphones Using System Call Tracing

Finite State Machine – step 1

System-call-based approach

slide-23
SLIDE 23

Fine-Grained Power Modeling for Smartphones Using System Call Tracing

System-call-based approach

Creating FSM – step 2 - Wi-Fi

slide-24
SLIDE 24

Fine-Grained Power Modeling for Smartphones Using System Call Tracing

System-call-based approach

Creating FSM – step 3

slide-25
SLIDE 25

Fine-Grained Power Modeling for Smartphones Using System Call Tracing

System-call-based approach

Combinatorial issue

  • Usualy one component has about 2 productive states and 1 tail state.
  • It is done manually at this time.
  • Applications are run, FSM models are created.
  • States are binded together manually.
  • Soon the process will be automated.
slide-26
SLIDE 26

Fine-Grained Power Modeling for Smartphones Using System Call Tracing

System-call-based approach

Evaluation – CPU, Disk, Wi-Fi

slide-27
SLIDE 27

Fine-Grained Power Modeling for Smartphones Using System Call Tracing

System-call-based approach

Evaluation – Entire Phones

slide-28
SLIDE 28

Fine-Grained Power Modeling for Smartphones Using System Call Tracing

System-call-based approach

Implementation

  • Tracing system calls in whole phone, to predict energy usage.
  • Windows Mobile 6
  • CeLog – logging mechanism for CPU, memory, TLB, interrupt.
  • Wrappers that log system calls in libraries.
  • Thunking – system call made to invalid address – prefetch abort trap.
  • Android
  • Three levels – kernel, Dalvik Virtual Machine, framework.
  • SystemTap – logging system calls in kernel.
  • Logging library from Android to log framework calls.
slide-29
SLIDE 29

Fine-Grained Power Modeling for Smartphones Using System Call Tracing

System-call-based approach

Implementation - Eprofiler

  • Currently being worked on.
  • Mannualy annotating system calls in the source code to log the entry and exit points.
slide-30
SLIDE 30

Fine-Grained Power Modeling for Smartphones Using System Call Tracing

System-call-based approach

Estimation

slide-31
SLIDE 31

Fine-Grained Power Modeling for Smartphones Using System Call Tracing

System-call-based approach

Estimation

slide-32
SLIDE 32

Fine-Grained Power Modeling for Smartphones Using System Call Tracing

System-call-based approach

What is next?

  • Implementing eproof
  • Releasing modified Android image to public
  • Releasing tools for Android to predict energy usage
  • Detailed classification of power behaviour of different OSes and handsets
slide-33
SLIDE 33

Fine-Grained Power Modeling for Smartphones Using System Call Tracing

Thank You