Tracking Energy in Networked Embedded Systems - PowerPoint PPT Presentation

1 / 48
About This Presentation
Title:

Tracking Energy in Networked Embedded Systems

Description:

Tracking Energy in Networked Embedded Systems Rodrigo Fonseca *, Prabal Dutta , Philip Levis , Ion Stoica Computer Science Division University of ... – PowerPoint PPT presentation

Number of Views:217
Avg rating:3.0/5.0
Slides: 49
Provided by: tei72
Category:

less

Transcript and Presenter's Notes

Title: Tracking Energy in Networked Embedded Systems


1
Tracking Energy in Networked Embedded Systems
Rodrigo Fonseca, Prabal Dutta, Philip Levis,
Ion Stoica
Computer Science Division University of
California, Berkeley prabal,istoica_at_cs.berkeley.
edu
Computer Science Department Stanford
University pal_at_cs.stanford.edu
Yahoo! Research Santa Clara, CA rfonseca_at_yahoo-in
c.com
OSDI08 San Diego, California Dec. 8-10, 2008
2
Motivationin mote-class sensor networks,
energy is the defining constraint
  • Wide dynamic range
  • 10 mA active current
  • 10 uA sleep current
  • 0.1 1 duty cycle
  • Limited energy reserve 2 AA batteries typical
  • CPU 10 MIPS
  • RAM 4 KB to 10 KB
  • ROM 32 KB to 128 KB
  • Flash 512 KB to 1 MB
  • Radio 40 kbps to 250 kbps

2000 mA-Hr
3
Energy-efficient design pervades the research
agenda
Energy-efficiency is measured by packets sent,
time sleeping, bytes written
these are all (incompatible) proxy measures.
4
Three basic challenges
  • Energy metering
  • Measure energy usage
  • i(t) ? p(t) ? ?p(t)dt
  • Energy breakdown
  • Slice usage horizontally
  • Allocate usage to energy sinks
  • Activity tracking
  • Dice usage vertically
  • Track causal connections

5
Whats an activity? Connecting the causal dots
  • A causally-connected set of operations
  • whose distinct resource consumptions
  • should be grouped together for accounting

M.B. Jones et al., Modular Real-Time Resource
Management in the Rialto Operating System,
HotOS95, 1995. G. Banga et al. Resource
Containers A New Facility for Resource
Management in Server Systems, OSDI99, 1999.
6
A toy example where have all the Joules gone?
Slice by device
48 seconds of Blink
Track by activity
7
Outline
  • Introduction
  • Why is it hard and how do you solve it?
  • Energy Metering (measuring)
  • Energy Breakdown (slicing)
  • Activity Tracking (dicing and tracking)
  • How well does it work?
  • How much does it cost?
  • How could it be used?
  • What are its limitations?

8
Measuring wide horizontal/vertical dynamic range
86,400,000 ms
640,000 ms
Farkas00
TX packet at 1 duty cycle (20 ms / 2 s)
4,000 ms
30 ms
9
Dynamic range in power draw exceeds 10,0001
gt 50 mW
lt 1 µW
10
Quanto uses iCount to solve energy metering
challenge
Prabal Dutta, Mark Feldmeier, Joseph Paradiso,
and David Culler, Energy Metering for Free
Augmenting Switching Regulators for Real-Time
Monitoring, IPSN08, St. Louis, MO, 2008. Best
Paper Award and ISLPED08 Design Contest Winner.
11
Outline
  • Introduction
  • Why is it hard and how do you solve it?
  • Energy Metering (measuring)
  • Energy Breakdown (slicing)
  • Activity Tracking ( tracking)
  • How well does it work?
  • How much does it cost?
  • What are its limitations?
  • How can it be used?

12
Slicing breaking down the envelope into its parts
Marc A. Viredaz and Deborah A. Wallach, Power
Evaluation of a Handheld Computer, IEEE Micro,
Jan-Feb, 2003
13
Not all energy sinks can be instrumented
Power
MCU
USART
CPU
OSC
ADC
DMA
Timer
LNA
PA
Radio
Flash
Sensors
LEDs
RX
TX
Power
Data
Control
14
A different approach to energy slicing power
state tracking
On
Off
  • Instrument device drivers
  • Export device power states
  • Through narrow interface
  • OS tracks state transitions

H. Zeng et al. ECOSystem Managing Energy as a
First Class Operating Systems Resource,
ASPLOS02, 2002.
15
Estimate energy breakdowns with regression
?E
  • For every state transition
  • Snapshot system-wide power states (a1,, an)
  • Snapshot global energy usage (?E)
  • Snapshot system clock (?t)
  • Generate an equation of the form
  • ?E/?t a1p1 , anpn
  • (ps are the unknown power draws)
  • Solve for ps using weighted multivariate least
    squares

as
pi
?t
High-resolution, high-speed energy meter key for
good results
16
Outline
  • Introduction
  • Why is it hard and how do you solve it?
  • Energy Metering (measuring)
  • Energy Breakdown (slicing)
  • Activity Tracking (tracking)
  • Abstractions
  • Mechanisms
  • Challenges
  • How well does it work?
  • How much does it cost?
  • What are its limitations?
  • How can it be used?

17
Tracking gap between what is measured and what
matters
  • Itsy
  • Measured
  • Breakdown by subsystem
  • Breakdown by application
  • PowerScope
  • Measured
  • Breakdown by PC
  • Breakdown by PID

Marc A. Viredaz and Deborah A. Wallach, Power
Evaluation of a Handheld Computer, IEEE Micro,
Jan-Feb, 2003
Jason Flinn and M. Satyanarayanan, Energy-Aware
Adaptation for Mobile Apps., SOSP99, Kiawah
Island, SC, 1999
18
What actually matters? Activities
  • Energy metering and slicing show
  • How much energy is used
  • When energy is used
  • Where energy is used
  • But why is the energy being spent?
  • Activity tracking answers the why question
  • Attributes usage to meaningful resource
    principals
  • Not to threads, processes, tasks, functions, or
    PC

M.B. Jones et al., Modular Real-Time Resource
Management in the Rialto Operating System,
HotOS95, 1995. G. Banga et al. Resource
Containers A New Facility for Resource
Management in Server Systems, OSDI99, 1999.
H. Zeng et al. ECOSystem Managing Energy as a
First Class Operating Systems Resource,
ASPLOS02, 2002.
19
Three steps to activity tracking
  • Annotating
  • Any abstraction can introduce an annotation
  • Associates an activity label with an execution
  • Labels are lt origin-node activity-identifier gt
    pairs
  • Propagating
  • System software transfers activity labels
  • Across subsystems, nodes, and deferred
    computations
  • Recording
  • Track, log, and post-process resource usage

20
Annotating an activity paints
causally-connected actions
  • Sensing involves
  • Sensor...
  • CPU, ADC, I2C bus,
  • Storing involves
  • Flash
  • CPU, SPI bus, timers,
  • Initiate annotation with
  • CPUActivity.set(ltlabelgt)
  • Quanto automatically propagates labels

Node A
CPU
Sensor
Flash
... CPUActivity.set(ACT_SENSING) Sensor.read() .
.. CPUActivity.set(ACT_STORING) Flash.write(...)
...
21
Outline
  • Introduction
  • Why is it hard and how do you solve it?
  • Energy Metering (measuring)
  • Energy Breakdown (slicing)
  • Activity Tracking (tracking)
  • Abstractions
  • Mechanisms
  • Challenges
  • How well does it work?
  • How much does it cost?
  • What are its limitations?
  • How can it be used?

22
Deferred computations
  • Examples
  • CPU ? Post task (deferred function call) ? CPU
  • CPU ? Queue object ? CPU
  • Task Scheduler
  • Add activity field to task structure
  • Set activity field on task posting
  • Restore activity on task invocation
  • Queue
  • Tag each entry with its activity label
  • Write activity label on enqueue
  • Restore activity label on dequeue

23
Node-to-Node communications
  • Add hidden field to packet
  • Senders OS sets activity field

CPU
Node B
Flash
Radio
CPU
Sensor
Node A
Radio
Radio.send(message_t msg) . . .
msg-gtheader-gtactivity CPUActivity.get() . .
.
24
Proxy activities
  • Every interrupt causes energy consumption
  • before activity label is identified
  • Interrupt ? CPU
  • Timer ? CPU
  • Radio ? CPU
  • Proxy activity provides ephemeral label
  • Binding with real activity occurs when label is
    clear

CPU
Node B
Flash
Radio
CPU
Sensor
Node A
Radio
message_t Radio.recv(message_t msg, void
payload, uint8_t len) . . .
CPUActivity.bind(msg-gthdr-gtactivity) . . .
25
Concurrent activities on shared devices (see
paper)
Timer.fired
Timer.start
Activity A
Timer.fired
Timer.start
Activity B
Timer Power State
A
A/B
B
Timer Activities
Time
Add A
Add B
Rem B
Rem A
26
Outline
  • Introduction
  • Why is it hard and how do you solve it?
  • How well does it work?
  • How much does it cost?
  • How can it be used?
  • What are its limitations?

27
Energy breakdown ground truth regression
results agree
48 seconds of Blink
LED0 LED1 LED2 CPU Baseline
Oscope 2.50 mA 2.23 mA 0.83 mA - n/a - 0.79 mA
Quanto 2.51 mA 2.24 mA 0.83 mA 1.43 mA 0.83 mA
28
Outline
  • Introduction
  • Why is it hard and how do you solve it?
  • How well does it work?
  • How much does it cost?
  • How can it be used?
  • What are its limitations?

29
Software Footprint in TinyOS
30
Space, Time and Energy Costs
  • Space
  • 12 bytes per energy or activity sample
  • Logging RAM buffer 800 samples _at_ 12 bytes each
  • Time Energy
  • Reading time 19 CPU cycles (19 µs)
  • Reading energy 24 CPU cycles (24 µs)
  • Logging a sample 102 CPU cycles (102 µs total)
  • Logging Blink App
  • 0.12 of CPU time (60.71 ms / 48 s)
  • 71 of CPU active time!
  • 0.08 energy (0.41 mJ)
  • Quanto can measure its own usage

31
Outline
  • Introduction
  • Why is it hard and how do you solve it?
  • How well does it work?
  • How much does it cost?
  • How can it be used?
  • What are its limitations?

32
Where have all the Joules gone?
Slice by device
48 seconds of Blink
Track by activity
33
Where have all the (milli)seconds gone?
48 seconds of Blink
Activity tracking
34
Whats the cost of false alarms in Low-Power
Listening?
D
RX
Tlisten
Preamble
D
Noise
TX
35
Does it really work over the network?
  • Bounce plays ping-pong with a pair of packets
  • Shows activity on Node 1 that started on Node 4

1
4
Labels are lt origin-node activity-identifier gt
pairs
36
Why is TIMERA firing at 16Hz?!?
37
Outline
  • Introduction
  • Why is it hard and how do you solve it?
  • How well does it work?
  • How much does it cost?
  • How can it be used?
  • What are its limitations?

38
Limitations
  • Energy Metering
  • Requires hardware support
  • Input voltage dependence ? Requires calibration
  • Hardware tolerances ? Requires calibration
  • Energy Breakdown
  • Assumes visibility into device power states
  • Assumes constant per-state power draws
  • Assumes linearly independent equations
  • Requires device driver modifications
  • Activity Tracking
  • Reentrancy not supported
  • Requires modifications to OS abstractions

39
Summary
Measure
Slice


CPUActivity.set(ACT_LED0) . . . CPUActivity.set(A
CT_LED1) . . . CPUActivity.set(ACT_LED2)
Dice
Track
40
Whats Next?
  • Deploy new platforms
  • Scale from 2 to 1,000 nodes
  • Community rollout
  • In Sourceforge tinyos-2.x-contrib/berkeley/quanto
  • Hardware www.cs.berkeley.edu/prabal/projects/epi
    c
  • Documentation for developers and kernel hackers
  • Research directions
  • Explore energy complexity of network protocols
    in the literature
  • Compare approximation techniques (e.g. counters
    vs tracing)
  • Software energy metering
  • From energy profiling to energy management

Benchmark
Quanto
41
Questions? Comments? Discussion?
42
Backup Slides
43
Recording log, export, and post-process data
  • Challenge is getting data off the node
  • Reason most applications are still toys

Continuous Parallel Out Ethernet
Burst 10KB RAM Log UART Out
Burst 128K FIFO Log UART Out
Continuous Compression UART Out
44
Summary of Quanto energy profiling architecture
Perform regressions, compute energy breakdowns
CPUActivity.set(ACT_SENSING)
Allocate usage to activities
Application
log activity labels
log power states, and time and energy usage
annotate code with activity labels
ltPowerStateTrackgt, ltSingleActivityTrackgt,
ltMultiActivityTrackgt, ltEnergyMetergt
Operating System
propagate labels to/from devices
propagate labels over deferred computations
scheduler
interrupts
arbiters
timers
queues
ltPowerStategt, ltSingleActivitygt, ltMultiActivitygt
Device Drivers
save/restore/expose activity
monitor/expose power states
Hardware
Energy Meter
45
Our solution to this problem
  • Energy profile by
  • Subsystem
  • Activity
  • Time

call CPUActivity.set(ACT_SENSING)
Application
ltPowerStateTrackgt, ltSingleActivityTrackgt,
ltMultiActivityTrackgt, ltEnergyMetergt
Operating System
ltPowerStategt, ltSingleActivitygt, ltMultiActivitygt
Device Drivers
Hardware
Energy Meter
46
How much time (or energy) does using DMA save?
47
Blink A toy example
  • module BlinkC ()
  • uses interface TimerltTMilligt as Timer0
  • uses interface TimerltTMilligt as Timer1
  • uses interface TimerltTMilligt as Timer2
  • uses interface Leds
  • uses interface Boot
  • Implementation
  • event void Boot.booted()
  • call Timer0.startPeriodic(250)
  • call Timer1.startPeriodic(500)
  • call Timer2.startPeriodic(1000)
  • event void Timer0.fired()
  • module BlinkC ()
  • uses interface TimerltTMilligt as Timer0
  • uses interface TimerltTMilligt as Timer1
  • uses interface TimerltTMilligt as Timer2
  • uses interface Leds
  • uses interface Boot
  • Implementation
  • event void Boot.booted()
  • call CPUActivity.set(ACT_LED0)
  • call Timer0.startPeriodic(250)
  • call CPUActivity.set(ACT_LED1)
  • call Timer1.startPeriodic(500)
  • call CPUActivity.set(ACT_LED2)
  • call Timer2.startPeriodic(1000)
  • event void Timer0.fired()

48
Is hardware energy metering really needed?
Write a Comment
User Comments (0)
About PowerShow.com