eeng 449bg/cpsc 439bg computer systems lecture 6 overview of power issues in computing systems

42
EENG449b/Savvides Lec 6.1 1/29/04 January 29, 2004 Prof. Andreas Savvides Spring 2004 http://www.eng.yale.edu/courses/ eeng449bG EENG 449bG/CPSC 439bG Computer Systems Lecture 6 Overview of Power Issues in Computing Systems

Upload: stanislaw-aurek

Post on 03-Jan-2016

45 views

Category:

Documents


1 download

DESCRIPTION

EENG 449bG/CPSC 439bG Computer Systems Lecture 6 Overview of Power Issues in Computing Systems. January 29, 2004 Prof. Andreas Savvides Spring 2004 http://www.eng.yale.edu/courses/eeng449bG. Announcements. Reading for this lecture - PowerPoint PPT Presentation

TRANSCRIPT

Page 1: EENG 449bG/CPSC 439bG  Computer Systems Lecture 6  Overview of Power Issues in Computing Systems

EENG449b/SavvidesLec 6.1

1/29/04

January 29, 2004

Prof. Andreas Savvides

Spring 2004

http://www.eng.yale.edu/courses/eeng449bG

EENG 449bG/CPSC 439bG Computer Systems

Lecture 6

Overview of Power Issues in Computing Systems

Page 2: EENG 449bG/CPSC 439bG  Computer Systems Lecture 6  Overview of Power Issues in Computing Systems

EENG449b/SavvidesLec 6.2

1/29/04

Announcements

• Reading for this lecture– J. Pouwese, K. Lagendoen, H. Sips, “Dynamic Voltage

Scaling on a Low Power Microprocessor”, posted on the class website

• Embedded Processor Programming Reading– “Get By without an RTOS” – by Melkonian – link posted

on class website

• Project descriptions due tomorrow– Email: [email protected]

• Microcontroller workshop tomorrow in AKW000. I recommend you attend at least 1 of these according to your project needs

– 1:00 – 2:00pm ARM/THUMB programming and tools– 2:00 – 2:15pm Break– 2:15 – 3:15pm Mote programming & tools

Page 3: EENG 449bG/CPSC 439bG  Computer Systems Lecture 6  Overview of Power Issues in Computing Systems

EENG449b/SavvidesLec 6.3

1/29/04

Why worry about power?Intel vs. Duracell

• No Moore’s Law in batteries: 2-3%/year growth

Processor (MIPS)

Hard Disk (capacity)

Memory (capacity)

Battery (energy stored)

0 1 2 3 4 5 6

16x

14x

12x

10x

8x

6x

4x

2x1x

Improvement(compared to year 0)

Time (years)

Page 4: EENG 449bG/CPSC 439bG  Computer Systems Lecture 6  Overview of Power Issues in Computing Systems

EENG449b/SavvidesLec 6.4

1/29/04

Current Battery Technology is Inadequate

• Example: 20-watt battery» NiCd weighs 0.5 kg, lasts 1 hr, and costs $20» Comparable Li-Ion lasts 3 hrs, but costs > 4x

more

Battery Rechargeable? Wh/lb Wh/litreAlkaline MnO2 NO 65.8 347Silver Oxide NO 60 500Li/MnO2 NO 105 550Zinc Air NO 140 1150NiCd YES 23 125Li-Polymer YES 65-90 300-415

Page 5: EENG 449bG/CPSC 439bG  Computer Systems Lecture 6  Overview of Power Issues in Computing Systems

EENG449b/SavvidesLec 6.5

1/29/04

Comparison of Energy Sources

Power (Energy) Density Source of Estimates

Batteries (Zinc-Air) 1050 -1560 mWh/cm3 (1.4 V) Published data from manufacturers

Batteries(Lithium ion) 300 mWh/cm3 (3 - 4 V) Published data from manufacturers

Solar (Outdoors)

15 mW/cm2 - direct sun

0.15mW/cm2 - cloudy day. Published data and testing.

Solar (Indoor)

.006 mW/cm2 - my desk

0.57 mW/cm2 - 12 in. under a 60W bulb Testing

Vibrations 0.001 - 0.1 mW/cm3 Simulations and Testing

Acoustic Noise

3E-6 mW/cm2 at 75 Db sound level

9.6E-4 mW/cm2 at 100 Db sound level Direct Calculations from Acoustic TheoryPassive Human

Powered 1.8 mW (Shoe inserts >> 1 cm2) Published Study.

Thermal Conversion 0.0018 mW - 10 deg. C gradient Published Study.

Nuclear Reaction

80 mW/cm3

1E6 mWh/cm3 Published Data.

Fuel Cells

300 - 500 mW/cm3

~4000 mWh/cm3 Published Data.

Assume 1mW Average as definition of “Scavenged Energy”

Page 6: EENG 449bG/CPSC 439bG  Computer Systems Lecture 6  Overview of Power Issues in Computing Systems

EENG449b/SavvidesLec 6.6

1/29/04

Trends in Total Power Consumption

• Frightening: proportional to area & frequency

DEC 21164

source : arpa-esto

microprocessorpower dissipation

Page 7: EENG 449bG/CPSC 439bG  Computer Systems Lecture 6  Overview of Power Issues in Computing Systems

EENG449b/SavvidesLec 6.7

1/29/04

Power Metrics in Microprocessors

nJ/Instruction – Mostly for processors with the same instruction

sets– Does not capture the effect of operand size (e.g

8-bit addition vs. 32-bit addition operations

MIPS/Watt

mA – common among component data sheets

Remember:

2CV21

les)Energy(Jou

time Power (Joules) Energy

IV (Watts)Power

Page 8: EENG 449bG/CPSC 439bG  Computer Systems Lecture 6  Overview of Power Issues in Computing Systems

EENG449b/SavvidesLec 6.8

1/29/04

Modeling the Battery Behavior

• Theoretical capacity of battery is decided by the amount of the active material in the cell

» batteries often modeled as buckets of constant energy – e.g. halving the power by halving the clock frequency is

assumed to double the computation time while maintaining constant computation per battery life

• In reality, delivered or nominal capacity depends on how the battery is discharged

» discharge rate (load current)» discharge profile and duty cycle» operating voltage and power level drained

Page 9: EENG 449bG/CPSC 439bG  Computer Systems Lecture 6  Overview of Power Issues in Computing Systems

EENG449b/SavvidesLec 6.9

1/29/04

Battery Capacity

• Current in “C” rating: load current nomralized to battery’s capacity

» e.g. a discharge current of 1C for a capacity of 500 mA-hrs is 500 mA

from [Powers95]

Page 10: EENG 449bG/CPSC 439bG  Computer Systems Lecture 6  Overview of Power Issues in Computing Systems

EENG449b/SavvidesLec 6.10

1/29/04

Battery Capacity vs. Discharge Current

• Amount of energy delivered is decreased as the current (rate at which power is drawn) is increased

» rated as ampere hours or watt hours when discharged at a specific rate to a specific cut-off voltage

– primary cells rated at a current which is 1/100th of the capacity in ampere hours (C/100)

– secondary cells are rated at C/20 or C/10

• At high currents, the diffusion process that moves new active material from electrolytes to the electrode cannot keep up

» concentration of active material at cathode drops to zero, and cell voltage goes down below cut-off

» even though active material in cell is not exhausted!

Page 11: EENG 449bG/CPSC 439bG  Computer Systems Lecture 6  Overview of Power Issues in Computing Systems

EENG449b/SavvidesLec 6.11

1/29/04

Battery Energy Consumers

Page 12: EENG 449bG/CPSC 439bG  Computer Systems Lecture 6  Overview of Power Issues in Computing Systems

EENG449b/SavvidesLec 6.12

1/29/04

An Example Wireless Platform

Task 2

Delta Q

Task 1

TimerInterrupt

Expired Event Q

TimerTask

Handler 1

Handler 2

Handler 3

PALOSCore

PALOS

ARM/THUMB 40MHzRunning uCos-ii

RS-485 &External Power

MCU I/FHost Computer, GPS, etc

ADXL 202EMEMS Accelerometer

UI: Pushbuttons

Medusa MK-2

Page 13: EENG 449bG/CPSC 439bG  Computer Systems Lecture 6  Overview of Power Issues in Computing Systems

EENG449b/SavvidesLec 6.13

1/29/04

Power Supply

Where does the Power Go?B

atte

ry

DC-DCConverter

Communication

RadioModem

RFTransceiver

Processing

ProgrammablePs & DSPs

(apps, protocols etc.) Memory

ASICs

Peripherals

Disk Display

Page 14: EENG 449bG/CPSC 439bG  Computer Systems Lecture 6  Overview of Power Issues in Computing Systems

EENG449b/SavvidesLec 6.14

1/29/04

Power Consumption for a Computer with Wireless NIC

Display36%

Wireless LAN18%

Hard Drive18%

CPU/Memory21%

Other7%

Page 15: EENG 449bG/CPSC 439bG  Computer Systems Lecture 6  Overview of Power Issues in Computing Systems

EENG449b/SavvidesLec 6.15

1/29/04

Energy Consumption ofWireless NICs (Wavelan)

Specs Measured

2 Mbps(Bronze)

Sleep ModeIdle ModeReceive ModeTransmit Mode

9 mA--------280 mA330 mA

14 mA178 mA 200 mA280 mA

11 Mbps (Silver)

Sleep ModeIdle ModeReceive ModeTransmit Mode

10 mA--------180 mA280 mA

10 mA156 mA190 mA284 mA

Page 16: EENG 449bG/CPSC 439bG  Computer Systems Lecture 6  Overview of Power Issues in Computing Systems

EENG449b/SavvidesLec 6.16

1/29/04

Example: Power Consumption for Compaq’s iPAQ

206MHz StrongArm SA-1110 processor

320x240 resolution color TFT LCD

Touch screen

32MB SDRAM / 16MB Flash memory

USB/RS-232/IrDA connection

Speaker/Microphone

Lithium Polymer battery

PCMCIA card expansion pack & CF card expansion pack

* Note

CPU is idle state of most of its time

Audio, IrDA, RS232 power is measured when each part is idling

Etc includes CPU, flash memory, touch screen and all other devices

Frontlight brightness was 16

Page 17: EENG 449bG/CPSC 439bG  Computer Systems Lecture 6  Overview of Power Issues in Computing Systems

EENG449b/SavvidesLec 6.17

1/29/04

Microprocessor Power Consumption

CMOS Circuits(Used in most microprocessors)

Dynamic ComponentDigital circuit switching inside

the processor

Static ComponentBias and leakage currents

O(1mW)

clk2

ddlddscddleakageddstandby fVCVIVIVIP

Static Dynamic

Page 18: EENG 449bG/CPSC 439bG  Computer Systems Lecture 6  Overview of Power Issues in Computing Systems

EENG449b/SavvidesLec 6.18

1/29/04

Power Consumption in Digital CMOS Circuits

clk2

ddlddscddleakageddstandby fVCVIVIVIPower

standbyI

leakageI

scI

- current constantly drawn from the power supply

- determined by fabrication technology

- short circuit current due to the DC path between the supply rails during output transitions

lC - load capacitance at the output node

clkf - clock frequencyddV - power supply voltage

Page 19: EENG 449bG/CPSC 439bG  Computer Systems Lecture 6  Overview of Power Issues in Computing Systems

EENG449b/SavvidesLec 6.19

1/29/04

DVS on Low Power Processor

Maximum gain when voltage is lowered BUT lower voltage increases circuit delay

M

1k

2ddk VfCP

2TDD

DD

)V(VV

τ

CMOS transistor threshold voltageTransistor gain factor

Dynamic Power Component

Number of gates

Load capacitance of gate k

Propagation delay

Page 20: EENG 449bG/CPSC 439bG  Computer Systems Lecture 6  Overview of Power Issues in Computing Systems

EENG449b/SavvidesLec 6.20

1/29/04

Voltage Scaling on LART

• Dynamically lower the processor voltage and frequency to reduce power consumption

• LART wearable board– StorngARM 1100 Processor 190MHz– Various I/O capabilities– 32 MB volatile memory– 4 MB non-volatile memory– Programmable voltage regulator

Page 21: EENG 449bG/CPSC 439bG  Computer Systems Lecture 6  Overview of Power Issues in Computing Systems

EENG449b/SavvidesLec 6.21

1/29/04

Processor Envelope

Page 22: EENG 449bG/CPSC 439bG  Computer Systems Lecture 6  Overview of Power Issues in Computing Systems

EENG449b/SavvidesLec 6.22

1/29/04

LART Power Measurement

• Note the measurement setup at Different levels on the board • Always provide hooks for measurement, testing and debugging during your design. Both for software and hardware!!!

Total Power Consumption on the LARTPlatform

Based on dhrystone benchmark

Page 23: EENG 449bG/CPSC 439bG  Computer Systems Lecture 6  Overview of Power Issues in Computing Systems

EENG449b/SavvidesLec 6.23

1/29/04

Memory Subsystem Power Consumption – Read Operation

Power consumption Memory Bandwidth

Optimal memory access waveforms

Page 24: EENG 449bG/CPSC 439bG  Computer Systems Lecture 6  Overview of Power Issues in Computing Systems

EENG449b/SavvidesLec 6.24

1/29/04

Energy breakdown for read(based on 1MB read)

Regulator Loss-factor

Page 25: EENG 449bG/CPSC 439bG  Computer Systems Lecture 6  Overview of Power Issues in Computing Systems

EENG449b/SavvidesLec 6.25

1/29/04

Power Breakdown for H.263 Decoder

Page 26: EENG 449bG/CPSC 439bG  Computer Systems Lecture 6  Overview of Power Issues in Computing Systems

EENG449b/SavvidesLec 6.26

1/29/04

Reducing Power Consumptionis a multilevel task!

• Physical layer – Technology – reduce the surface of CMOS circuits

• Architecture/IC level– Several optimizations in the design (e.g parallelism and

pipelining)– Provide hooks for software driven power management (e.g

different power modes and clock speeds)

• OS Level– Smart schedulers, interval schedulers, DVS

• Application Level– Power aware applications that worn the OS and the

hardware about the features needed during application lifetime

– Sleep modes and DVS driven by applications

• Network Level– Networked devices may be able to apply low duty cycles, in

which some of the devices are asleep and others are awake

Page 27: EENG 449bG/CPSC 439bG  Computer Systems Lecture 6  Overview of Power Issues in Computing Systems

EENG449b/SavvidesLec 6.27

1/29/04

Conclusions

• Interval based schedulers not so efficient– Interval-scheduler – reduce voltage after a pre-

specified idle period is detected

• Better leverage of DVS when the processor is aware of the application requirements

– Illustrated with the H.263 encoder

• Monitor different power consumption profiles across different sections of the platform and use them to make clever decisions about power-management

• What is missing:– Comments on power regulator efficiencies…

Page 28: EENG 449bG/CPSC 439bG  Computer Systems Lecture 6  Overview of Power Issues in Computing Systems

EENG449b/SavvidesLec 6.28

1/29/04

How can power consumption be reduced at the circuit design level

inside a processor?

Page 29: EENG 449bG/CPSC 439bG  Computer Systems Lecture 6  Overview of Power Issues in Computing Systems

EENG449b/SavvidesLec 6.29

1/29/04

Example: Reference Datapath

from “Digital Integrated Circuits” by Rabaey

Critical path delay: Tadder + Tcomparator = 25 ns Frequency: fref = 40 MHz Total switched capacitance = Cref

Vdd = Vref = 5V Power for reference datapath = Pref = CrefVref

2fref

Page 30: EENG 449bG/CPSC 439bG  Computer Systems Lecture 6  Overview of Power Issues in Computing Systems

EENG449b/SavvidesLec 6.30

1/29/04

Parallel Datapath

from “Digital Integrated Circuits” by Rabaey

The clock rate can be reduced by x2 with the same throughput: fpar = fref/2 = 20 MHz Total switched capacitance = Cpar = 2.15Cref

Vpar = Vref/1.7 Ppar = (2.15Cref)(Vref/1.7)2(fref /2) = 0.36Pref

Page 31: EENG 449bG/CPSC 439bG  Computer Systems Lecture 6  Overview of Power Issues in Computing Systems

EENG449b/SavvidesLec 6.31

1/29/04

Pipelined Datapath

from “Digital Integrated Circuits” by Rabaey

fpipe = fref

Cpipe = 1.1Cref

Vpipe = Vref/1.7 Voltage can be dropped while maintaining the original throughput Pipe = CpipeVpipe2fpipe = (1.1Cref)(Vref/1.7)2fref = 0.37Pref

Page 32: EENG 449bG/CPSC 439bG  Computer Systems Lecture 6  Overview of Power Issues in Computing Systems

EENG449b/SavvidesLec 6.32

1/29/04

Datapath Architecture-Power Trade-off Summary

DatapathArchitecture

Voltage Area Power

Original 5V 1 1Pipelined 2.9V 1.3 0.37Parallel 2.9V 3.4 0.34Pipeline-Parallel

2.0V 3.7 0.18

Page 33: EENG 449bG/CPSC 439bG  Computer Systems Lecture 6  Overview of Power Issues in Computing Systems

EENG449b/SavvidesLec 6.33

1/29/04

Power Consumption on Embedded Processors

• Different core I/O from Peripheral I/O – numbers here

– Cores scaling down to 0.8V. 1.8V devices are becoming common

– General Purpose I/O interfaces still at 3.0 – 3.3V» Makes power supply harder, additional

regulator inefficiency

• Sleep modes and associate cost of sleep and recovery SA-1100 modes

– Need time and energy to transition between states

Page 34: EENG 449bG/CPSC 439bG  Computer Systems Lecture 6  Overview of Power Issues in Computing Systems

EENG449b/SavvidesLec 6.34

1/29/04

Example: SA-1100 CPU

• RUN• IDLE

– CPU stopped when not in use

– Monitoring for interrupts

• SLEEP– Shutdown on-chip

activity

RUN

IDLE SLEEP

400 mW

50 mW 0.16 mW

90 s

10 s 10 s 90 s

160 ms

Page 35: EENG 449bG/CPSC 439bG  Computer Systems Lecture 6  Overview of Power Issues in Computing Systems

EENG449b/SavvidesLec 6.35

1/29/04

Low-power Software

• Wireless industry Constantly evolving standards

• Systems have to be flexible and adaptable– Significant portion of system functionality is

implemented as software running on a programmable processor

• Software drives the underlying hardware– Hence, it can significantly impact system power

consumption

• Significant energy savings can be obtained by clever software design.

Page 36: EENG 449bG/CPSC 439bG  Computer Systems Lecture 6  Overview of Power Issues in Computing Systems

EENG449b/SavvidesLec 6.36

1/29/04

Low-power Software Strategies

• Code running on CPU– Code optimizations for low power

• Code accessing memory objects– SW optimizations for memory

• Data flowing on the buses– I/O coding for low power

• Compiler controlled power management

CPU

Cache

Memory

Page 37: EENG 449bG/CPSC 439bG  Computer Systems Lecture 6  Overview of Power Issues in Computing Systems

EENG449b/SavvidesLec 6.37

1/29/04

Code Optimizations for Low Power

• High-level operations (e.g. C statement) can be compiled into different instruction sequences

» different instructions & ordering have different power

• Instruction Selection– Select a minimum-power instruction mix for executing a piece

of high level code

• Instruction Packing & Dual Memory Loads– Two on-chip memory banks

» Dual load vs. two single loads» Almost 50% energy savings

Page 38: EENG 449bG/CPSC 439bG  Computer Systems Lecture 6  Overview of Power Issues in Computing Systems

EENG449b/SavvidesLec 6.38

1/29/04

Code Optimizations for Low Power (contd.)

• Reorder instructions to reduce switching effect at functional units and I/O buses

– E.g. Cold scheduling minimizes instruction bus transitions

• Operand swapping– Swap the operands at the input of multiplier– Result is unaltered, but power changes significantly!

• Other standard compiler optimizations– Intermediate level: Software pipelining, dead code elimination,

redundancy elimination– Low level: Register allocation and other machine specific optimizations

• Use processor-specific instruction styles– e.g. on ARM the default int type is ~ 20% more efficient than char or

short as the latter result in sign or zero extension– e.g. on ARM the conditional instructions can be used instead of

branches

Page 39: EENG 449bG/CPSC 439bG  Computer Systems Lecture 6  Overview of Power Issues in Computing Systems

EENG449b/SavvidesLec 6.39

1/29/04

Minimizing Memory Access Costs

• Reduce memory access, make better use of registers– Register access consumes power << than memory access

• Straightforward way: minimize number of read-write operations, e.g.

• Cache optimizations– Reorder memory accesses to improve cache hit rates

• Can use existing techniques for high-performance code generation

Page 40: EENG 449bG/CPSC 439bG  Computer Systems Lecture 6  Overview of Power Issues in Computing Systems

EENG449b/SavvidesLec 6.40

1/29/04

Minimizing Memory Access Costs (contd.)

• Loop optimizations such as loop unrolling, loop fusion also reduce memory power consumption

• More effective: explicitly target minimization of switching activity on I/O busses and exploiting memory hierarchy– Data allocation to minimize I/O bus transitions

» e.g. mapping large arrays with known access patterns to main memory to minimize address bus transitions

» works in conjunction with coding of address busses– Exploiting memory hierarchy

» e.g. organizing video and DSP data to maximize the higher levels (lower power) of memory hierarchy

Page 41: EENG 449bG/CPSC 439bG  Computer Systems Lecture 6  Overview of Power Issues in Computing Systems

EENG449b/SavvidesLec 6.41

1/29/04

Computation & Communication

• Energy/bit Energy/op large even for short ranges!

Transmit 720 nJ/bit Processor 4 nJ/op

Receive 110 nJ/bit ~ 200 ops/bit

Mote-class Node

WINS-class Node Transmit 6600 nJ/bit Processor 1.6 nJ/op

Receive 3300 nJ/bit ~ 6000 ops/bit

TransmitReceive

Encode Decode Transmit

Receive

EncodeDecode

Energy breakdown for acoustic Energy breakdown for image

Page 42: EENG 449bG/CPSC 439bG  Computer Systems Lecture 6  Overview of Power Issues in Computing Systems

EENG449b/SavvidesLec 6.42

1/29/04

Next time

• ARM/THUMB Programming & Peripherals

• Embedded Operating Systems• Don’t forget tomorrow’s workshop!

– 1:00pm AKW 000