Energy Management in Virtualized Environments Gaurav Dhiman, Giacomo Marchetti, Raid Ayoub, Tajana...

1
Energy Management in Virtualized Energy Management in Virtualized Environments Environments Gaurav Dhiman, Giacomo Marchetti, Raid Ayoub, Tajana Simunic Rosing (CSE-UCSD) Gaurav Dhiman, Giacomo Marchetti, Raid Ayoub, Tajana Simunic Rosing (CSE-UCSD) Inside Xen Hypervisor Inside Xen Hypervisor Online Learning Algorithm Online Learning Algorithm Virtualization Virtualization DPM DPM Performs dynamic evaluation of a set of DPM and Performs dynamic evaluation of a set of DPM and DVFS policies DVFS policies at run time and selects the best suited for at run time and selects the best suited for the current workload the current workload Guarantees convergence and performance close to Guarantees convergence and performance close to that of the best that of the best available policy in the set available policy in the set OS implementation and OS implementation and Results Results Summary Summary Hypervisor VM scheduler Hypervisor VM scheduler implementation implementation Power Management: Power Management: DPM/DVFS DPM/DVFS Workload Workload characterization aware characterization aware Adaptive Behavior Adaptive Behavior Motivations and Goals Motivations and Goals Lower datacenter energy Lower datacenter energy consumption consumption Handle non-stationary Handle non-stationary workloads workloads Service - VM - Customization Service - VM - Customization Energy Oriented Energy Oriented Scheduler Scheduler - Implements a scheduler Implements a scheduler capable of adapting to capable of adapting to workload (guest) workload (guest) characteristics characteristics - Migration: Guest balancing Migration: Guest balancing and clustering and clustering - Co-locate guests to free up Co-locate guests to free up resources resources - Online Learning Algorithm Online Learning Algorithm Supported by Supported by NSF-GreenLight project, CNS, Sun Microsystems, UC NSF-GreenLight project, CNS, Sun Microsystems, UC Micro, Cisco, Micro, Cisco, GSRC/DARPA GSRC/DARPA CPU0 CPU0 CPU1 CPU1 N/W N/W CPU2 CPU2 CPUn CPUn HDD HDD Hypervisor Hypervisor Guest n Guest n I/O I/O CPUs CPUs Hardware Hardware I/O Intensive? I/O Intensive? CPU Intensive? CPU Intensive? Guest 1 Guest 1 Guest 2 Guest 2 Apps Apps OS OS Apps Apps OS OS Apps Apps OS OS Credit Credit Scheduler Scheduler Workload Workload Characterizat Characterizat ion ion Online Online Learning Learning Algorithm Algorithm VM Scheduling VM Scheduling Virtual Machine Power Oriented Virtual Machine Power Oriented Scheduling Scheduling Workload migration across Workload migration across physical machine physical machine Minimize impact on performance Minimize impact on performance Workload Workload characterization characterization - - I/O I/O Intensiveness: Maintain Intensiveness: Maintain metrics metrics for I/O accesses for I/O accesses per guest per guest - - CPU CPU Intensiveness: Intensiveness: Use CPU Use CPU performance performance counters counters CPU intensive (µ ->1) vs Memory CPU intensive (µ ->1) vs Memory intensive (µ -> 0) intensive (µ -> 0) µ = measure of CPU intensiveness µ = measure of CPU intensiveness Leakage impact ( Leakage impact ( ρ ρ ) ) DVFS DVFS For qsort For qsort 0 10 20 30 40 50 60 70 80 208M Hz 312M Hz 416M Hz 520M Hz Frequency ofSelection low α m edium α high α Highe Highe r r energ energ y y savin savin gs gs Lowe Lowe r r Perf Perf Dela Dela y y Identifies both CPU- Identifies both CPU- intensive and intensive and memory intensive phases memory intensive phases correctly correctly Avg. Avg. μ μ time time 0.7 5 0. 4 25% 25% 75% 75% CPU CPU intensive intensive mem mem intensive intensive Energy Saving/Performance Delay Energy Saving/Performance Delay Results for CPU Results for CPU Experimental Setup Experimental Setup Workloads: Workloads: qsort, djpeg, qsort, djpeg, blowfish, dgzip blowfish, dgzip CPU Xscale CPU Xscale Controller Controller Working Set Working Set Device Device : : Dormant Experts Dormant Experts Expert selection Expert selection : : Operational Expert Operational Expert Manages Power Manages Power Expert 1 Expert 1 Expert 2 Expert 2 Expert N Expert N Expert 3 Expert 3 DPM & DVFS DPM & DVFS Experimental Setup Experimental Setup AMD quad core CPU AMD quad core CPU SPEC benchmarks SPEC benchmarks Benchmark Benchmark Freq Freq %delay %delay %Energy %Energy savingsPM-i savingsPM-i PM-1 PM-1 PM-2 PM-2 PM-3 PM-3 mcf mcf 1.9 1.9 29 29 5.2 5.2 0.7 0.7 -0.5 -0.5 1.4 1.4 63 63 8.1 8.1 0.1 0.1 -2.1 -2.1 0.8 0.8 163 163 8.1 8.1 -6.3 -6.3 -10.7 -10.7 bzip2 bzip2 1.9 1.9 37 37 4.7 4.7 -0.6 -0.6 -2.1 -2.1 1.4 1.4 86 86 7.4 7.4 -2.4 -2.4 -5 -5 0.8 0.8 223 223 7.8 7.8 -9.0 -9.0 -14 -14 art art 1.9 1.9 32 32 6 1 -0.1 -0.1 1.4 1.4 76 76 7.3 7.3 -1.7 -1.7 -4 -4 0.8 0.8 202 202 8 -8 -8 -13 -13 sixtrack sixtrack 1.9 1.9 37 37 5 -0.5 -0.5 -2 -2 1.4 1.4 86 86 6 -4.3 -4.3 -7.2 -7.2 0.8 0.8 227 227 7 -11 -11 -16.1 -16.1 Device Device Trace Name Trace Name t tRI RI σ σ t tRI RI HDD HDD HP-1Trace HP-1Trace 20.5 20.5 29 29 HP-2 Trace HP-2 Trace 5.9 5.9 8.4 8.4 HP-3 Trace HP-3 Trace 17.2 17.2 2 t tRI RI : Average Request Inter-arrival Time (in : Average Request Inter-arrival Time (in sec) sec) Expert Expert Characteristics Characteristics Fixed Timeout Fixed Timeout Timeout = 7*T Timeout = 7*T be be Adaptive Timeout Adaptive Timeout (Douglis, USENIX’95) (Douglis, USENIX’95) Initial timeout = 7*T Initial timeout = 7*T be be ; Adjustment = +1T Adjustment = +1T be be /-1T /-1T be be Exponential Predictive Exponential Predictive (Hwang, ICCAD’97) (Hwang, ICCAD’97) I n+l n+l = = a a i n + (1 + (1 – a – a ).I ).I n with a = 0.5 with a = 0.5 TISMDP TISMDP (Simunic, TCAD’01) (Simunic, TCAD’01) Optimized for delay constraint Optimized for delay constraint of 3.5% on HP-1 trace of 3.5% on HP-1 trace Policy Policy Description Description PM-1 PM-1 switch CPU to ACPI state C1 (remove clock supply) and move to switch CPU to ACPI state C1 (remove clock supply) and move to lowest voltage setting lowest voltage setting PM-2 PM-2 switch CPU to ACPI state C6 (remove power) switch CPU to ACPI state C6 (remove power) PM-3 PM-3 switch CPU to ACPI state C6 and switch the memory to self- switch CPU to ACPI state C6 and switch the memory to self- refresh mode refresh mode Policy Policy HP1 Trace HP1 Trace HP2 Trace HP2 Trace HP3 Trace HP3 Trace %delay %delay %energy %energy %delay %delay %energy %energy %delay %delay %energ %energ y Oracle Oracle 0 68.17 68.17 0 65.9 65.9 0 71.2 71.2 Timeout Timeout 4.2 4.2 49.9 49.9 4.4 4.4 46.9 46.9 3.3 3.3 55 55 Ad Timeout Ad Timeout 7.7 7.7 66.3 66.3 8.7 8.7 64.7 64.7 6 67.7 67.7 TISMDP TISMDP 3.4 3.4 44.8 44.8 2.26 2.26 36.7 36.7 1.8 1.8 42.3 42.3 Predictive Predictive 8 66.6 66.6 9.2 9.2 65.2 65.2 6.5 6.5 68 68 Preferenc Preferenc e HP-1 Trace HP-1 Trace HP-2 Trace HP-2 Trace HP-3 Trace HP-3 Trace %delay %delay %energy %energy %dela %dela y %energy %energy %delay %delay %energy %energy Low delay Low delay I I V V High High energy energy savings savings 3.5 3.5 45 45 2.61 2.61 37.41 37.41 2.55 2.55 49.5 49.5 6.13 6.13 60.64 60.64 5.86 5.86 54.2 54.2 4.36 4.36 61.02 61.02 7.68 7.68 65.5 65.5 8.59 8.59 64.1 64.1 5.69 5.69 66.28 66.28 DPM: With Individual Experts DPM: With Individual Experts DPM: With Online DPM: With Online Learning Learning Recent CPUs might perform better with a “run to Recent CPUs might perform better with a “run to sleep” policy sleep” policy due to: due to: Improved CPU efficiency Improved CPU efficiency Idle power management support Idle power management support Power/Performance Results for HDD HP-1 trace Power/Performance Results for HDD HP-1 trace Comparison with fixed timeout experts Comparison with fixed timeout experts

Transcript of Energy Management in Virtualized Environments Gaurav Dhiman, Giacomo Marchetti, Raid Ayoub, Tajana...

Page 1: Energy Management in Virtualized Environments Gaurav Dhiman, Giacomo Marchetti, Raid Ayoub, Tajana Simunic Rosing (CSE-UCSD) Inside Xen Hypervisor Online.

Energy Management in Virtualized EnvironmentsEnergy Management in Virtualized Environments Gaurav Dhiman, Giacomo Marchetti, Raid Ayoub, Tajana Simunic Rosing (CSE-UCSD) Gaurav Dhiman, Giacomo Marchetti, Raid Ayoub, Tajana Simunic Rosing (CSE-UCSD)

Inside Xen HypervisorInside Xen HypervisorInside Xen HypervisorInside Xen Hypervisor

Online Learning AlgorithmOnline Learning AlgorithmOnline Learning AlgorithmOnline Learning Algorithm

Vir

tuali

zati

on

V

irtu

ali

zati

on

DPM DPM DPM DPM

Performs dynamic evaluation of a set of DPM and DVFS Performs dynamic evaluation of a set of DPM and DVFS policies policies

at run time and selects the best suited for the current at run time and selects the best suited for the current workload workload

Guarantees convergence and performance close to that Guarantees convergence and performance close to that of the best of the best

available policy in the set available policy in the set

OS

im

ple

men

tati

on

an

d

OS

im

ple

men

tati

on

an

d

Resu

lts

Resu

lts

SummarySummary Hypervisor VM scheduler Hypervisor VM scheduler

implementation implementation Power Management: Power Management:

DPM/DVFSDPM/DVFS Workload characterization Workload characterization

aware aware Adaptive BehaviorAdaptive Behavior

Motivations and Goals Motivations and Goals Motivations and Goals Motivations and Goals

Lower datacenter energy Lower datacenter energy consumption consumption

Handle non-stationary Handle non-stationary workloads workloads

Service - VM - Customization Service - VM - Customization

Energy Oriented Energy Oriented

SchedulerScheduler - Implements a schedulerImplements a scheduler capable capable

of adapting to workload (guest) of adapting to workload (guest)

characteristicscharacteristics- Migration: Guest balancing and Migration: Guest balancing and

clustering clustering - Co-locate guests to free up Co-locate guests to free up

resourcesresources- Online Learning Algorithm Online Learning Algorithm

Supported by Supported by NSF-GreenLight project, CNS, Sun Microsystems, UC Micro, NSF-GreenLight project, CNS, Sun Microsystems, UC Micro, Cisco, Cisco, GSRC/DARPAGSRC/DARPA

CPU0CPU0CPU0CPU0 CPU1CPU1CPU1CPU1N/WN/WN/WN/W CPU2CPU2CPU2CPU2 CPUnCPUnCPUnCPUnHDDHDDHDDHDD

HypervisorHypervisor HypervisorHypervisor

Guest nGuest nGuest nGuest n

I/OI/O CPUsCPUs

HardwareHardware

I/O Intensive?I/O Intensive? CPU Intensive?CPU Intensive?

Guest 1Guest 1Guest 1Guest 1 Guest 2Guest 2Guest 2Guest 2

AppsAppsAppsApps

OSOSOSOS

AppsAppsAppsApps

OSOSOSOS

AppsAppsAppsApps

OSOSOSOS

Credit Credit SchedulerScheduler

Credit Credit SchedulerScheduler

Workload Workload Characterization Characterization

Workload Workload Characterization Characterization

Online Learning Online Learning AlgorithmAlgorithm

Online Learning Online Learning AlgorithmAlgorithm

VM SchedulingVM SchedulingVM SchedulingVM Scheduling

Virtual Machine Power Oriented Virtual Machine Power Oriented Scheduling Scheduling

Workload migration across Workload migration across physical machinephysical machine

Minimize impact on performanceMinimize impact on performance

Workload Workload characterizationcharacterization

- - I/O Intensiveness: I/O Intensiveness: Maintain metrics Maintain metrics

for I/O accesses per guestfor I/O accesses per guest -- CPU Intensiveness: CPU Intensiveness: Use Use

CPU CPU performance countersperformance counters

CPU intensive (µ ->1) vs Memory intensive (µ CPU intensive (µ ->1) vs Memory intensive (µ -> 0)-> 0)

µ = measure of CPU intensivenessµ = measure of CPU intensiveness Leakage impact (Leakage impact (ρρ))

DVFSDVFSDVFSDVFS

For qsortFor qsort

0

10

20

30

40

50

60

70

80

208MHz 312MHz 416MHz 520MHz

Fre

qu

ency

of

Sel

ecti

on

low α

medium α

high α

Higher Higher energy energy savingssavings

Lower Lower Perf Perf DelayDelay

Identifies both CPU-intensive and Identifies both CPU-intensive and memory intensive phases correctlymemory intensive phases correctly

Avg. μAvg. μ

timetime

0.75

0.4

25%25%

75%75%

CPU intensiveCPU intensive

mem intensivemem intensive

Energy Saving/Performance Delay Energy Saving/Performance Delay Results for CPUResults for CPU

Experimental SetupExperimental Setup Workloads: Workloads: qsort, djpeg, blowfish, dgzipqsort, djpeg, blowfish, dgzip CPU XscaleCPU Xscale

ControllerController

Working SetWorking Set

DeviceDevice

::Dormant ExpertsDormant Experts

Expert selectionExpert selection

::Operational ExpertOperational Expert

Manages PowerManages Power

Expert 1Expert 1Expert 1Expert 1 Expert 2Expert 2Expert 2Expert 2 Expert NExpert NExpert NExpert NExpert 3Expert 3Expert 3Expert 3

DPM & DVFSDPM & DVFS DPM & DVFSDPM & DVFS Experimental SetupExperimental Setup AMD quad core CPUAMD quad core CPU SPEC benchmarksSPEC benchmarks

BenchmarkBenchmark FreqFreq %delay%delay%Energy%EnergysavingsPM-isavingsPM-i

PM-1PM-1 PM-2PM-2 PM-3PM-3

mcfmcf

1.91.9 2929 5.25.2 0.70.7 -0.5-0.5

1.41.4 6363 8.18.1 0.10.1 -2.1-2.1

0.80.8 163163 8.18.1 -6.3-6.3 -10.7-10.7

bzip2bzip2

1.91.9 3737 4.74.7 -0.6-0.6 -2.1-2.1

1.41.4 8686 7.47.4 -2.4-2.4 -5-5

0.80.8 223223 7.87.8 -9.0-9.0 -14-14

artart

1.91.9 3232 66 11 -0.1-0.1

1.41.4 7676 7.37.3 -1.7-1.7 -4-4

0.80.8 202202 88 -8-8 -13-13

sixtracksixtrack

1.91.9 3737 55 -0.5-0.5 -2-2

1.41.4 8686 66 -4.3-4.3 -7.2-7.2

0.80.8 227227 77 -11-11 -16.1-16.1

DeviceDevice Trace NameTrace Name ttRIRI σσ ttRIRI

HDDHDD HP-1TraceHP-1Trace 20.520.5 2929

HP-2 TraceHP-2 Trace 5.95.9 8.48.4

HP-3 TraceHP-3 Trace 17.217.2 22

ttRIRI : Average Request Inter-arrival Time (in sec) : Average Request Inter-arrival Time (in sec)

ExpertExpert CharacteristicsCharacteristics

Fixed TimeoutFixed Timeout Timeout = 7*TTimeout = 7*Tbebe

Adaptive TimeoutAdaptive Timeout(Douglis, USENIX’95)(Douglis, USENIX’95)

Initial timeout = 7*TInitial timeout = 7*Tbebe;;

Adjustment = +1TAdjustment = +1Tbebe/-1T/-1T

bebe

Exponential PredictiveExponential Predictive(Hwang, ICCAD’97)(Hwang, ICCAD’97)

IIn+ln+l = = a a iinn + (1+ (1 – a– a).I).Innwith a = 0.5with a = 0.5

TISMDPTISMDP(Simunic, TCAD’01)(Simunic, TCAD’01)

Optimized for delay constraint of 3.5% on Optimized for delay constraint of 3.5% on HP-1 traceHP-1 trace

PolicyPolicy DescriptionDescription

PM-1PM-1 switch CPU to ACPI state C1 (remove clock supply) and move to lowest voltage setting switch CPU to ACPI state C1 (remove clock supply) and move to lowest voltage setting

PM-2PM-2 switch CPU to ACPI state C6 (remove power)switch CPU to ACPI state C6 (remove power)

PM-3PM-3 switch CPU to ACPI state C6 and switch the memory to self- refresh mode switch CPU to ACPI state C6 and switch the memory to self- refresh mode

PolicyPolicy HP1 TraceHP1 Trace HP2 TraceHP2 Trace HP3 TraceHP3 Trace

%delay%delay %energy%energy %delay%delay %energy%energy %delay%delay %energy%energy

OracleOracle 00 68.1768.17 00 65.965.9 00 71.271.2

TimeoutTimeout 4.24.2 49.949.9 4.44.4 46.946.9 3.33.3 5555

Ad TimeoutAd Timeout 7.77.7 66.366.3 8.78.7 64.764.7 66 67.767.7

TISMDPTISMDP 3.43.4 44.844.8 2.262.26 36.736.7 1.81.8 42.342.3

PredictivePredictive 88 66.666.6 9.29.2 65.265.2 6.56.5 6868

PreferencePreference HP-1 TraceHP-1 Trace HP-2 TraceHP-2 Trace HP-3 TraceHP-3 Trace

%delay%delay %energy%energy %delay%delay %energy%energy %delay%delay %energy%energy

Low delayLow delay

IIVV

High energyHigh energysavingssavings

3.53.5 4545 2.612.61 37.4137.41 2.552.55 49.549.5

6.136.13 60.6460.64 5.865.86 54.254.2 4.364.36 61.0261.02

7.687.68 65.565.5 8.598.59 64.164.1 5.695.69 66.2866.28

DPM: With Individual ExpertsDPM: With Individual Experts

DPM: With Online LearningDPM: With Online Learning

Recent CPUs might perform better with a “run to sleep” Recent CPUs might perform better with a “run to sleep” policypolicy due to:due to:

Improved CPU efficiencyImproved CPU efficiency Idle power management supportIdle power management support

Power/Performance Results for HDD HP-1 tracePower/Performance Results for HDD HP-1 traceComparison with fixed timeout expertsComparison with fixed timeout experts