t-110.5111 computer networks ii green ict - aalto … · t-110.5111 computer networks ii green ict...

72
T-110.5111 Computer Networks II Green ICT 10.10.2011 Matti Siekkinen External sources: • Y. Xiao: Green communications. T-110.5116 lecture. Aalto. 2010.

Upload: trinhtuyen

Post on 13-Aug-2018

214 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: T-110.5111 Computer Networks II Green ICT - Aalto … · T-110.5111 Computer Networks II Green ICT 10.10.2011 Matti Siekkinen External sources: • Y. Xiao: Green communications

T-110.5111 Computer Networks II Green ICT

10.10.2011

Matti Siekkinen

External sources:

•  Y. Xiao: Green communications. T-110.5116 lecture. Aalto. 2010. • 

Page 2: T-110.5111 Computer Networks II Green ICT - Aalto … · T-110.5111 Computer Networks II Green ICT 10.10.2011 Matti Siekkinen External sources: • Y. Xiao: Green communications

October 10, 11

Outline

 Motivation   What’s Green ICT?   Why is it a hot topic?

 Measuring energy  Modeling energy consumption  Means to save energy

Page 3: T-110.5111 Computer Networks II Green ICT - Aalto … · T-110.5111 Computer Networks II Green ICT 10.10.2011 Matti Siekkinen External sources: • Y. Xiao: Green communications

October 10, 11

Which one is Green ICT?

Source: Google image

Page 4: T-110.5111 Computer Networks II Green ICT - Aalto … · T-110.5111 Computer Networks II Green ICT 10.10.2011 Matti Siekkinen External sources: • Y. Xiao: Green communications

October 10, 11

What is Green ICT?

 Green ICT   Reduce energy consumption of ICT

 What’s involved?   Networked Equipment

o  PCs, mobile phones, data centers, set-top boxes,...   Network Equipment (infrastructure)

o  Routers, switches, wireless access points, …

Page 5: T-110.5111 Computer Networks II Green ICT - Aalto … · T-110.5111 Computer Networks II Green ICT 10.10.2011 Matti Siekkinen External sources: • Y. Xiao: Green communications

October 10, 11

Why we give a damn

 ICT energy consumption   About 12% of global power consumption   60billion KWh wasted by inefficient computing every year   Telecom data volume increases approximately by a factor of

10 every 5 years, which corresponds to an increase of the associated energy consumption of 16-20% every year

 CO2   At least 2% of global CO2 emission   As much as airplanes, and ¼ of cars

 €€¥££   Data center and network operators   Large part of operation costs

Page 6: T-110.5111 Computer Networks II Green ICT - Aalto … · T-110.5111 Computer Networks II Green ICT 10.10.2011 Matti Siekkinen External sources: • Y. Xiao: Green communications

October 10, 11

Why we also give a damn

 Energy constrained devices   Smart phones

o  Need to recharge more and more often   Sensors and sensor networks

o  Don’t want to or cannot change batteries often  Quality of service or availability issue

  Not really a question of €$£¥   Not so much a ”greenness” issue either

o  Although scale is very large...  We focus today mostly on these issues

  Also our main research focus

Page 7: T-110.5111 Computer Networks II Green ICT - Aalto … · T-110.5111 Computer Networks II Green ICT 10.10.2011 Matti Siekkinen External sources: • Y. Xiao: Green communications

October 10, 11

Some questions worth asking

 How much energy does it cost when you make a phone call, watch YouTube, send an email, or…?   End-to-end

 How much energy is consumed on a network/networked equipment?   In different scenarios   With different workloads

 How much can we reasonably save?   … in network equipment?   ... in networked equipment?   …in different scenarios?   … for different services?   How to do it?

7

Page 8: T-110.5111 Computer Networks II Green ICT - Aalto … · T-110.5111 Computer Networks II Green ICT 10.10.2011 Matti Siekkinen External sources: • Y. Xiao: Green communications

October 10, 11

Outline

 Motivation   What’s Green ICT?   Why is it a hot topic?

 Measuring energy  Modeling energy consumption  Means to save energy

Page 9: T-110.5111 Computer Networks II Green ICT - Aalto … · T-110.5111 Computer Networks II Green ICT 10.10.2011 Matti Siekkinen External sources: • Y. Xiao: Green communications

October 10, 11

Power measurement

 System-level power measurement Measure the total power consumption of the whole mobile phone.

 Component-level power measurement

9

Page 10: T-110.5111 Computer Networks II Green ICT - Aalto … · T-110.5111 Computer Networks II Green ICT 10.10.2011 Matti Siekkinen External sources: • Y. Xiao: Green communications

October 10, 11

Measuring with software

10

 Simplest way to measure  Nokia Energy Profiler

  Easy to use   Sampling frequency is low (4Hz)   Get accurate information about, e.g.

voltage(V), current(Am) o  Measured error just a few % in

active cases, more for low power cases (idle)

  Only for Symbian

Page 11: T-110.5111 Computer Networks II Green ICT - Aalto … · T-110.5111 Computer Networks II Green ICT 10.10.2011 Matti Siekkinen External sources: • Y. Xiao: Green communications

October 10, 11

Measuring with software (cont.)

 PowerTutor   A power monitor for Android-based

mobile platforms   Uses models to estimate power

consumption o  Accuracy may vary depending on

usage (check their paper for details) http://ziyang.eecs.umich.edu/projects/powertutor/

11

Page 12: T-110.5111 Computer Networks II Green ICT - Aalto … · T-110.5111 Computer Networks II Green ICT 10.10.2011 Matti Siekkinen External sources: • Y. Xiao: Green communications

October 10, 11

Glance at the power consumption

12

(5,2.249)

(10,1.281)

(113,1.494)

(211,2.516)

0.000

0.500

1.000

1.500

2.000

2.500

3.000

1

5

10

15

20

25

30

35

40

45

50

55

60

65

70

75

80

85

90

95

100

10

5

110

11

5

120

12

5

130

13

5

140

14

5

150

15

5

160

16

5

170

17

5

180

18

5

190

19

5

200

20

5

210

21

5

220

22

5

230

23

5

240

24

3

245

24

9

Pow

er(W

att)

Time(second)

WLAN WCDMA

Watching YouTube from N95

Page 13: T-110.5111 Computer Networks II Green ICT - Aalto … · T-110.5111 Computer Networks II Green ICT 10.10.2011 Matti Siekkinen External sources: • Y. Xiao: Green communications

October 10, 11

Using external instruments

13

Page 14: T-110.5111 Computer Networks II Green ICT - Aalto … · T-110.5111 Computer Networks II Green ICT 10.10.2011 Matti Siekkinen External sources: • Y. Xiao: Green communications

October 10, 11

Power measurement

 System-level power measurement Measure the total power consumption of the whole mobile phone.

 Component-level power measurement Example: Given a mobile phone, measure the power consumption of each CPU, network interface, and display separately.

14

Page 15: T-110.5111 Computer Networks II Green ICT - Aalto … · T-110.5111 Computer Networks II Green ICT 10.10.2011 Matti Siekkinen External sources: • Y. Xiao: Green communications

October 10, 11

Component-level power measurement

 Requires information about power distribution network at the circuit level

 Only a few off-the-shelf devices can be measured on component-level   e.g. Openmoko Neo Freerunner   See: Aaron Carroll and Gernot Heiser. An analysis

of power consumption in a smartphone. In Proceedings of the USENIXATC 2010.

15

Page 16: T-110.5111 Computer Networks II Green ICT - Aalto … · T-110.5111 Computer Networks II Green ICT 10.10.2011 Matti Siekkinen External sources: • Y. Xiao: Green communications

October 10, 11

Outline

 Motivation   What’s Green ICT?   Why is it a hot topic?

 Measuring energy  Modeling energy consumption  Means to save energy

Page 17: T-110.5111 Computer Networks II Green ICT - Aalto … · T-110.5111 Computer Networks II Green ICT 10.10.2011 Matti Siekkinen External sources: • Y. Xiao: Green communications

October 10, 11

Where does the energy go?

 Hardware consumes the energy

 Amount of energy consumed depends on   Hardware physical

characteristics   Hardware operating mode   Workload generated by

software running on top of hardware

17

Page 18: T-110.5111 Computer Networks II Green ICT - Aalto … · T-110.5111 Computer Networks II Green ICT 10.10.2011 Matti Siekkinen External sources: • Y. Xiao: Green communications

October 10, 11

Power modeling

 Allows to estimate energy/power consumption even when direct measurement is impossible   Impractical: external instruments usable only in lab

settings   Software not available

 Why interesting?   Understand and improve energy consumption behavior of

existing protocols and services o  Also in setups which aren’t possible in a lab o  Help redesign for better energy efficiency

  Develop energy-aware protocols and applications o  Run-time estimation of energy consumption o  E.g., choose energy efficient paths, peers, servers

18

Page 19: T-110.5111 Computer Networks II Green ICT - Aalto … · T-110.5111 Computer Networks II Green ICT 10.10.2011 Matti Siekkinen External sources: • Y. Xiao: Green communications

October 10, 11

Power modeling (cont.)

 Power models describe   Transmission cost, computational cost, cooling cost, …   Power consumption of each hardware component or

software component   Power consumption of a service

 Methodology   Deterministic modeling   Statistical modeling

Power measurement is needed for both methods.

19

Page 20: T-110.5111 Computer Networks II Green ICT - Aalto … · T-110.5111 Computer Networks II Green ICT 10.10.2011 Matti Siekkinen External sources: • Y. Xiao: Green communications

October 10, 11

Example: transmission energy

 Which one consumes less energy?   3G or WLAN?   2G or 3G?   N900 or iPhone?   P2P or C/S?   ...

 Not an easy question to answer...

20

Page 21: T-110.5111 Computer Networks II Green ICT - Aalto … · T-110.5111 Computer Networks II Green ICT 10.10.2011 Matti Siekkinen External sources: • Y. Xiao: Green communications

October 10, 11

Theoretical analysis

Two metrics  How many Joules are needed for transmitting or

receiving one Bit?   Not constant   Depends on how you send or receive the data   Depends on how you control the operating mode of the

network interface  How many Bits do you need to transmit or receive?

  In bad network conditions, you also need to consider the power consumed by data retransmission

21

Page 22: T-110.5111 Computer Networks II Green ICT - Aalto … · T-110.5111 Computer Networks II Green ICT 10.10.2011 Matti Siekkinen External sources: • Y. Xiao: Green communications

October 10, 11

Wi-Fi vs. 3G

SLEEP

TRANSMIT

IDLE

RECEIVE PSM

Timeout

Page 23: T-110.5111 Computer Networks II Green ICT - Aalto … · T-110.5111 Computer Networks II Green ICT 10.10.2011 Matti Siekkinen External sources: • Y. Xiao: Green communications

October 10, 11

Case study 1: Deterministic modeling

Power modeling of data transmission over 802.11g

  Xiao, Y., Savolainen, P., Karppanen, A., Siekkinen, M., and Ylä-Jääski, A. Practical power modeling of data transmission over 802.11g for wireless applications. In Proceedings of the e-Energy 2010.

23

Page 24: T-110.5111 Computer Networks II Green ICT - Aalto … · T-110.5111 Computer Networks II Green ICT 10.10.2011 Matti Siekkinen External sources: • Y. Xiao: Green communications

October 10, 11

Power consumption of 802.11 wireless network interface (WNI)

 Power consumption depends on operating mode Energy = Power(operating mode)* Duration(operating mode)

24

Continuously Active Mode (CAM)

Power Saving Mode(PSM)

IDLE

TRANSMIT RECEIVE

SLEEP PS

TRANSMIT PT

IDLE PI

RECEIVE PR

PSM Timeout

Tsleep = TI - Ttimeout

Page 25: T-110.5111 Computer Networks II Green ICT - Aalto … · T-110.5111 Computer Networks II Green ICT 10.10.2011 Matti Siekkinen External sources: • Y. Xiao: Green communications

October 10, 11

WNI operating modes and power

 Order of magnitude less power drawn in sleep state

WNI operating mode Average Power (W)

Nokia N810 HTC G1 Nokia N95

IDLE 0.884 0.650 1.038

SLEEP 0.042 0.068 0.088

TRANSMIT 1.258 1.097 1.687

RECEIVE 1.181 0.900 1.585

Page 26: T-110.5111 Computer Networks II Green ICT - Aalto … · T-110.5111 Computer Networks II Green ICT 10.10.2011 Matti Siekkinen External sources: • Y. Xiao: Green communications

October 10, 11

Operating modes and traffic patterns

 Problem: No common open API for querying the current operating mode

 Idea: Estimate the operating modes & durations from observed traffic patterns   Take into account 802.11 Power Saving Mode(PSM)

Figure: I/O graph of YouTube traffic (Byte/tick)

Page 27: T-110.5111 Computer Networks II Green ICT - Aalto … · T-110.5111 Computer Networks II Green ICT 10.10.2011 Matti Siekkinen External sources: • Y. Xiao: Green communications

October 10, 11

Per-burst computation

 Definitions   Burst: Pkt interval < t

o  t is a predefined threshold   Burst size SB   Bin rate r = SB/T = SB/(TB+TI)

27

Burst Duration TB

Burst Interval TI

Packet Interval

Page 28: T-110.5111 Computer Networks II Green ICT - Aalto … · T-110.5111 Computer Networks II Green ICT 10.10.2011 Matti Siekkinen External sources: • Y. Xiao: Green communications

October 10, 11

Taking PSM into account

 PSM timeout effect   When Tsleep = 0   Threshold bin rate rc = SB/ (TB+ Ttimeout)

 Scenario 1: {{r >= rc } and {PSM is enabled}} or {PSM is not enabled}   No time to sleep in between bursts   Alternate between Rx/Tx and idle

 Scenario 2: { r < rc } and {PSM is enabled}   Manage to enter sleep state in between bursts

28

Page 29: T-110.5111 Computer Networks II Green ICT - Aalto … · T-110.5111 Computer Networks II Green ICT 10.10.2011 Matti Siekkinen External sources: • Y. Xiao: Green communications

October 10, 11

Downlink Power Consumption

29

TB

TI

Power(W)

Ps

PI

PR

PT

SLEEP IDLE RECEIVE TRANSMIT

Energy(J): E = PRTB+ PITI

Power(W): Pd(r) = E/T

Energy Utility (b/J): E0(r) = r/Pd(r)

Page 30: T-110.5111 Computer Networks II Green ICT - Aalto … · T-110.5111 Computer Networks II Green ICT 10.10.2011 Matti Siekkinen External sources: • Y. Xiao: Green communications

October 10, 11

Downlink Power Consumption

  Scenario 1

E = PRTB+ PITI

Pd(r) = E/T = PI + r(PR – PI) TB/SB

  Scenario 2

E = PRTB+ PITtimeout + PSTsleep

Pd(r) = E/T =PS + r[(PR – PS) TB/SB+ (PI – PS) Ttimeout/SB]

Time

PR

PI

TB TB+ TI

Power

Time

PR

PI

TB TB+ TI

Power

TB+ TI+ Tsleep

Page 31: T-110.5111 Computer Networks II Green ICT - Aalto … · T-110.5111 Computer Networks II Green ICT 10.10.2011 Matti Siekkinen External sources: • Y. Xiao: Green communications

October 10, 11

TCP Power Consumption Downlink data rate rd Downlink burst size SB

Uplink data rate ru = nSACKrd/SB

Data rate threshold rc = SB/(Td+Tu+Ttimeout)

Scenario 1: P(rd)=Pd(rd)+Pu(ru)-PI= PI+[Td(PR-PI)+Tu(PT-PI)]rd/SB

Secenario 2: P(rd)=Pd(rd)+Pu(ru)-PS =PS+[Td(PR-PS)+Tu(PT-PS)+Ttimeout(PI-PS)]rd/SB

31

n ACKs

n packets

Td Tu

Page 32: T-110.5111 Computer Networks II Green ICT - Aalto … · T-110.5111 Computer Networks II Green ICT 10.10.2011 Matti Siekkinen External sources: • Y. Xiao: Green communications

October 10, 11

Validation

 Experimental Setup

32

Page 33: T-110.5111 Computer Networks II Green ICT - Aalto … · T-110.5111 Computer Networks II Green ICT 10.10.2011 Matti Siekkinen External sources: • Y. Xiao: Green communications

October 10, 11

Internet flow characteristics

33

Nokia N810

HTC G1 Nokia N95

Downlink burst size (KB) 4 4 4

Downlink burst duration (ms) 8 10 10 Uplink burst duration (ms) 0.5 0.5 0.35

Nokia N810

HTC G1 Nokia N95

Uplink burst size (KB) 4 4 4 Uplink burst duration (ms) 6 8 12 Downlink burst duration (ms) 0.1 0.1 0.2

0.0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1.0

0 30 60 90 120 150 180 210 240 270 300

Prob

abili

ty

Packet Interval (ms)

Page 34: T-110.5111 Computer Networks II Green ICT - Aalto … · T-110.5111 Computer Networks II Green ICT 10.10.2011 Matti Siekkinen External sources: • Y. Xiao: Green communications

October 10, 11

Nokia N810: power vs. throughput

34

0.0 0.2 0.4 0.6 0.8 1.0 1.2

0 32 64 96 128 160 192 224 256

Avg

Pow

er(W

)

Data rate limit(KB/s)

Download, CAM

Measured

Estimated 0.0 0.2 0.4 0.6 0.8 1.0 1.2

0 32 64 96 128 160 192 224 256

Avg

Pow

er(W

)

Data rate limit(KB/s)

Download, PSM

Measured

Estimated

0.0 0.2 0.4 0.6 0.8 1.0 1.2

0 32 64 96 128 160 192 224 256

Avg

Pow

er(W

)

Data rate limit(KB/s)

Upload, CAM

Measured Estimated 0.0

0.2 0.4 0.6 0.8 1.0 1.2

0 32 64 96 128 160 192 224 256

Avg

Pow

er(W

)

Data rate limit(KB/s)

Upload, PSM

Measured Estimated

Q: What’s this?

A: Effect of (adaptive, i.e. with a timeout) PSM: manage to catch sleep in between packets/bursts when rate is low enough

When rate ≥ 64KB/s, PSM has no effect!

Page 35: T-110.5111 Computer Networks II Green ICT - Aalto … · T-110.5111 Computer Networks II Green ICT 10.10.2011 Matti Siekkinen External sources: • Y. Xiao: Green communications

October 10, 11

N810: Energy utility

 How many bytes can be transferred per Joule spent  Linearly dependent on throughput

  PSM better with lower rates (almost double utility at 16KB/s)   -> should always transmit as fast as possible!

10/9/11

Page 36: T-110.5111 Computer Networks II Green ICT - Aalto … · T-110.5111 Computer Networks II Green ICT 10.10.2011 Matti Siekkinen External sources: • Y. Xiao: Green communications

October 10, 11

Accuracy and limitations Downloads: MAPE less than 7%

Uploads: MAPE less than 6%

0.0

0.2

0.4

0.6

0.8

1.0

0 0.05 0.1 0.15 0.2 0.25 0.3 0.35

F(M

APE

)

MAPE

0.0

0.2

0.4

0.6

0.8

1.0

0 0.1 0.2 0.3 0.4 0.5

F(M

APE

)

MAPE

 Also tried run time estimation   YouTube download through public

AP   MAPE about 11%

  Most likely due to additional e.g. broadcast traffic

 Limitations   Model does not “see” L2 traffic

o  Has an effect on power consumption

  Model does not separately consider computation caused by packet processing

o  Implicitly included in baseline measurements

Page 37: T-110.5111 Computer Networks II Green ICT - Aalto … · T-110.5111 Computer Networks II Green ICT 10.10.2011 Matti Siekkinen External sources: • Y. Xiao: Green communications

October 10, 11

Case study 2: statistical modeling

System-level power modeling on mobile devices

  Y. Xiao, R. Bhaumik, Z. Yang, M. Siekkinen, P. Savolainen, and A. Ylä-Jääski. A System-level Model for Runtime Power Estimation on Mobile Devices. In Proceedings of GreenCom 2010.

10/9/11

Page 38: T-110.5111 Computer Networks II Green ICT - Aalto … · T-110.5111 Computer Networks II Green ICT 10.10.2011 Matti Siekkinen External sources: • Y. Xiao: Green communications

October 10, 11

Overview

 A system-level power model   Include main components

o  Processors, wireless network interfaces, display   Build using system-level measurements

o  Difficult to measure components separately   Generic model

o  Not tied to specific application  Statistical modeling using linear regression

  Impossible to track exactly what happens e.g. within CPU

  Cannot apply deterministic method

38

Page 39: T-110.5111 Computer Networks II Green ICT - Aalto … · T-110.5111 Computer Networks II Green ICT 10.10.2011 Matti Siekkinen External sources: • Y. Xiao: Green communications

October 10, 11

Linear Regression with Nonnegative Coefficients

 Linear regression widely used for processor power modeling   Build a linear relationship between the p predictor

variables and power consumption based on n observations

  Need to train the model beforehand!  Hardware performance counters (HPC) as variables

  Set of special registers in modern CPUs   Counters about hardware-related activities   E.g. #cycles, cache activities

predictor variables

variable coefficients

preprocessing function

intercept

Page 40: T-110.5111 Computer Networks II Green ICT - Aalto … · T-110.5111 Computer Networks II Green ICT 10.10.2011 Matti Siekkinen External sources: • Y. Xiao: Green communications

October 10, 11

Linear Regression with Nonnegative Coefficients (cont.)

 Mobile devices can only monitor a subset of HPCs at a time   E.g., 3 out of 17 HPCs in Nokia N810   Solution: reduce the set of HPCs using nonnegative

coefficients constraint o  Coefficient indicates that variable’s contribution to power -> Select only three variables with highest coefficients o  Requires reasonable assumption: increasing activity (HPC

value) never implies reduction in power draw  Network and display also consume power

  Must include them into the model

Page 41: T-110.5111 Computer Networks II Green ICT - Aalto … · T-110.5111 Computer Networks II Green ICT 10.10.2011 Matti Siekkinen External sources: • Y. Xiao: Green communications

October 10, 11

Regression variables  Target: reflect resource consumption of a mobile

application  Local computing

  17 HPC-based event rates o  CPU activity, memory access

 Network I/O   Download data rate   Upload data rate   CAM switch

o  Effect of 802.11 power saving mechanism  Display

  Brightness level

Page 42: T-110.5111 Computer Networks II Green ICT - Aalto … · T-110.5111 Computer Networks II Green ICT 10.10.2011 Matti Siekkinen External sources: • Y. Xiao: Green communications

October 10, 11

Benchmarks and data collection  Collect data from test cases for model fitting and

evaluation  Goals:

  Stress all selected variables   Explore the space of their cross product

 Nokia Internet Tablet N810   Only 3 HPCs monitored at a time -> Need to run many iterations to cover all 17 HPCs

 Different categories of workloads:   Idle with different brightness levels   Audio/video players/recorders   File download/upload at different (limited) transfer rates   Audio/video streaming

Page 43: T-110.5111 Computer Networks II Green ICT - Aalto … · T-110.5111 Computer Networks II Green ICT 10.10.2011 Matti Siekkinen External sources: • Y. Xiao: Green communications

October 10, 11

Model fitting

 Model fitting with non-negative least squares:   Standard minimization problem   Matlab function lsqnonneg

Power(W ) = 0.7655 + 0.2474 × g0(x0) + 0.0815 × g1(x1)+ 0.0606 × g2(x2) + 0.0011× g17(x17)+ 0.0015 × g18(x18) + 0.3822 ×g19(x19)+ 0.125 × g20(x20).

CPU_CYCLES DCACHE_WB

TLB_MISS dl rate

ul rate CAM switch

brightness level

Page 44: T-110.5111 Computer Networks II Green ICT - Aalto … · T-110.5111 Computer Networks II Green ICT 10.10.2011 Matti Siekkinen External sources: • Y. Xiao: Green communications

October 10, 11

Model evaluation

  Evaluation based on similar data used for model fitting   But not the same!

 Similar (or even better) results with another independent data set   Different set of applications

44

4.8

2.0 3.7

0.2

13.7

3.8

0.8 0 2 4 6 8

10 12 14

Radio LiveTV YouTube Audio recorder

Video recorder

upload download

Median Error(%)

Page 45: T-110.5111 Computer Networks II Green ICT - Aalto … · T-110.5111 Computer Networks II Green ICT 10.10.2011 Matti Siekkinen External sources: • Y. Xiao: Green communications

October 10, 11

Outline

 Motivation   What’s Green ICT?   Why is it a hot topic?

 Measuring energy  Modeling energy consumption  Means to save energy

Page 46: T-110.5111 Computer Networks II Green ICT - Aalto … · T-110.5111 Computer Networks II Green ICT 10.10.2011 Matti Siekkinen External sources: • Y. Xiao: Green communications

October 10, 11

How to save energy?

 Can we just turn off unnecessary hardware?

 Can we reduce the Joule per Bit, per Cycle, per instruction?

 Can we reduce the workload (e.g traffic size)?

46

Page 47: T-110.5111 Computer Networks II Green ICT - Aalto … · T-110.5111 Computer Networks II Green ICT 10.10.2011 Matti Siekkinen External sources: • Y. Xiao: Green communications

October 10, 11

Can we just turn off unnecessary hardware?

Not working = Zero Watt

 What can be turned off?

 When can it be turned off?

 How to leverage the difference in power consumption among the operating modes?

47

Page 48: T-110.5111 Computer Networks II Green ICT - Aalto … · T-110.5111 Computer Networks II Green ICT 10.10.2011 Matti Siekkinen External sources: • Y. Xiao: Green communications

October 10, 11

Example 1: Sleeping

 Save network equipment (i.e. routers) energy   PSM equivalent for WLAN clients

 Observation 1: Networks are provisioned for peak load   Average utilization remains relatively low

 Observation 2: Routers and switches are usually far from energy proportional   Roughly the same power draw with any load

 Idea: turn (parts of) lightly loaded routers off occasionally   Power draw is somewhat proportional to nb of active

ports -> shut off some of them and route traffic around

10/9/11

Page 49: T-110.5111 Computer Networks II Green ICT - Aalto … · T-110.5111 Computer Networks II Green ICT 10.10.2011 Matti Siekkinen External sources: • Y. Xiao: Green communications

October 10, 11

Sleeping routers

 Time driven sleeping   If router sleeps when packets arrive -> packet loss

o  Need to carefully consider when a link can sleep  Wake on arrival

  Link sleeps when idle, awakes upon arriving packet, goes back to sleep

  Require specific technology o  Not currently implemented in OTS routers

 Might have some implications on nw mgmt   How to know if a router is sleeping or if it has crashed?

 These mechanisms are currently on research level   Not commercially deployed (AFAIK)

10/9/11

Page 50: T-110.5111 Computer Networks II Green ICT - Aalto … · T-110.5111 Computer Networks II Green ICT 10.10.2011 Matti Siekkinen External sources: • Y. Xiao: Green communications

October 10, 11

Example 2: Wake-on-LAN

 Reduce the energy consumption of networked equipment

 Idling while powered on wastes a lot of energy

 Why not go to sleep while waiting?  Before going to sleep, need to make

sure that the device will woken up at the right time

 Proxy sends a “magic” packet that triggers wake-up   Some part of NIC must remain powered up   Requires explicit support from the NIC

50

Page 51: T-110.5111 Computer Networks II Green ICT - Aalto … · T-110.5111 Computer Networks II Green ICT 10.10.2011 Matti Siekkinen External sources: • Y. Xiao: Green communications

October 10, 11

Wake-on-wireless is also possible

51

Source: Shih, E., Bahl, P., and Sinclair, M. J. 2002. Wake on wireless: an event driven energy saving strategy for battery operated devices. MobiCom '02.

Page 52: T-110.5111 Computer Networks II Green ICT - Aalto … · T-110.5111 Computer Networks II Green ICT 10.10.2011 Matti Siekkinen External sources: • Y. Xiao: Green communications

October 10, 11

How to save energy?

 Can we just turn off unnecessary hardware?

 Can we reduce the Joule per Bit, per Cycle, per instruction?

 Can we reduce the workload (e.g traffic size)?

52

Page 53: T-110.5111 Computer Networks II Green ICT - Aalto … · T-110.5111 Computer Networks II Green ICT 10.10.2011 Matti Siekkinen External sources: • Y. Xiao: Green communications

October 10, 11

Can we reduce the per-unit power?

 Low-power hardware   Necessary especially in longer term   We want to take advantage of these but we do not focus

here on how they are developed…  Power management of hardware devices

  DVFS, PSM   Important that protocols leverage these properly!

53

Page 54: T-110.5111 Computer Networks II Green ICT - Aalto … · T-110.5111 Computer Networks II Green ICT 10.10.2011 Matti Siekkinen External sources: • Y. Xiao: Green communications

October 10, 11

Example 3: Dynamic voltage and frequency scaling (DVFS)

 Dynamic power(switching power) of microprocessor C·V2·f,

where C is the capacitance being switched per clock cycle, V is voltage, and f is the switching frequency

 DVFS   Adjust the CPU frequency level on-the-fly   Reduce dynamic power   Reduce the cooling cost (generate less heat)

 Both voltage and frequency usually adjusted simultaneously   Combination is called P-state

 Several implementations exist   AMD: PowerNow!, Cool’n’Quiet   Intel’s SpeedStep

54

Page 55: T-110.5111 Computer Networks II Green ICT - Aalto … · T-110.5111 Computer Networks II Green ICT 10.10.2011 Matti Siekkinen External sources: • Y. Xiao: Green communications

October 10, 11

Dynamic Modulation Scaling (DMS)

 Reduce communication energy per bit

 Trade-off between energy and performance   Similar principle than in DVFS

 Change modulation dynamically   Slows down transmission in a

certain rate instead of operating a MAX rate and going to sleep during IDLE

55

Energy delay tradeoff of QAM (b is nb if bits per symbol)

Page 56: T-110.5111 Computer Networks II Green ICT - Aalto … · T-110.5111 Computer Networks II Green ICT 10.10.2011 Matti Siekkinen External sources: • Y. Xiao: Green communications

October 10, 11

Example 4: Traffic shaping  Mobile media streaming drains battery quickly

  Constant bit rate multimedia traffic is not energy friendly with 802.11 and 3G

  Forces the network interface to be active all the time

 Idea: Shape traffic into bursts so that it is more energy efficient to receive   Remember the linear relationship with throughput

10/9/11

Data Rate (kBps)

Start-up Time (s)

WLAN 3G

PSM (W)

CAM (W)

48kBps (W)

2Mbps (W)

8 18 0.53 1.06 1.30 1.30 16 10 0.99 1.07 1.30 1.30 24 10 1.04 1.07 1.27 1.35

Mobile Internet Radio power draw

on E-71 (TCP-based streaming)

Page 57: T-110.5111 Computer Networks II Green ICT - Aalto … · T-110.5111 Computer Networks II Green ICT 10.10.2011 Matti Siekkinen External sources: • Y. Xiao: Green communications

October 10, 11

Traffic Shaping with Proxy

 Client sends request to proxy  Proxy

  forwards request to radio server   receives and buffers media stream   repeatedly sends in a single burst to client

 802.11:   PSM is enabled   WNI wakes up to receive a burst at a time   Waste only one timeout per burst

 3G:   Long enough burst interval (t) -> inactivity timers expire -> switch to lower power state in between

57

Page 58: T-110.5111 Computer Networks II Green ICT - Aalto … · T-110.5111 Computer Networks II Green ICT 10.10.2011 Matti Siekkinen External sources: • Y. Xiao: Green communications

October 10, 11

How much energy can be saved?

  Significant savings for audio streaming   Minimum power buffering period exists, almost 70% reduction   Due to limited TCP receive buffer at mobile client

  Video streaming via proxy from YouTube saves less than 20%   Already transmitted in bursts by server   Without server shaping, could reduce power almost 50%

58

Page 59: T-110.5111 Computer Networks II Green ICT - Aalto … · T-110.5111 Computer Networks II Green ICT 10.10.2011 Matti Siekkinen External sources: • Y. Xiao: Green communications

October 10, 11

What about 3G?

 3G has long inactivity timers   Operator controls   No way to modify yourself   Large wasted tail energy

 Savings vary with   operator   mobile device   subscription rate

 In many cases there are no savings, but   Fast Dormancy comes soon

o  Optimization in 3G standard o  Will be in use in near future

  LTE will also have better power mgmt

Page 60: T-110.5111 Computer Networks II Green ICT - Aalto … · T-110.5111 Computer Networks II Green ICT 10.10.2011 Matti Siekkinen External sources: • Y. Xiao: Green communications

October 10, 11

How to save energy?

 Can we just turn off unnecessary hardware?

 Can we reduce the Joule per Bit, per Cycle, per instruction?

 Can we reduce the workload (e.g traffic size)?

60

Page 61: T-110.5111 Computer Networks II Green ICT - Aalto … · T-110.5111 Computer Networks II Green ICT 10.10.2011 Matti Siekkinen External sources: • Y. Xiao: Green communications

October 10, 11

How can we reduce the workload?

 Getting by with less traffic   Clever transport protocols   Smart application design

 Doing less computation   Offload the work

 Trading transmission to computation

61

Page 62: T-110.5111 Computer Networks II Green ICT - Aalto … · T-110.5111 Computer Networks II Green ICT 10.10.2011 Matti Siekkinen External sources: • Y. Xiao: Green communications

October 10, 11

Example 5: Proxy-based data compression

 Communication energy consumption ~ Traffic size  Compression can reduce amount of traffic

generated   But computation costs also energy

 Tradeoff always exists Communications cost (reduced traffic size)

Computational cost

(compression, decompression)

Page 63: T-110.5111 Computer Networks II Green ICT - Aalto … · T-110.5111 Computer Networks II Green ICT 10.10.2011 Matti Siekkinen External sources: • Y. Xiao: Green communications

October 10, 11

Proxy-based framework

63

Source: Xiao, Y.; Siekkinen, M.; Ylä-Jääski, A. 2010. Framework for energy-aware lossless compression in mobile services: the case of e-mail. ICC'10.

Page 64: T-110.5111 Computer Networks II Green ICT - Aalto … · T-110.5111 Computer Networks II Green ICT 10.10.2011 Matti Siekkinen External sources: • Y. Xiao: Green communications

October 10, 11

Communication energy cost

64

s Original file size

sc File size after compression ratio Compression ratio = sc/s

E0(r) Energy utility of data transmission at data rate r

rp Predited data rate

Rr The closest reference data rate of rp

α Adaptive factor α =Rr/rp

Reference Data rate (KB/s)

Energy per KB(mJ/KB)

16 55.744 32 28.107 64 14.446 96 10.063 128 7.448 160 6.345 192 5.403 224 4.767 256 4.211

Energy(receiving the compressed data) = sc×E0(Rr) × α

Energy(receiving the original data) = s×E0(Rr) × α

Page 65: T-110.5111 Computer Networks II Green ICT - Aalto … · T-110.5111 Computer Networks II Green ICT 10.10.2011 Matti Siekkinen External sources: • Y. Xiao: Green communications

October 10, 11

Compression effectiveness

65

Energy utility of decompression Ed (Gunzip on N810 )

Compression Effectiveness ce

When (ce > 1) , compress the data

Ed = 0.2635× ratio + 0.4302 Energy(decompression) = Ed × s

Page 66: T-110.5111 Computer Networks II Green ICT - Aalto … · T-110.5111 Computer Networks II Green ICT 10.10.2011 Matti Siekkinen External sources: • Y. Xiao: Green communications

October 10, 11

Evaluation (mobile E-mail)

66

File Extension/Type

With compression Without Compression ce

Energy (J)

Duration (s)

Energy (J)

Duration (s)

.doc 9.61 7.0 18.31 11.8 6.90

.bmp 5.86 5.4 15.74 9.7 2.67

.pdf 25.55 22.8 28.45 23.0 1.03

.txt 13.80 12.2 18.97 13.0 2.68 Binary data 12.8 11 17.57 11.8 2.68

10~ 60% energy savings

Page 67: T-110.5111 Computer Networks II Green ICT - Aalto … · T-110.5111 Computer Networks II Green ICT 10.10.2011 Matti Siekkinen External sources: • Y. Xiao: Green communications

October 10, 11

Example 6: Computation offloading

67

 Execute parts of program on remote server  Leverage same tradeoff as with previous example

  Transferring required state to server and back consumes energy

  But we save computation energy  Dynamical decision making

  Figure out on the fly which parts of program are worth offloading

  Need accurate models for communication and computation energy consumption

 Several proposed frameworks exist   MAUI, CloneCloud   Research prototypes

Page 68: T-110.5111 Computer Networks II Green ICT - Aalto … · T-110.5111 Computer Networks II Green ICT 10.10.2011 Matti Siekkinen External sources: • Y. Xiao: Green communications

October 10, 11

MAUI  Microsoft’s Requires source code  Using MAUI

  Build app as a standalone phone app   Add .NET attributes to indicate “remoteable” methods

10/9/11

Maui server Smartphone

Application

Client Proxy

Profiler Solver

Maui  Run(me  

Server Proxy

Profiler Solver

Maui  Run(me  

Application

RPC

RPC

Maui Controller

E. Cuervo, A. Balasubramanian, D. Cho, A. Wolman, S. Saroiu, R. Chandra, and P. Bahl, MAUI: Making Smartphones Last Longer with Code Offload, in MobiSys 2010

Page 69: T-110.5111 Computer Networks II Green ICT - Aalto … · T-110.5111 Computer Networks II Green ICT 10.10.2011 Matti Siekkinen External sources: • Y. Xiao: Green communications

October 10, 11

CloneCloud  Intel’s CloneCloud offloads Android program code  Works directly on bytecode

  No need for source code  Modified Dalvik VM  Dynamic thread migration between phone and cloud

10/9/11

Byung-Gon Chun and Petros Maniatis. Augmented Smart Phone Applications Through Clone Cloud Execution. Proceedings of HotOS XII, 2009.

Page 70: T-110.5111 Computer Networks II Green ICT - Aalto … · T-110.5111 Computer Networks II Green ICT 10.10.2011 Matti Siekkinen External sources: • Y. Xiao: Green communications

October 10, 11

What else could be done?  Data centers

  Liquid cooling for servers, use the hot water to heat other premises

  Run servers in (freezing) cold areas   Renewable energy   Execute things where energy is cheap

 Mobile devices   Smarter (cooperative) scheduling to reduce contention   Leverage alternative low-power radios (e.g. Zi-Fi or Blue-Fi)   Energy harvesting

o  Kinetic, solar, ambient radiation, …

70

Page 71: T-110.5111 Computer Networks II Green ICT - Aalto … · T-110.5111 Computer Networks II Green ICT 10.10.2011 Matti Siekkinen External sources: • Y. Xiao: Green communications

October 10, 11

Summary   Green ICT is a hot topic

  Saving energy means saving money and reducing emissions   ICT counts quite a lot

  Measuring and modeling energy consumption necessary   Undestand how energy is consumed   Improve energy efficiency of protocols and apps   Develop energy aware protocols and apps   Statistical and deterministic modeling

  Several ways to save energy   Switching off hardware dynamically   Reducing the Joule per Bit, per Cycle, per instruction

o  Low-power hardware o  Power management of hardware devices

  Reducing workload o  Tradeoffs with computation vs. communication energy o  Offloading

Page 72: T-110.5111 Computer Networks II Green ICT - Aalto … · T-110.5111 Computer Networks II Green ICT 10.10.2011 Matti Siekkinen External sources: • Y. Xiao: Green communications

October 10, 11

Additional reading   A. Carroll and G. Heiser, “An analysis of power consumption in a smartphone,” in

USENIXATC’10: Proceedings of the 2010 USENIX conference on USENIX annual technical conference. Berkeley, CA, USA: USENIX Association, Jun. 2010, pp. 21–34.

  Barr, K. C. and Asanović, K.,"Energy-aware lossless data compression," ACM Trans. Comput. Syst. vol. 24, no. 3, pp. 250-291. August 2006.

  Byung-Gon Chun and Petros Maniatis. “Augmented Smart Phone Applications Through Clone Cloud Execution,” Proceedings of the 12th Workshop on Hot Topics in Operating Systems (HotOS XII), May 2009.

  C.Schurgers, V.Raghunathan, et al, “Power Management for Energy-aware Communications Systems”, ACM Transactions on Embedded Computing Systems, vol 2, no.3, Aug.2003, pp. 431-447.

  S.Doshi, S.Bhandare, T.X.Brown, “An On-demand Minimum Energy Routing Protocol for a Wireless Ad Hoc Network”, Mobile Computing and Communications Review, vol. 6, no. 3, pp.50-66.

72