green computing power aware computing maziar goudarzi

54
Green Computing Power Aware Computing Maziar Goudarzi

Upload: ryann-ackley

Post on 31-Mar-2015

223 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Green Computing Power Aware Computing Maziar Goudarzi

Green ComputingPower Aware Computing

Maziar Goudarzi

Page 2: Green Computing Power Aware Computing Maziar Goudarzi

Outline

• Power Aware Computing• Power Management in Computers

Acknowledgements: Some slides/parts from http://www.ida.liu.se/~TDDD50/

Page 3: Green Computing Power Aware Computing Maziar Goudarzi

3

Power aware computing

– Avoid wasting energy

• Challenges– Figure out where and why waste happens– Determine how to avoid it

Power aware computing are techniques that consider theenergy consumption as one of their main constraints

P. Ranganathan, "Recipe for Efficiency: Principles of Power-Aware Computing,"Communications of the ACM, vol.53, no.4, pp.60-67, April. 2010

Page 4: Green Computing Power Aware Computing Maziar Goudarzi

4

Sources of energy waste

• Systems designed for most general case– Most aggressive workload performance– Worst-case risk tolerance

• Components designed by different teams– No component interaction considered

• Functions of the system as independent modules– No function interaction considered

• Design focused on performance and availability– Resource waste for small improvements– Component or operation redundancies

Page 5: Green Computing Power Aware Computing Maziar Goudarzi

5

Sources of energy waste

• General-purpose systems tendency

• Good performance for several applications• Union of maximum requirements of each

application class

Page 6: Green Computing Power Aware Computing Maziar Goudarzi

6

Sources of energy waste

• Optimization for peak performance scenario

– Average system utilization low– Benchmarks stress worst-case performance

workloads• Systems optimized for these scenarios

Page 7: Green Computing Power Aware Computing Maziar Goudarzi

7

Reduction of energy waste

• Common solutions

– Use a more power-efficient alternative

– Disable/Scale-down unused resources

– Match work to power-efficient resource

– Piggyback, or Combination of multiple tasks in single energy event

– Design for required functionality

Page 8: Green Computing Power Aware Computing Maziar Goudarzi

8

Reduction of energy waste

• Coming solutions

– Holistic solutions• Broad scope of the problem• Cross-layer interaction

– Trade off some other metric for energy

– Optimize energy efficiency for the common case

– Spend someone else’s power

– Spend power to save power

Page 9: Green Computing Power Aware Computing Maziar Goudarzi

9

Requirements

• Needed irrespective of the approach

– Measurement and monitoring – Analysis tools and models – Control algorithms

Page 10: Green Computing Power Aware Computing Maziar Goudarzi

Current work on power management

Circuits Architecture

P. Ranganathan, "Recipe for Efficiency: Principles of Power-Aware Computing",Communications of the ACM, vol.53, no.4, pp.60-67, April. 2010

Page 11: Green Computing Power Aware Computing Maziar Goudarzi

Current work on power management

Compiler/System

P. Ranganathan, "Recipe for Efficiency: Principles of Power-Aware Computing,”Communications of the ACM, vol.53, no.4, pp.60-67, April. 2010

Page 12: Green Computing Power Aware Computing Maziar Goudarzi

Limits of Energy Efficiency

• Richard Feynman (Nobel Physicist)– 1018 –bit op/s per Watt– Billion desktop-class processors in a handheld device

• Tremendous improvement in components possible

• Consider non-IT equipments as well: potential is even higher

• Practically: at least an order of magnitude improvement

Page 13: Green Computing Power Aware Computing Maziar Goudarzi

13

Coming Next

• Power management in computers– Processor– Disk– Memory– Network– Display

• Power management standards

Page 14: Green Computing Power Aware Computing Maziar Goudarzi

Green ComputingPower Management

in Computers

Page 15: Green Computing Power Aware Computing Maziar Goudarzi

15

Outline

• Computer components– Processor– Disk– Memory– Network– Display

Page 16: Green Computing Power Aware Computing Maziar Goudarzi

Introduction

• Different levels– Circuits– Architecture– Compilers and Systems

• This lecture deals with the last level– Focused on techniques and solutions applied to

Matthew Garret, “Powering Down,” Communications of the ACM 51, 9 (September 2008), 42-46

Page 17: Green Computing Power Aware Computing Maziar Goudarzi

17

Processor

• Processor does not run at 100% capacity all time

• Architecture techniques to save up energy– CPU frequency/voltage scaling– Low power mode states

• Disable functional units not needed– Clock gating– Dissociate from memory bus– Disable part of the cache

Page 18: Green Computing Power Aware Computing Maziar Goudarzi

18

Management at system level

• HLT (halt) instruction – Allows to indicate that there is nothing to execute – CPU enters halt state until next interrupt – Issued by the operating system

• Advanced Power Management (APM) – CPU idle / busy calls

• CPU in low / normal power state • Low power state

– Clock stopped until next interrupt – Clock slowed down

• Advanced Configuration and Power Interface (ACPI) – Current specification for energy management – Richer low power modes and frequency/voltage scaling

History

Page 19: Green Computing Power Aware Computing Maziar Goudarzi

19

Transition to low power states

• Power state transitions take time

• Interruptions may wake up the processor too often – Some interrupts cannot be avoided

• Interrupts for user interaction, e.g. keyboard

– But other interrupts can be adjusted or disabled • Regular interrupts such as timers

– Sometimes, flaws in the software• Email client more frequently checking for email updates than fetching

done from the server

Processor must remain in idle power statefor more than 20 ms to get benefit of it!!!

Page 20: Green Computing Power Aware Computing Maziar Goudarzi

20

تمرین اضافی

مصرف توان لپ تاپ یا کامپیوترتان را در حالت •idle و نیز در حالتهای مختلف کاری

(utilization.اندازه بگیرید )های مختلفانرژی مصرف شده برای ورود و خروج به حالت •

low power.را استخراج کنید جهت idleحداقل زمان مفید موردنیاز در حالت •

مفید بودن آن را تعیین کنید.همه مراحل و نتایج را با جزئیات گزارش کنید.•

Page 21: Green Computing Power Aware Computing Maziar Goudarzi

21

Transition to low power states

• Example:– An application (e.g. email client?)– Approach 1: wakeup every ½ second and do 2ms of work.– Approach 2: wakeup every second and do 4ms of work– Which one is better?

• An 2.3GHz Opteron X4, 16GB DDR2-667 DRAM, 500GB hard• At 100% load: 295W• At 0% load: 141W• Idle power: a few 10’s of Watts(?)

• Race-to-idle concept

Page 22: Green Computing Power Aware Computing Maziar Goudarzi

22

Timers

• Events scheduled at a specific time in the future– Example: cursor blinking, time clock ticking...– The event produces a timer interrupt

• Timer interrupts have a big impact on consumption– Regularly wake up the processor– System has plenty of them

• Two examples of optimization– Linux tickless kernel– Consolidation of timers

Page 23: Green Computing Power Aware Computing Maziar Goudarzi

23

Linux tickless kernel

• Traditional kernels had a global timer– Timer ticked and interrupted the CPU periodically

• Typically at 100 Hz, i.e. 10 ms period– At each tick the kernel checks if an event was scheduled

• Tickless kernel– No periodic tick– When CPU goes to idle state

• Global timer reprogrammed• Tick the next scheduled event

Suresh Siddha,Venkatesh Pallipadi, Arjan Van De Ven, “Getting maximum mileage out of tickless”, Proceedings of the Linux Symposium, 2007

Kernel Timer at 1000 Hz

Page 24: Green Computing Power Aware Computing Maziar Goudarzi

24

تمرین اضافی

روی یک سیستم لینوکس، اثر استفاده از •Tickless Kernel را دقیق اندازه گیری و

گزارش کنید.

Page 25: Green Computing Power Aware Computing Maziar Goudarzi

25

Consolidation of timers

• Software makes extensive use of timers– Overwhelming number of interrupts– Solutions

• Review of periods assigned• Consolidation of timers

• Consolidation of timers– Application level

• Developer reduce or group timers

– System level• Glib library function: g_timeout_add_seconds()• Linux kernel: round_jiffies()

Page 26: Green Computing Power Aware Computing Maziar Goudarzi

26

Deferrable (Kernel) Timers

• Kernel Timers – Non-deferrable– Deferrable

• Example: – ondemand governer sets cpu-freq according to cpu utilization– Periodically samples CPU utilization

• Important to service in sub-second time when system busy• Could be deferred when system idle

https://lesswatts.org/index.phphttp://software.intel.com/sites/default/files/LessWatts.org-whitepaper.pdf

Kernel Timer at 1000 Hz

Page 27: Green Computing Power Aware Computing Maziar Goudarzi

27

PowerTOP

Information about what causes CPU wake ups

Page 28: Green Computing Power Aware Computing Maziar Goudarzi

28

تمرین اضافی

حداقل سه راهکار PowerTopبا استفاده از •برای کاهش مصرف انرژی در یک دستگاه کامپیوتر )مثل سرور( ارائه داده و آنها را

عملی کنید.نتایج را با جزئیات گزارش دهید.•

Page 29: Green Computing Power Aware Computing Maziar Goudarzi

29

Outline

• Power management in computers– Processor–Disk– Memory– Network– Display

Page 30: Green Computing Power Aware Computing Maziar Goudarzi

30

Traditional hard drive

• Composed of electronic and mechanical parts

Most of solutions exploit reduction of consumption of the mechanical parts

Page 31: Green Computing Power Aware Computing Maziar Goudarzi

31

Spin down

• Switch off the platter spindle motor when inactive– Supported by most operating systems

• Costs– Reduces hard-drive life expectancy– Uses a lot of energy to spin up– Creates delays (order of seconds)

• Smart management of I/O to – minimize spin transitions– reduce delays

Page 32: Green Computing Power Aware Computing Maziar Goudarzi

32

I/O management

• Reads– Each read from disk results in spinning up

– Application data optimizations• Read all needed data at application startup• Read data in big chunks

– Operating system optimizations• Data cache

– File system optimizations• Problem

– Unix systems record last time a file is accessed– Each read triggers a write

• Disable the last accessed time or updated with next write

Page 33: Green Computing Power Aware Computing Maziar Goudarzi

33

I/O management

• Writes– Application optimizations

• Write-out avoidance– Application can track data to write– At some point follow track to write all required information

– Operating system optimizations• Data to write can be cached (no spin up)• Risk of data loss if system fails

– Linux laptop mode → write to disk when doing read

– Electronics• Hard-drive electronics and I/O controller low power modes

– I/O controller low power mode can save 0.5 Watts– Typical desktop hard drive between 5 and 15 W

Page 34: Green Computing Power Aware Computing Maziar Goudarzi

34

Solid state drives (SSD)

• Composed only of electronic parts

• No mechanical parts– Lower consumption than regular HDs– Faster read operations

Page 35: Green Computing Power Aware Computing Maziar Goudarzi

35

Solid state drives (SSD)

• NAND Flash memory limitations– Writing latency

• Memory organized in pages (~2KB) and blocks (~128KB)

• Write a page usually requires – erasure of block– rewrite of the whole block

– Finite program-erase cycles• Each block can be erased a number of times• Require wear leveling techniques to balance erasures

Page 36: Green Computing Power Aware Computing Maziar Goudarzi

36

Outline

• Power management in computers– Processor– Disk–Memory– Network– Display

Page 37: Green Computing Power Aware Computing Maziar Goudarzi

37

Memory

• SRAM, Cache– Cache reconfiguration

• DRAM– SDRAM– DDR SDRAM, 2.5/2.6 V– DDR2, 1.8 V– DDR3, 1.5 V– DDR4, 1.05–1.2 V

exp. Sep 2012

Page 38: Green Computing Power Aware Computing Maziar Goudarzi

38

Page 39: Green Computing Power Aware Computing Maziar Goudarzi

39

DDR Memory

http://web.eecs.umich.edu/~twenisch/papers/asplos11.pdfQ. Deng, et al., MemScale: Active Low-Power Modes for Main Memory, ASPLOS’11.

Page 40: Green Computing Power Aware Computing Maziar Goudarzi

40

Outline

• Power management in computers– Processor– Disk– Memory–Network– Display

Page 41: Green Computing Power Aware Computing Maziar Goudarzi

41

Network

• Ethernet is the dominant wired communication technology– Common supported speeds

10-10,000 Mbps

– Similar energy consumed with and without data transmission

– Idle mode prevents any kind of reception

– New standard IEEE 802.3az for low power modes

– Typical power: 5-20W (10Gbps NIC)• Characterizing 10 Gbps Network Interface Energy Consumption,

http://www.cl.cam.ac.uk/~acr31/pubs/sohan-10gbpower.pdf

Page 42: Green Computing Power Aware Computing Maziar Goudarzi

42

Network

• Wake on LAN– Technique to wake up a slept machine

• Network keeps physical interface enabled• “Magic packet” tells the interface to wake up

machine

• Wireless LAN– Physical and routing protocols

to optimize consumption

Page 43: Green Computing Power Aware Computing Maziar Goudarzi

43

Page 44: Green Computing Power Aware Computing Maziar Goudarzi

44

تمرین اضافی

مصرف روزانه برق یک یا چند دانشکده دانشگاه چقدر •است؟

کیلوواتی فعلی مقرون به صرفه است؟ اگر 20آیا نیروگاه •خیر، چرا؟ واگر به صرفه نیست پس به چه علت اجرا می

شود؟ اگر بله، چه میزان صرفه جویی صورت می دهد؟

100هزینه احداث یک نیروگاه خورشیدی فتوولتائیک •مگاواتی چقدر است؟

این هزینه را با یک نوع نیروگاه دیگر مقایسه کنید.•

Page 45: Green Computing Power Aware Computing Maziar Goudarzi

45

Outline

• Power management in computers– Processor– Disk– Memory– Network–Display

Page 46: Green Computing Power Aware Computing Maziar Goudarzi

46

Display

• Analog displays– VESA Display Power Management Signaling (DPMS)

• Use H-Sync and V-Sync pins to select power mode

• Four modes are encoded: On, Stand-By, Suspend, Off

• Digital displays– DVI Digital Monitor Power Management (DMPM)

• Use Data port and DDC pin to select power mode– DDC: Display Data Channel. Communicate supported display modes to the adapter and to

enable the computer host to adjust monitor parameters

• Supported modes– Power On– Intermediate Power State (Data port off)– Active-Off (Data port off)– Non-Link Recoverable Off (DDC pin off)

Digital Visual Interface specification 1.0 (http://www.ddwg.org/lib/dvi_10.pdf)

Page 47: Green Computing Power Aware Computing Maziar Goudarzi

47

LCD Display

• Backlight– The light source can be made up of:

• Several Light Emitting Diodes (LEDs)• An Electroluminescent panel (ELP)• One or more Cold Cathode Fluorescent Lamps (CCFLs)• One or more Hot Cathode Fluorescent Lamps (HCFLs)• One or more External Electrode Fluorescent Lamps (EEFLs)• One or more Incandescent light bulbs

http://en.wikipedia.org/wiki/Backlight

Page 48: Green Computing Power Aware Computing Maziar Goudarzi

48

LCD Display

• Intel– Reduce backlight when most pixels are dark

Page 49: Green Computing Power Aware Computing Maziar Goudarzi

49

One Laptop Per Child

Page 50: Green Computing Power Aware Computing Maziar Goudarzi

50

Graphics Chipsets

• One Laptop Per Child – Secondary display controller– Framebuffer scan even with CPU in idle mode

Page 51: Green Computing Power Aware Computing Maziar Goudarzi

51

GPU Power

http://www.tomshardware.com/reviews/quad-sli-nvidia-surround-geforce-gtx-480,2745-11.html

Page 52: Green Computing Power Aware Computing Maziar Goudarzi

52

Graphics Card

• Systems with dual GPUs– Motherboard integrated GPU– External powerful GPU – System switches off external GPU to save

energy

• Compress frame-buffer contents

Page 53: Green Computing Power Aware Computing Maziar Goudarzi

53

تمرین اضافی

جمع آوری کلیه روشهای ممکن مدیریت توان •در یک سرور مثل سرورهای دانشکده

گزارش جزئیات و اثر قابل انتظار از هریک•در صورت امکان، اجرا و اندازه گیری اثر هر •

یک

Page 54: Green Computing Power Aware Computing Maziar Goudarzi

54

Coming Next

• Power Management Standards– APM– ACPI