green computing power aware computing maziar goudarzi
TRANSCRIPT
Green ComputingPower Aware Computing
Maziar Goudarzi
Outline
• Power Aware Computing• Power Management in Computers
Acknowledgements: Some slides/parts from http://www.ida.liu.se/~TDDD50/
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
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
5
Sources of energy waste
• General-purpose systems tendency
• Good performance for several applications• Union of maximum requirements of each
application class
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
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
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
9
Requirements
• Needed irrespective of the approach
– Measurement and monitoring – Analysis tools and models – Control algorithms
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
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
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
13
Coming Next
• Power management in computers– Processor– Disk– Memory– Network– Display
• Power management standards
Green ComputingPower Management
in Computers
15
Outline
• Computer components– Processor– Disk– Memory– Network– Display
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
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
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
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!!!
20
تمرین اضافی
مصرف توان لپ تاپ یا کامپیوترتان را در حالت •idle و نیز در حالتهای مختلف کاری
(utilization.اندازه بگیرید )های مختلفانرژی مصرف شده برای ورود و خروج به حالت •
low power.را استخراج کنید جهت idleحداقل زمان مفید موردنیاز در حالت •
مفید بودن آن را تعیین کنید.همه مراحل و نتایج را با جزئیات گزارش کنید.•
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
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
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
24
تمرین اضافی
روی یک سیستم لینوکس، اثر استفاده از •Tickless Kernel را دقیق اندازه گیری و
گزارش کنید.
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()
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
27
PowerTOP
Information about what causes CPU wake ups
28
تمرین اضافی
حداقل سه راهکار PowerTopبا استفاده از •برای کاهش مصرف انرژی در یک دستگاه کامپیوتر )مثل سرور( ارائه داده و آنها را
عملی کنید.نتایج را با جزئیات گزارش دهید.•
29
Outline
• Power management in computers– Processor–Disk– Memory– Network– Display
30
Traditional hard drive
• Composed of electronic and mechanical parts
Most of solutions exploit reduction of consumption of the mechanical parts
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
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
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
34
Solid state drives (SSD)
• Composed only of electronic parts
• No mechanical parts– Lower consumption than regular HDs– Faster read operations
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
36
Outline
• Power management in computers– Processor– Disk–Memory– Network– Display
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
38
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.
40
Outline
• Power management in computers– Processor– Disk– Memory–Network– Display
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
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
43
44
تمرین اضافی
مصرف روزانه برق یک یا چند دانشکده دانشگاه چقدر •است؟
کیلوواتی فعلی مقرون به صرفه است؟ اگر 20آیا نیروگاه •خیر، چرا؟ واگر به صرفه نیست پس به چه علت اجرا می
شود؟ اگر بله، چه میزان صرفه جویی صورت می دهد؟
100هزینه احداث یک نیروگاه خورشیدی فتوولتائیک •مگاواتی چقدر است؟
این هزینه را با یک نوع نیروگاه دیگر مقایسه کنید.•
45
Outline
• Power management in computers– Processor– Disk– Memory– Network–Display
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)
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
48
LCD Display
• Intel– Reduce backlight when most pixels are dark
49
One Laptop Per Child
50
Graphics Chipsets
• One Laptop Per Child – Secondary display controller– Framebuffer scan even with CPU in idle mode
51
GPU Power
http://www.tomshardware.com/reviews/quad-sli-nvidia-surround-geforce-gtx-480,2745-11.html
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
53
تمرین اضافی
جمع آوری کلیه روشهای ممکن مدیریت توان •در یک سرور مثل سرورهای دانشکده
گزارش جزئیات و اثر قابل انتظار از هریک•در صورت امکان، اجرا و اندازه گیری اثر هر •
یک
54
Coming Next
• Power Management Standards– APM– ACPI