29
Green Computing Power Management Standards Maziar Goudarzi

Green Computing Power Management Standards Maziar Goudarzi

Embed Size (px)

Citation preview

Page 1: Green Computing Power Management Standards Maziar Goudarzi

Green ComputingPower Management

Standards

Maziar Goudarzi

Page 2: Green Computing Power Management Standards Maziar Goudarzi

2

Outline

AcknowledgementsSome slides/parts fromhttp://impact.asu.edu/cse591sp11/PowerState1_BL_MP.pptxand http://www.ida.liu.se/~TDDD50/

• APM: Advanced Power Management• ACPI: Advanced Configuration and Power

Interface

Page 3: Green Computing Power Management Standards Maziar Goudarzi

3

APM:Advanced Power Management

• API by intel & Microsoft in 1992• OS – BIOS (firmware) communication & work• Main drawback

– BIOS-based– Standard

Page 4: Green Computing Power Management Standards Maziar Goudarzi

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.

Page 5: Green Computing Power Management Standards Maziar Goudarzi

Advanced Configuration and Power Management

6

Page 6: Green Computing Power Management Standards Maziar Goudarzi

7

Overview

• ACPI definitions

• Energy efficiency through better control of ACPI power states

• A few Examples on power savings using ACPI

Page 7: Green Computing Power Management Standards Maziar Goudarzi

8

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……

Page 8: Green Computing Power Management Standards Maziar Goudarzi

9

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

Page 9: Green Computing Power Management Standards Maziar Goudarzi

10

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

Page 10: Green Computing Power Management Standards Maziar Goudarzi

11

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

Page 11: Green Computing Power Management Standards Maziar Goudarzi

12

ACPI- Global States

• Global states are applied to the entire system and are visible to the User:

G0: Working stateG1: Sleeping State or Standby. G2: Soft Off. G3: Mechanical Off.

Page 12: Green Computing Power Management Standards Maziar Goudarzi

13

ACPI Global System State

• System context– Software loaded in memory and state of devices

• G0 and G1 keep the context• G2 and G3 only keep the context if sleeping state S4 is used

– S4 saves context in non volatile memory

Page 13: Green Computing Power Management Standards Maziar Goudarzi

14

ACPI Sleeping States

• Sleeping states within global system sleeping state G1

Page 14: Green Computing Power Management Standards Maziar Goudarzi

15

ACPI Sleeping States

• S states – affect the whole system– S0 – working– S1 – processor stops, idle hardware powered down– S2 – CPU, Caches powered off– S3 – Standby/Sleep, Suspend to RAM– S4 – Hibernate, Suspend to Disk– S5 – Soft Off

Page 15: Green Computing Power Management Standards Maziar Goudarzi

16

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– D0 – fully on– D1, D2 – intermediate states– D3 – powered off

Page 16: Green Computing Power Management Standards Maziar Goudarzi

17

ACPI Device Power States

• D1 and D2 optional• D1, D2, and D3hot defined by each device class

Page 17: Green Computing Power Management Standards Maziar Goudarzi

18

ACPI CPU Power States

• Power consumption and thermal management states– Within global working state G0

• Latency– C1 must be as low as not considered– C2 and C3 must report latency via ACPI firmware– OSPM can decide if it is worth to switch

Page 18: Green Computing Power Management Standards Maziar Goudarzi

19

ACPI Power States- CPU

• C state – CPU state– C0 – working– C1 – halted, not executing instructions– C2 – clock stopped– C3 – sleep

Page 19: Green Computing Power Management Standards Maziar Goudarzi

20

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.

– P0 – full speed, frequency, voltage, etc– P1 – slower than P0– …– Pn – up to 15

Page 20: Green Computing Power Management Standards Maziar Goudarzi

21

Main view of power states

The image belongs to the ACPI 4.0a specification

Page 21: Green Computing Power Management Standards Maziar Goudarzi
Page 22: Green Computing Power Management Standards Maziar Goudarzi

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

• Power efficiency of P states is not linear

– Example (not realistic for simplicity):• P0 is 2MHz and uses 30 watts• P1 is 1MHz and uses 20 watts• 10000 cycles of work to be done:

– P0 power usage = 10000 / 2MHz * 30 watts = .15 watt seconds– P1 power usage = 10000 / 1MHz * 20 watts = .20 watt seconds

• Use P0 state to complete the work and return to idle sooner• Known as “race to idle”.• Race to idle > Other P states

Page 23: Green Computing Power Management Standards Maziar Goudarzi

24

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 C0 to C1 transitions, hundreds of times

per second.

• Option 2 : C0 to C2 transitions.– Power required is less but wake up time is more.

Page 24: Green Computing Power Management Standards Maziar Goudarzi

25

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 C0 from any other state?

• Can server load prediction be used to choose C states more effectively?

Page 25: Green Computing Power Management Standards Maziar Goudarzi

26

Research(-like) questionsD 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?

Page 26: Green Computing Power Management Standards Maziar Goudarzi

27

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

Page 27: Green Computing Power Management Standards Maziar Goudarzi

34

Summary

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

Page 28: Green Computing Power Management Standards Maziar Goudarzi

35

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/

acpi_howto.txt

Page 29: Green Computing Power Management Standards Maziar Goudarzi

36

تمرین اضافی• Using ACPI to monitor power

# watch -n1 'cat /proc/acpi/battery/BAT0/*‘– 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 -n1 'cat /sys/devices/platform/smapi/BAT0/power_now‘

or # watch -n1 'cat /sys/devices/platform/smapi/BAT0/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 ThinkPad laptops