Runtime Software Power Estimation and Minimization Tao Li
Power-aware Computing
Power: Software Perspective & Impact Power estimation: the first step to power management & optimization Software contributes to & largely impacts power consumption
It is crucial to model power from the perspective of software Evaluate software energy in early design stage Understand impact of software optimizations on energy Support run-time power management and optimizations Power: Software Perspective & Impact (Contd.)
Instruction level modeling Computation intensive High level macro-modeling Difficult to apply to general code Event counting based modeling Impacted by the availability of performance counters Architecture level simulation Large slowdown Software Power Estimation: Current Techniques
Challenges in Run-time Power Estimation High fidelity & fast speed On-the-fly estimation capability, non- intrusive & low overhead Simplicity, availability and generality
Experimental Methodology SoftWatt: cycle-accurate & full-system power simulation framework SimOS infrastructure, Wattch power model Commercial OS & real applications Out-of-order superscalar processor Caches & memory hierarchy Low-power disk
Experimental Methodology (Contd.) Applications and file management (sendmail, fileman) Java (SPECjvm98: db, jess, javac, jack, mtrt, compress) SPECInt95 (gcc, vortex) Database (Postgres: select, update, join) Miscellaneous (pmake, osboot)
OS Power Characterization OS power varies from one application to another 29 Watt (gcc) ~ 66 Watt (fileman) Variance of power consumption in OS service routines & invocations
OS Power Characterization (Contd.) OS routine power correlates with its performance Circuits used to exploit ILP burn significant portion of power The number of in-flight instructions that flow through impacts circuit switching activity For a given OS routine, similar IPC indicates similar circuit switching activity and therefore, similar power
OS Routine Power-Performance Correlation SCSI Disk Interrupt Handler Read File System Call
Routine Level OS Power Model Idea: use a linear regression model P routine =k 1 *IPC routine +k 0 to track the OS routine power showing different performance Energy(OS)= Sum [ Energy(OS routines) ] = Sum [ Power(OS routines)*Time(OS routines) ]
Routine Level OS Power Model (Contd.) : Model Fitting Error
Pre-characterization Low level energy simulation Model fitting Run-time estimation OS routine boundaries Evaluation using counter values Routine Level OS Power Modeling
Routine based Regression Model P routine =k 1 *IPC routine +k 0 Flat Regression Model P OS =g 1 *IPC OS +g 0 Cumulative Estimation Error
Flat Regression Model P OS =g 1 *IPC OS +g 0 Per-routine Estimation Error
Routine based Regression Model P routine =k 1 *IPC routine +k 0 Per-routine Estimation Error (Contd.)
OS Energy Dissipation 92% 89%
Phases in Programs (8-issue machine) Benchmark: SPECjvm98 jess Resources are utilized differently during different phases of program execution Average IPC - User: 2.1, OS: 1.1
Power Minimization via Processor Resource Adaptations Adapt processor resources to program needs What can be adapted? Bandwidth of fetch/decode/issue/retire… Size of instruction window, re-order buffer, load store queue… Reduce power, retain performance
Effects of Tuning Processor Resource for the OS 8-issue -> 4-issue OS Performance degradation: 4% OS Power savings: 50%
Previous Approach for Adaptations Sampling Cycles Sampling Window IPC (Inst. Per Cycle) Adaptation ABCDEF
Problems with Sampling based Adaptations (Contd.) OS executions Short-lived
OS-aware Routine based Adaptations OS-aware: Identify OS executions via processor execution modes Just-in-time & full coverage of OS activities Routine-based: Adapt processor resources at OS routine boundaries Precise exceptions: drained pipeline Achieve minimum adaptation overhead
OS-aware Routine based Adaptations (Contd.) Apply optimal adaptation for individual OS routine Exploit the routine level Energy-Delay Product variance OS Services
Routine based Adaptations: OS Power
OS Performance
OS Power & Performance Tradeoff