Presentation on theme: "Chapter 9 Contributed by Alex Turek"— Presentation transcript:
1 Chapter 9 Contributed by Alex Turek Power OptimizationChapter 9 Contributed by Alex Turek
2 OutlineSystem Design Considerations Power Optimization (hardware) Power Optimization (software) Constant vs. Dynamic Power in ES Advanced Configuration and Power Interface (ACPI) Constructing software for maximum power performance Summary
3 Computer System Design Considerations Cost Performance Power SizeEvery decision is a trade offGenerally, lowering power consumption has become more important than increasing performanceInitially developed for mobile platformsPower optimization is important for all platform types, from mobile devices and embedded systems to multi-million dollar servers
4 Power BasicsPower can be optimized on both the hardware and software levelsCurrent computers consist of many MOSFETs (Metal Oxide Semiconductor field Effect Transistor)
5 Active Power Consumption P = CV2fC = capacitive loadV = voltagef = FrequencyVoltage affects active power more so than the frequency or capacitive load of a circuit due to its exponential relationVoltage and frequency are first order determinants of performance
6 Power Consumption in CMOS Charging and discharging capacitorsVoltage and frequency are first order determinants of performanceShort circuit currents:Short circuit between supply rails during switchingLeakage (static power consumption)Leaking diodes and transistorsMinimizing leakage is extremely important forlow-power systems, which are not active mostof the time
7 Intel 3D TransistorIntel's 3-D Tri-Gate transistors enable chips to operate at lower voltage with lower leakage The 22nm 3-D Tri-Gate transistors provide up to 37 percent performance increase at low voltage versus Intel's 32nm planar transistors the new transistors consume less than half the power when at the same performance as 2-D planar transistors on 32nm chips.
9 Optimizing Power Using Software Power Profiles of Embedded Systems:Always on/continuous powerfor devices that are required to provide near-peak performance, nearly all the time (displays, controllers, networking devices, etc)Advanced Power Management such as Intel SpeedStep™Policy and usage based frequency and voltage controlInitially designed for laptops: plugged in vs battery modesNewer Intel CPUs such as the Core i7 series handle usage power management, where as the OS is used for policy based power managementIntel Core i7-3960X 3.3 GHz (3.9 Ghz Turbo) 6 core 12 thread
10 Reducing Power Consumption Mobile computers/devices created the need for CPUs with better power consumptionNow, CPUs are using less of the overall system power budget, manufacturers are looking for ways to improve the power consumption of other componentsThe First Step to Optimizing System PowerMaximize the range of power consumption between low-power states and high power statesIf the max/min states have negligible differences in power consumption, then power management will have no impact
11 Constant vs. Dynamic Power Constant Power: an embedded computer consumes a constant, minimum amount of power when powered on, regardless of the level of system activity Other than by powering a system down completely or transitioning to a sleep state, software cannot influence a system’s constant power Dynamic Power: power consumption based on load If most of the components in the system support low-power modes, then dynamic power consumption can be significantly controlled through the careful use of resources
12 Idle – Peak RatioRatio of Idle to Peak power consumption: estimate: 6/9 = 0.66;observed: 9/11 = 0.81 ~75% of total system power consumption is completely independent of software-level activity on the platform In comparison: Intel Core i7-3960X 3.3 GHz (3.9 Ghz Turbo) 6 core 12 thread Idle Power: 62 W;Peak Power: 210 W 62/210 = At 0% utilization, 29.5% of peak power consumedFIGURE 9.1 Advertised and Measured Dynamic Power Range for CompuLab’s fit-PC2. The Advertised Power Range Covers 66% of Peak, whereas the Measured Value, When Accounting for Active I/O Devices, Covers 81% of the Observed Peak.
13 FIGURE Top: Power Consumption and Efficiency for a System With a Dynamic Power Range Down to 50% of Peak Performance. Power is Normalized to Peak Consumption. Efficiency is Calculated by Dividing Utilization by Normalized Power.FIGURE Bottom: Power Consumption and Efficiency for a System With a Dynamic Power Range Down to 10% of Peak Performance.Goal of Power Efficiency: high efficiency over entire operating range
14 ACPIACPI: (Advanced Configuration and Power Interface): platform specific industry standard that defines the roles, responsibilities, and specific mechanisms provided to achieve reliable power management and system configuration Developed through the cooperation of HP, Intel, Microsoft, Phoenix Technologies, and Toshiba Previous interfaces replaced by ACPI such as plug-and-play BIOS and Advanced Power Management (APM) were platform and operating system specific If most of the components in the system support low-power modes, then dynamic power consumption can be significantly controlled through the careful use of resources
15 ACPI continued…The operating system is granted exclusive control over all system-level management tasks, including the boot sequence, device configuration, power management, and external event handling (such as thermal monitoring or power button presses)ACPI Registers: well defined locations that can be read andwritten to monitor and change the status of hardwareresourcesACPI BIOS: This firmware manages system boot andtransitions between sleep and active states.ACPI Tables: describe the interfaces to the underlyinghardware and represent the system description.Written in a domain specific language, ACPI MachineLanguage (AML). The operating system's ACPI driver includes an interpreter for AML.These tables are provided by the ACPI BIOS
16 Idle vs. SleepTwo dominant forms of user-facing power management Sleep States: system appears to be powered off completely, while in fact some software may periodically execute to service external events, such as network packet arrivals. First introduced with laptop use in mind Idle Modes: take advantage of the variation in system utilization when the system is powered up Transitions between idle modes are made in milliseconds to reduce active power consumption, without the involvement or awareness of the user
17 ACPI System StatesGlobal System States (Gx States) Describe the entire system Transitions between these states are typically observed by the user G0: Working G1: Sleeping (suspend or “instant boot” mode) G2 (S5): Soft Off G3: Mechanical Off
18 ACPI System States Continued Sleep States (Sx States)Sleep states within the global sleep state G1S1: All system context is maintained by hardware upon entry and thus provides the lowest waking latencyS2: Operating system is responsible for storing and restoring CPU and cache hierarchy context. Upon entry to S2, CPU and cache state are lostS3: Powers down more internal units than S2, but otherwise is similarS4: Write all system states, including main memory, to nonvolatile storageS5: Does not store system context.Enables system to be powered on electronically (Wake on LAN)
19 ACPI System States Continued Device Power States (Dx States)Device class-specific approach to power management that allows devices of the same type to be treated in the same wayDevice Classes: Audio, COM Port, Display, Input, Modem, Network, PC Card Controller, StorageD0 (Fully On): fully powered up, fully operational state. Highest Power ConsumptionD1: Initial sleep state for a device. Capable of waking itself or the entire system in response to an external eventD2: Incremental state beyond D1. Operates at a lower power and requires a greater waking latency than D1D3hot: Saves a device-specific state so it can be awakened without a complete rebootD3 (Off, or d3cold): Complete power down of the device. Device context not restorable
20 ACPI System States Continued Processor Power States (Cx States)ACPI allows processors to sleep while in the G0 working state. The Cx States only apply when the global state is G0.C0: The processor executes instructions and operates normallyC1: Lowest transition latency CPU sleep state. Latency is so low that it is negligible and thus not a deciding factor in the operating system’s decision to transition to this state.C2: Lower-power sleep state than C1. Operating system does consider the transition latency when deciding whether to transition to this state or another.Transitions to both C1 and C2 are not apparent to software and do not alter system operation.C3: Offers great power reduction at the cost of an increased transition latency. Processor caches maintain their state but do not emit cache coherence trafficC4: Optional additional power states included in ACPI revision Even lower power consumption and greater transition latency. Vendor specific.
21 ACPI System States Continued Processor Performance States (Px States)Within processor power state C0, ACPI defines a range of performance states that are intended to enable a fully working system to vary its power consumption and performance by operating at different voltage and frequency levels. The operating system explicitly controls transitions between these states. For multiprocessor systems, each processor must support the same number and type of processor performance state.P0: Maximum performance, maximum power consumption state.P1: Next highest performing processor performance state and is expected to have second-greatest power consumptionPn: ACPI allows for a maximum of 16 distinct performance states.
22 More on Intel SpeedStep Technology Features performance and power management through voltage and frequency control, thermal monitoring, and thermal management featuresProvides a central software control mechanism through which the processor can manage different operating pointsIn a FSB-based system, processors drive seven output voltage identification (VID) pins to facilitate automatic selection of processor voltages VCC from the motherboard voltage regulatorEach core in a multi-core has its own machine state register (MSR) to control the VID value. However, each core must work at the same voltage and frequency.
23 Software Construction for Maximum Power Performance Linux PowerTOP ToolOpen-source power profiling tool for Linux that reports the occupation frequency of processor sleep and performance statesRace to SleepModern systems transition between power states in response to loadSoftware should be organized to complete all available useful work in a continuous batch and then transition to an idle state and avoid unnecessary interruptionsTraditional software development tools emphasize code execution frequency.Modern software dev tools must also take into account how often a program interferes with transitions to low-power CPU states
24 Evaluating Software and Systems with PowerTOP PowerTOP can be used to measure and improve performance of code as it is writtenThe measurement harness is implemented in Python. To begin, the developer identifies the target code for measurement, referred to as the code-under-test (CUT)Basic Operation of the Measurement HarnessPhase 1. Discover the maximum rate of execution of the CUTPhase 2. Measure the power efficiency at the maximum execution ratePhase 3. Measure the power efficiency as execution rate is scaled down from maximumTwo key parameters manipulated in Phase 3:- total fraction of “sleep” time during the experimental observational period- duration of an individual sleep interval
25 Concluding RemarksSystem Design Considerations – “Everything’s a tradeoff”Active Power Consumption – P = CV2fIdle vs. Peak Ratio – decreasing constant power consumption is most favorableAdvanced Configuration and Power Interface(ACPI) – Standard developed by the industry to provide universal power managementSoftware techniques for measuring and managing power consumption – race to sleep
Your consent to our cookies if you continue to use this website.