genetic algorithms for energy efficient virtualized data ... · genetic algorithms for energy...
TRANSCRIPT
Genetic Algorithms for Energy Efficient Virtualized Data Centers
Genetic Algorithms for Energy EfficientVirtualized Data Centers
6th International DMTF Academic Alliance Workshop on Systemsand Virtualization Management: Standards and the Cloud
Helmut Hlavacs, Thomas TreutnerUniversity of Vienna, Austria
26.10.2012
1 / 40
Genetic Algorithms for Energy Efficient Virtualized Data Centers
Table of Contents
1 Scenario
2 Utilization Trace Data
3 Balanced First Fit
4 Genetic Algorithm
5 Parameters
6 Results
7 Performance Evaluation
8 Conclusions
2 / 40
Genetic Algorithms for Energy Efficient Virtualized Data Centers
Abstract
In A Nutshell• Efficiency by dynamic consolidation + workload forecasting• Heterogeneous infrastructure in terms of power, resources• Evaluation of real traces, University of Vienna Central IT Dept.• CPU traces of ≈35 VMs, 4 weeks, 2h resolution, VMware• Business infrastructure scenario: Energy costs are just one of
several parts of operational costs ⇒Use a cost model!• Cost model, configurable penalties for several cost
categories, minimize total weighted costs• Multi-objective combinatorial optimization problem• Comparison of total weighted costs: Balanced First Fit
heuristic, Genetic Algorithm, Load Balancing• Forecasting: (S)ARIMA, Holt-Winters
3 / 40
Genetic Algorithms for Energy Efficient Virtualized Data Centers
Scenario
Scenario
Scenario• Highly variable workload intensity, often periodic.• No (little?) number-crunching, its not a HPC cluster etc.• Minimize energy consumption while avoiding
under-provisioning, before reaching 100% utilization!• Queuing issues! Need resources for live migration!• Status costs:
• Energy: Linearly correlated with CPU util, future work: SPECpower• Overloads: Queuing, Bad QoS, loose revenue, non-linear,
ideally continuous function!• Reconfiguration costs:
• Live Migration: Resource intensive process• Server Boots/Shutdowns: Costs energy, puts mechanical/electrical
strain?
4 / 40
Genetic Algorithms for Energy Efficient Virtualized Data Centers
Scenario
Non-linear overload cost function
0
0.1
0.2
0.3
0.4
0.5
0.6
0.7
0.8
0.9
1
0 0.2 0.4 0.6 0.8 1
Overl
oad C
ost
Utilization
Figure: Markovian M/M/1 queue, P(T > x) = 1 − FT (x) = e−µ(1−ρ)x , ρ asCPU util, service rate µ and max response time x must be supplied
5 / 40
Genetic Algorithms for Energy Efficient Virtualized Data Centers
Scenario
Static Over-provisioning
0 0.5 1 1.5 2 2.5 3
Res
ou
rces
Time [Days]
DemandCapacity
6 / 40
Genetic Algorithms for Energy Efficient Virtualized Data Centers
Scenario
Peak-provisioning
0 0.5 1 1.5 2 2.5 3
Res
ou
rces
Time [Days]
DemandCapacity
7 / 40
Genetic Algorithms for Energy Efficient Virtualized Data Centers
Scenario
Static under-provisioning
0 0.5 1 1.5 2 2.5 3
Res
ou
rces
Time [Days]
DemandCapacity
8 / 40
Genetic Algorithms for Energy Efficient Virtualized Data Centers
Scenario
Dynamic Provisioning for Actual Demand
0 0.5 1 1.5 2 2.5 3
Res
ou
rces
Time [Days]
DemandCapacity
9 / 40
Genetic Algorithms for Energy Efficient Virtualized Data Centers
Utilization Trace Data
Diagnostic time series plot
40
06
00
80
01
00
0
Hour
!
!
!
! !
!
!
! !
!
!
!
!
!
!
!
!
!
!
!!
!!
!
!
!
!
! !
!
!
!
!
!!
!
!
!
!
!
!
!
!
!
!!
!
!
!
!
!
!
!
!
!!
!
!
! !
!
!
!!
!
!
!
!
!
!
!
!!
!
!
!
!
!
!
!
!
!
!
!!
!
!
!!
!
!
!
!
!
!
!!
!
!
!!
!
!
!
! !!
!!
!
!
!
!
!
!
! !
!
!
!
!
!
!
!!
!
!
!
!!
!
!!
!
!
!!
!
!
!
!
!
!
!
!
!
!
!!
!
!
!
! !
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!!
!
!
!
!
!
!
!
!
!
!
!! !
!
!
!
!
!
!
!
!
!
!
! !
!
!
!
!
!
!!!
!
!
!
!
!
!
!
!
!
!!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!!
!
!
!
!
!
!
!!
!
!
!
!
!
!
!
! !
!
!!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
! !
!
!
! !!
!
!
!
!
!
!!
!
!
!
!
! ! !
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!!
!!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
9pm 1am 5am 9am 1pm 5pm 10 / 40
Genetic Algorithms for Energy Efficient Virtualized Data Centers
Utilization Trace Data
Periodic, seasonal resource demand
0
200
400
600
800
1000
1200
1400
1600
1800
2000
2200
0 50 100 150 200 250 300 350
Uti
liza
tio
n [
MH
z]
Interval 11 / 40
Genetic Algorithms for Energy Efficient Virtualized Data Centers
Utilization Trace Data
Bursty resource demand
0
200
400
600
800
1000
1200
1400
0 50 100 150 200 250 300 350
Uti
liza
tio
n [
MH
z]
Interval
Figure: Diagnostic time series plot of the same trace as in Figure ??.
12 / 40
Genetic Algorithms for Energy Efficient Virtualized Data Centers
Utilization Trace Data
Complete change in resource demand
50
100
150
200
250
300
350
0 50 100 150 200 250 300 350
Uti
liza
tio
n [
MH
z]
Interval 13 / 40
Genetic Algorithms for Energy Efficient Virtualized Data Centers
Utilization Trace Data
Seasonal resource demand with a changing mean
40
60
80
100
120
140
160
180
0 50 100 150 200 250 300 350
Uti
liza
tio
n [
MH
z]
Interval
Figure: Diagnostic time series plot of the same trace as in Figure ??.
14 / 40
Genetic Algorithms for Energy Efficient Virtualized Data Centers
Balanced First Fit
Balanced First Fit
• Bin packing related heuristic, inherently inflexible• Not influencable by cost model, but evaluated by it• Needs a sorting criteria for the bins, SPECpower ssj2008 score• In a nutshell, three phases:
1 Check servers for utilizations exceeding threshold, if so,remove VMs resource-balanced until not overloaded, add VMs tohomelessVMs
2 Try to map homelessVMs beginning with most energy-efficient.Do this resource-balanced again. If still homelessVMs, force action.
3 Try to consolidate less energy-efficient servers, only if all of itsVMs can be migrated to more efficient servers, andvmConsolidationInertia reached
• Hysteresis control: Turn of servers if rmIdleTimeout reached
15 / 40
Genetic Algorithms for Energy Efficient Virtualized Data Centers
Genetic Algorithm
Genetic Algorithm
• Meta-heuristic, directly influencable by cost model• Fitness value is reciprocal to the cost of a solution• Lower cost solutions have higher survival chances• Cross-over, Mutation, Evaluation, Selection• Elitism Selection, Roulette Wheel Selection• Max number of generations, stop if quality not increasing for n
generations ⇒ Ensures good quality and runtime• Multi-threading by using demes, randomly exchanging solutions• Several mutators defined• Solution defined by mapping matrix
• Rows are servers• Columns are VMs
16 / 40
Genetic Algorithms for Energy Efficient Virtualized Data Centers
Genetic Algorithm
Genetic Algorithm: Crossover operator
Single point crossover
XFather =
1 0 0 10 1 1 00 0 0 0
;XMother =
0 1 1 00 0 0 11 0 0 0
XSon =
1 0 1 00 1 0 10 0 0 0
;XDaughter =
0 1 0 10 0 1 01 0 0 0
17 / 40
Genetic Algorithms for Energy Efficient Virtualized Data Centers
Genetic Algorithm
Genetic Algorithm: swapRM operator
Swap two rows
Xold =
1 0 0 10 1 0 00 0 1 0
Xnew =
0 1 0 01 0 0 10 0 1 0
18 / 40
Genetic Algorithms for Energy Efficient Virtualized Data Centers
Genetic Algorithm
Genetic Algorithm: swapVM operator
Swap two columns
Xold =
1 0 0 10 1 0 00 0 1 0
Xnew =
0 0 1 10 1 0 01 0 0 0
19 / 40
Genetic Algorithms for Energy Efficient Virtualized Data Centers
Genetic Algorithm
Genetic Algorithm: migrateVM operator
Migrate a VM
Xold =
1 0 0 10 1 0 00 0 1 0
Xnew =
1 1 0 10 0 0 00 0 1 0
20 / 40
Genetic Algorithms for Energy Efficient Virtualized Data Centers
Genetic Algorithm
Genetic Algorithm: consolidateRm operator
Move all “1“s to another row
Xold =
1 0 0 10 1 1 00 0 0 0
Xnew =
1 1 1 10 0 0 00 0 0 0
21 / 40
Genetic Algorithms for Energy Efficient Virtualized Data Centers
Parameters
Parameters
• 28 days of trace, first 7 reserved for forecasting, 21 for eval• Hundreds of VMs, resampled from the trace data (scaling,
memory alloc)• 26 servers, taken from SPECpower ssj2008, high diversity• Optional linear interpolation to “emulate” more frequent
measurements ⇒ VMware export limitation• Optional forecasting, GNU R, auto-model-building for each VM
in each interval to consider change in workload pattern• (S)ARIMA: Limit parameter search and data, takes very long• Use 95th upper bound as forecast, very conservative!• Non-linear overload costs: For every minute of an interval, for
every VM running on an overloaded host, multiply cost functionvalue with rmUtilizationPenalty and sum up ⇒ Penalizelong intervals, as overloads are longer or harder detectable
22 / 40
Genetic Algorithms for Energy Efficient Virtualized Data Centers
Parameters
Relevance Parameter Value
All
cpuUtilizationWarningLevel 0.6memoryUtilizationWarningLevel 0.8utilizationCostFunctionMu 10utilizationCostFunctionAllowedResponseTime 1energyPenalty 600migrationPenalty 1rmUtilizationPenalty 10bootPenalty 1shutdownPenalty 5
Load Balancing variancePenalty 100000
BFF rmIdleTimeoutSeconds 900vmConsolidationInertiaSeconds 600
GA and LB
numberOfThreads 4numberOfGenerations 200maxGenerationsOfFitnessNotIncreased 10sizeOfPopulation 800crossoverRate 0.5exchangeRate 0.1migrateVmRate 0.3swapRmRate 0.1swapVmRate 0.1elitism true
Optional Forecasting requiredPeriodsForForecasting 323 / 40
Genetic Algorithms for Energy Efficient Virtualized Data Centers
Parameters
Simulation Input Data
0
200000
400000
600000
800000
1e+06
1.2e+06
1.4e+06
1.6e+06
0 50 100 150 200 250
MH
z
Interval
VM CPU DemandRM CPU Capacity
RM CPU Warning Level Capacity
Figure: The time series of total VM CPU demand, server capacity and quotacapacity within the warning level used in the simulations. 24 / 40
Genetic Algorithms for Energy Efficient Virtualized Data Centers
Results
Total weighted costs
0
1e+06
2e+06
3e+06
4e+06
5e+06
6e+06
LB
BF
F
BF
F-H
oW
i
BF
F-A
RIM
A
GA
GA
-HoW
i
GA
-AR
IMA
LB
BF
F
BF
F-H
oW
i
BF
F-A
RIM
A
GA
GA
-HoW
i
GA
-AR
IMA
LB
BF
F
BF
F-H
oW
i
BF
F-A
RIM
A
GA
GA
-HoW
i
GA
-AR
IMA
LB
BF
F
BF
F-H
oW
i
BF
F-A
RIM
A
GA
GA
-HoW
i
GA
-AR
IMA
Co
st
EnergyMigration
Boot
ShutdownOverload
900s1800s3600s7200s
25 / 40
Genetic Algorithms for Energy Efficient Virtualized Data Centers
Results
Dynamic Provisioning
0 0.5 1 1.5 2 2.5 3
Res
ou
rces
Time [Days]
DemandCapacity
26 / 40
Genetic Algorithms for Energy Efficient Virtualized Data Centers
Results
-30
-20
-10
0
10
20
30
40
50
60
0 50 100 150 200 250 300 350 400 450 500
Ov
erp
rov
isio
nin
g [
%]
Interval
(Available-Used)/Used
Figure: Provisioning efficiency for an interval length of 3600 s and theBFF heuristic without forecasting.
27 / 40
Genetic Algorithms for Energy Efficient Virtualized Data Centers
Results
0
20
40
60
80
100
120
140
0 50 100 150 200 250 300 350 400 450 500
Ov
erp
rov
isio
nin
g [
%]
Interval
(Available-Used)/Used
Figure: Provisioning efficiency for an interval length of 3600 s and theBFF heuristic with Holt-Winters forecasting.
28 / 40
Genetic Algorithms for Energy Efficient Virtualized Data Centers
Results
0
5
10
15
20
25
30
35
40
45
50
55
0 200 400 600 800 1000 1200 1400 1600 1800 2000
Ov
erp
rov
isio
nin
g [
%]
Interval
(Available-Used)/Used
Figure: Provisioning efficiency for an interval length of 900 s and the BFFheuristic with Holt-Winters forecasting.
29 / 40
Genetic Algorithms for Energy Efficient Virtualized Data Centers
Results
Changing the overload penalty
0
100000
200000
300000
400000
500000
BF
F-H
oW
iG
A-H
oW
i
BF
F-H
oW
iG
A-H
oW
i
BF
F-H
oW
iG
A-H
oW
i
BF
F-H
oW
iG
A-H
oW
i
BF
F-H
oW
iG
A-H
oW
i
BF
F-H
oW
iG
A-H
oW
i
BF
F-H
oW
iG
A-H
oW
i
Co
st
Overload Cost
EnergyMigration
BootShutdown
Overload
1000500200100402010
30 / 40
Genetic Algorithms for Energy Efficient Virtualized Data Centers
Results
Changing the migration penalty
0 100000 200000 300000 400000 500000 600000 700000 800000 900000
BF
F-H
oW
i
GA
-HoW
i
BF
F-H
oW
i
GA
-HoW
i
BF
F-H
oW
i
GA
-HoW
i
Co
st
Migration Cost
EnergyMigration
Boot
ShutdownOverload
100501
31 / 40
Genetic Algorithms for Energy Efficient Virtualized Data Centers
Results
Changing the energy penalty
0
200000
400000
600000
800000
1e+06
1.2e+06
1.4e+06
BF
F-H
oW
i
GA
-HoW
i
BF
F-H
oW
i
GA
-HoW
i
BF
F-H
oW
i
GA
-HoW
i
Co
st
Energy Cost
EnergyMigration
Boot
ShutdownOverload
24001200600
32 / 40
Genetic Algorithms for Energy Efficient Virtualized Data Centers
Results
VM consolidation inertia, Holt-Winters forecasting
0
100000
200000
300000
400000
500000
600000
700000
800000
900000
1e+06
0 300 600 900 1800 3600 7200
Co
st
VM Consolidation Inertia [s]
EnergyMigration
BootShutdown
Overload
33 / 40
Genetic Algorithms for Energy Efficient Virtualized Data Centers
Results
VM consolidation inertia, no forecasting
0
200000
400000
600000
800000
1e+06
1.2e+06
0 300 600 900 1800 3600 7200 14400 28800
Co
st
VM Consolidation Inertia [s]
EnergyMigration
BootShutdown
Overload
34 / 40
Genetic Algorithms for Energy Efficient Virtualized Data Centers
Performance Evaluation
Performance: Hardware Platform Specification
Platform: Low Power Desktop ServerCPU AMD E-350 PhenomII X4 955 Intel Xeon E5-2670
CPU Frequency 1.6 GHz 3.2 GHz 2.6 GHzCPU Cores 2 4 8
CPU L2-Cache 2x512 KiB 4x512 KiB 8x256 KiBCPU L3-Cache N/A 6 MiB shared 20 MiB shared
CPU TDP 18 W 125 W 115 WMemory 2 GiB 16 GiB 64 GiB
Table: Description of platforms used in the performance evaluations.
35 / 40
Genetic Algorithms for Energy Efficient Virtualized Data Centers
Performance Evaluation
Balanced First Fit
0
0.5
1
1.5
2
2.5
BF
F
BF
F-H
oW
i
BF
F
BF
F-H
oW
i
Wal
ltim
e [s
]
AMD Phenom II X4AMD E-350
Figure: Runtime per interval of BFF with/without Holt-Winters forecastingon a low power CPU and a high-end desktop CPU.
36 / 40
Genetic Algorithms for Energy Efficient Virtualized Data Centers
Performance Evaluation
Genetic Algorithm
0
50
100
150
200
250
300
350
GA
GA
-Ho
Wi
GA
GA
-Ho
Wi
Wal
ltim
e [s
]
AMD Phenom II X4AMD E-350
Figure: Runtime per interval of GA with/without Holt-Winters forecastingon a low power CPU and a high-end desktop CPU.
37 / 40
Genetic Algorithms for Energy Efficient Virtualized Data Centers
Performance Evaluation
Genetic Algorithm Parallelization Speedup
0
0.5
1
1.5
2
2.5
2 3 4 5 6 7 8 9 10 11 12 13 14 15 16
Spee
dup
Numer of Cores
AMD PhenomII X4 3.2GHzDual Xeon E5-2670 2.6GHz
Figure: Speedup achieved by parallelizing the genetic algorithm.
38 / 40
Genetic Algorithms for Energy Efficient Virtualized Data Centers
Conclusions
Conclusions
• Flexible cost model feeding into a GAs fitness function• Easy adaptation to diverse optimization demands• Case study parameter sets, drastic reduction of total costs• For long intervals, forecasting is essential• Heuristics faster, but inflexible to changing parameters
(energy price, overload costs etc.)• GA can do load balancing by changing single parameter• Future Work:
• Non-linear, heterogeneous live migration costs• Heterogeneous VM overload costs (priorities)• Penalizing co-existence of VM pairs on a host (customer isolation,
performance issues, security)• Speed up GA by storing final solution of the last n intervals,
replaying them to solution population• GA multi-threading speedups?!
39 / 40
Genetic Algorithms for Energy Efficient Virtualized Data Centers
Conclusions
Q&A
Thank you for your attention!
http://www.metavisor.org was sponsored by the Internet FoundationAustria within the Netidee 2012 funding programme -
http://www.netidee.at
40 / 40