Green Computing Power Management Standards Maziar Goudarzi Outline

  • Slides: 29
Download presentation
Green Computing Power Management Standards Maziar Goudarzi

Green Computing Power Management Standards Maziar Goudarzi

Outline • APM: Advanced Power Management • ACPI: Advanced Configuration and Power Interface Acknowledgements

Outline • APM: Advanced Power Management • ACPI: Advanced Configuration and Power Interface Acknowledgements Some slides/parts from http: //impact. asu. edu/cse 591 sp 11/Power. State 1_BL_MP. pptx and http: //www. ida. liu. se/~TDDD 50/ 2

APM: Advanced Power Management • API by intel & Microsoft in 1992 • OS

APM: Advanced Power Management • API by intel & Microsoft in 1992 • OS – BIOS (firmware) communication & work • Main drawback – BIOS-based – Standard 3

Firmware former usage • Initial power management mechanisms – Implemented on device firmware –

Firmware former usage • Initial power management mechanisms – Implemented on device firmware – Firmware did most of the work – Example: • Firmware reliance not good – A call can take long time or never return – OS stability is dependent on firmware quality Andrew Grover. Modern System Power Management. ACM Queue vol. 1, no. 7 (October 2003), 66 -72.

Advanced Configuration and Power Management

Advanced Configuration and Power Management

Overview • ACPI definitions • Energy efficiency through better control of ACPI power states

Overview • ACPI definitions • Energy efficiency through better control of ACPI power states • A few Examples on power savings using ACPI 7

What is ACPI Advanced Configuration and Power Management Specification: – ACPI is part of

What is ACPI Advanced Configuration and Power Management Specification: – ACPI is part of all the Operating Systems, and it allows the operating system to control the amount of power given to each device attached to the system. Its all about giving parts of computer some sleep…… 8

Advanced Configuration and Power Interface(ACPI) • Specification – Holistic approach for computer system energy

Advanced Configuration and Power Interface(ACPI) • Specification – Holistic approach for computer system energy conservation – Created by HP, Intel, Microsoft, Phoenix and Toshiba • OS-directed configuration and power management (OSPM) – Governs all system and device power state transitions – Aware of user preferences and applications requirements • Defines – Hardware/software interfaces and data structures – State definitions – ASL & AML languages 9

Goals • Configuration and power management – For desktop, laptops, workstation and servers •

Goals • Configuration and power management – For desktop, laptops, workstation and servers • Enhanced functionality and robustness at OS-level – Inexpensive power managed hardware – Better power management decisions – Reduction of conflicts between OS and firmware • Robust interface for configuring motherboard devices • Promotion of industry-wide adoption 10

Functional areas • Power management • System, device, and processor • Performance management •

Functional areas • Power management • System, device, and processor • Performance management • Device and processor • • Configuration / Plug & Play System events Battery management Thermal management • All controlled by OSPM – OSPM: OS-directed configuration and power management 11

ACPI- Global States • Global states are applied to the entire system and are

ACPI- Global States • Global states are applied to the entire system and are visible to the User: ü G 0: Working state ü G 1: Sleeping State or Standby. ü G 2: Soft Off. ü G 3: Mechanical Off. 12

ACPI Global System State • System context – Software loaded in memory and state

ACPI Global System State • System context – Software loaded in memory and state of devices • G 0 and G 1 keep the context • G 2 and G 3 only keep the context if sleeping state S 4 is used – S 4 saves context in non volatile memory 13

ACPI Sleeping States • Sleeping states within global system sleeping state G 1 14

ACPI Sleeping States • Sleeping states within global system sleeping state G 1 14

ACPI Sleeping States • S states – affect the whole system – – –

ACPI Sleeping States • S states – affect the whole system – – – S 0 – working S 1 – processor stops, idle hardware powered down S 2 – CPU, Caches powered off S 3 – Standby/Sleep, Suspend to RAM S 4 – Hibernate, Suspend to Disk S 5 – Soft Off 15

ACPI Device Power States • Applies to each device and generally not visible by

ACPI Device Power States • Applies to each device and generally not visible by the user • Independent of global system state • D states – individual device state – D 0 – fully on – D 1, D 2 – intermediate states – D 3 – powered off 16

ACPI Device Power States • D 1 and D 2 optional • D 1,

ACPI Device Power States • D 1 and D 2 optional • D 1, D 2, and D 3 hot defined by each device class 17

ACPI CPU Power States • Power consumption and thermal management states – Within global

ACPI CPU Power States • Power consumption and thermal management states – Within global working state G 0 • Latency – C 1 must be as low as not considered – C 2 and C 3 must report latency via ACPI firmware – OSPM can decide if it is worth to switch 18

ACPI Power States- CPU • C state – CPU state – C 0 –

ACPI Power States- CPU • C state – CPU state – C 0 – working – C 1 – halted, not executing instructions – C 2 – clock stopped – C 3 – sleep 19

ACPI CPU Performance States • P state – changing the performance of CPU, or

ACPI CPU Performance States • P state – changing the performance of CPU, or device such as GPU, by switching between different Frequency and Voltages to modulate power consumption. – – P 0 – full speed, frequency, voltage, etc P 1 – slower than P 0 … Pn – up to 15 20

Main view of power states The image belongs to the ACPI 4. 0 a

Main view of power states The image belongs to the ACPI 4. 0 a specification 21

Power Saving Techniques – Using P state transitions (Race to Idle) • Power efficiency

Power Saving Techniques – Using P state transitions (Race to Idle) • Power efficiency of P states is not linear – Example (not realistic for simplicity): • P 0 is 2 MHz and uses 30 watts • P 1 is 1 MHz and uses 20 watts • 10000 cycles of work to be done: – P 0 power usage = 10000 / 2 MHz * 30 watts =. 15 watt seconds – P 1 power usage = 10000 / 1 MHz * 20 watts =. 20 watt seconds • Use P 0 state to complete the work and return to idle sooner • Known as “race to idle”. • Race to idle > Other P states

Power Saving Techniques – C State (only applies to CPU) • “Tickless idle” technique:

Power Saving Techniques – C State (only applies to CPU) • “Tickless idle” technique: – Delay scheduled events as long as possible in order to do all work at once, and go back to sleep. – Sleep longer, save energy. • Option 1: – For current kernel, the C 0 to C 1 transitions, hundreds of times per second. • Option 2 : C 0 to C 2 transitions. – Power required is less but wake up time is more. 24

Research(-like) Questions: Power Profiling of Computing Platform • Power Profiling of the entire platform

Research(-like) Questions: Power Profiling of Computing Platform • Power Profiling of the entire platform for different workloads such as CPU intensive, memory intensive or network intensive. • Can workload assignment match the nature of the workload to the power profile of the system. • Measurement of Power Consumption of CPU in each of C and P states. • Determine the performance cost and power cost of transition to C 0 from any other state? • Can server load prediction be used to choose C states more effectively? 25

Research(-like) questions D and P states (Devices) • The D and P states supported

Research(-like) questions D and P states (Devices) • The D and P states supported by a device are dependent upon the device implementation. • It's performance and overhead characteristics are all device dependent. • Can load prediction be used to choose device states more effectively? • Can awareness of the nature of the load help to choose the particular computing system? 26

Power Profiling of Components – D and P states • The same technique can

Power Profiling of Components – D and P states • The same technique can be applied to other devices – NIC, Hard disk, etc. – Give them work to do – Oscillate power state – Measure the performance and power changes 27

Summary • Introduction to ACPI • How ACPI can be used to reduce power

Summary • Introduction to ACPI • How ACPI can be used to reduce power • A few investigation proposals 34

Additional information • ACPI Specification – http: //www. acpi. info • The ACPI Component

Additional information • ACPI Specification – http: //www. acpi. info • The ACPI Component Architecture Project – http: //www. acpica. org/ • ACPI FAQ for Linux implementation – http: //www. columbia. edu/~ariel/acpi_howt o. txt 35

 ﺗﻤﺮیﻦ ﺍﺿﺎﻓی • Using ACPI to monitor power # watch -n 1 'cat

ﺗﻤﺮیﻦ ﺍﺿﺎﻓی • Using ACPI to monitor power # watch -n 1 'cat /proc/acpi/battery/BAT 0/*‘ – This requires ACPI to be enabled. The value given is (roughly) an average over the last minute. • Alternatively, load the tp_smapi module and run the following with AC power unplugged: # watch -n 1 'cat /sys/devices/platform/smapi/BAT 0/power_now‘ or # watch -n 1 'cat /sys/devices/platform/smapi/BAT 0/power_avg' – The former provides the instantaneous power draw, and the latter is (roughly) an average over the last minute. It's OK to use tp_smapi's force_discharge function instead of physically disconnecting AC power. http: //www. thinkwiki. org/wiki/How_to_measure_power_consumption for Think. Pad laptops 36