21
http://fhermeni.github.io Fabien Hermenier A flexible VM placement algorithm for IaaS clouds

A flexible VM placement algorithm for IaaS clouds · adapt the VM placement depending on pluggable expectations network and memory-aware migration scheduler, VM-(VM|PM) affinities,

  • Upload
    others

  • View
    1

  • Download
    0

Embed Size (px)

Citation preview

Page 1: A flexible VM placement algorithm for IaaS clouds · adapt the VM placement depending on pluggable expectations network and memory-aware migration scheduler, VM-(VM|PM) affinities,

http://fhermeni.github.ioFabien Hermenier

A flexible VM placement algorithm for IaaS clouds

Page 2: A flexible VM placement algorithm for IaaS clouds · adapt the VM placement depending on pluggable expectations network and memory-aware migration scheduler, VM-(VM|PM) affinities,

monitoring data

VM queue

actu

ator

sVM scheduler

model

decisions

Page 3: A flexible VM placement algorithm for IaaS clouds · adapt the VM placement depending on pluggable expectations network and memory-aware migration scheduler, VM-(VM|PM) affinities,

VM-host affinity (DRS 4.1)

Dedicated instances (EC2)

MaxVMsPerServer (DRS 5.1)

apr. 2011

mar. 2011

sep. 2012

The constraint needed in 2014

2016

VM-VM affinity (DRS)

2010 ?

Dynamic Power Management (DRS 3.1)

2009 ?

SLOs and infrastructures evolve

Page 4: A flexible VM placement algorithm for IaaS clouds · adapt the VM placement depending on pluggable expectations network and memory-aware migration scheduler, VM-(VM|PM) affinities,

adapt the VM placement depending on pluggable expectations

network and memory-aware migration scheduler, VM-(VM|PM) affinities, resource matchmaking, node state manipulation, counter based restrictions, energy efficiency, discrete or continuous restrictions

Page 5: A flexible VM placement algorithm for IaaS clouds · adapt the VM placement depending on pluggable expectations network and memory-aware migration scheduler, VM-(VM|PM) affinities,

spread(VM[2..3]); preserve(VM1,’cpu’, 3); offline(@N4);

0’00to0’02:relocate(VM2,N2)0’00to0’04:relocate(VM6,N2)0’02to0’05:relocate(VM4,N1)0’04to0’08:shutdown(N4)0’05to0’06:allocate(VM1,‘cpu’,3)

The reconfiguration plan

BtrPlace

Page 6: A flexible VM placement algorithm for IaaS clouds · adapt the VM placement depending on pluggable expectations network and memory-aware migration scheduler, VM-(VM|PM) affinities,

the right model for the right problem

deterministic composition high-level constraints

An Open-Source java library for constraint programming

Page 7: A flexible VM placement algorithm for IaaS clouds · adapt the VM placement depending on pluggable expectations network and memory-aware migration scheduler, VM-(VM|PM) affinities,

BtrPlace CSPmodels a reconfiguration plan

1 transition model per element pre-defined variables as hooks

D(v) ∈ N

st(v) = [0, H −D(v)]ed(v) = st(v) +D(v)d(v) = ed(v)− st(v)d(v) = D(v)ed(v) < H

d(v) < H

h(v) ∈ {0, .., |N |− 1}

boot(v ∈ V ) !

relocatable(v ∈ V ) ! . . .

shutdown(v ∈ V ) ! . . .

suspend(v ∈ V ) ! . . .

resume(v ∈ V ) ! . . .

kill(v ∈ V ) ! . . .

bootable(n ∈ N) ! . . .

haltable(n ∈ N) ! . . .

spread(vs ⊆ vms) !i, j ∈ vs, i ̸= j, host(i) ̸= host(j)

spread(vs ⊆ vms) !i, j ∈ vs, i ̸= j, host(i) ̸= host(j)

Page 8: A flexible VM placement algorithm for IaaS clouds · adapt the VM placement depending on pluggable expectations network and memory-aware migration scheduler, VM-(VM|PM) affinities,

spread({VM3,VM2,VM8}); lonely({VM7}); preserve({VM1},’ucpu’, 3); offline(@N6); ban($ALL_VMS,@N8); fence(VM[1..7],@N[1..4]); fence(VM[8..12],@N[5..8]);

local search to focus on supposed mis-placed VMs

Static analysis for performance

Page 9: A flexible VM placement algorithm for IaaS clouds · adapt the VM placement depending on pluggable expectations network and memory-aware migration scheduler, VM-(VM|PM) affinities,

spread({VM3,VM2,VM8}); lonely({VM7}); preserve({VM1},’ucpu’, 3); offline(@N6); ban($ALL_VMS,@N8); fence(VM[1..7],@N[1..4]); fence(VM[8..12],@N[5..8]);

self-partitioning to solve independent sub-problems in parallel

Static analysis for performance

Page 10: A flexible VM placement algorithm for IaaS clouds · adapt the VM placement depending on pluggable expectations network and memory-aware migration scheduler, VM-(VM|PM) affinities,

2.5

5.0

7.5

10.0

15 20 25 30Virtual machines (x 1,000)

Tim

e (s

ec)

kindlinr

solving latency

on 5,000 nodes

load spikehardware failure

Page 11: A flexible VM placement algorithm for IaaS clouds · adapt the VM placement depending on pluggable expectations network and memory-aware migration scheduler, VM-(VM|PM) affinities,

Extensibility in practicelooking for a better migration scheduler

6050403020100 70 80 90

VM 1

VM 2

VM 7

VM 5

VM 8VM 3

VM 4

VM 6

BtrPlace vanilla

migration duration (sec.)

network and workload blind

[btrplace vanilla, entropy, cloudsim, …]

Page 12: A flexible VM placement algorithm for IaaS clouds · adapt the VM placement depending on pluggable expectations network and memory-aware migration scheduler, VM-(VM|PM) affinities,

Extensibility in practicelooking for a better migration scheduler

network and workload aware

6050403020100 70 80 90

VM 1VM 5VM 4VM 8VM 3VM 7VM 6VM 2

BtrPlace + scheduler

migration duration (sec.)

[btrplace UCC 15]

Page 13: A flexible VM placement algorithm for IaaS clouds · adapt the VM placement depending on pluggable expectations network and memory-aware migration scheduler, VM-(VM|PM) affinities,

Extensibility in practicesolver-side

Network Model

Migration Model

blocking heterogeneous networkcumulative constraints; +/- 300 sloc.

memory and network aware+/- 200 sloc.

Constraints Model restrict the migration models+/- 100 sloc.

t

bw

VM1VM2 VM3core

switch

Page 14: A flexible VM placement algorithm for IaaS clouds · adapt the VM placement depending on pluggable expectations network and memory-aware migration scheduler, VM-(VM|PM) affinities,

96% accurate

●●

●●

●●

●●

●●

●●

●●

●●●

●●

●●

●●

●●

0

25

50

75

100

0 10 20 30 40 50 60 70Migration duration error [%]

Perc

enta

ge o

f mig

ratio

ns

mVMSimGridNoDPNoShare

●●

●●●●

●●

●●

●●●

●●

●●

●●

●●

0

25

50

75

100

−80 −60 −40 −20 0 20 40 60Migration duration error [%]

Perc

enta

ge o

f mig

ratio

ns●

mVMSimGridNoDPNoShare

±model

Page 15: A flexible VM placement algorithm for IaaS clouds · adapt the VM placement depending on pluggable expectations network and memory-aware migration scheduler, VM-(VM|PM) affinities,

speed up

Page 16: A flexible VM placement algorithm for IaaS clouds · adapt the VM placement depending on pluggable expectations network and memory-aware migration scheduler, VM-(VM|PM) affinities,

Energy-aware scheduling

456789

10111213

0 1 2 3 4 5 6 7 8Duration [min.]

Po

wer

[kW

]

BtrPlace mVM

Power budget

456789

10111213

0 1 2 3 4 5 6 7 8 9Duration [min.]

Po

wer

[kW

]

EstimationObservation

decommissioning 2x24 servers to 24 more powerfull

Page 17: A flexible VM placement algorithm for IaaS clouds · adapt the VM placement depending on pluggable expectations network and memory-aware migration scheduler, VM-(VM|PM) affinities,

32.45 years/cpu of experiments

custom OS images full cluster reservation trafic shaping g5k-subnet storage reservation power sensors

Page 18: A flexible VM placement algorithm for IaaS clouds · adapt the VM placement depending on pluggable expectations network and memory-aware migration scheduler, VM-(VM|PM) affinities,

supporting

ready

boothalt

migrate

suspend

resume

from a VM to a container life-cycle

running sleeping

Page 19: A flexible VM placement algorithm for IaaS clouds · adapt the VM placement depending on pluggable expectations network and memory-aware migration scheduler, VM-(VM|PM) affinities,

migrate

ready

boothalt

suspend

resume

simplify the life-cycle using constraints or customized life-cycles …

running sleeping

supporting

Page 20: A flexible VM placement algorithm for IaaS clouds · adapt the VM placement depending on pluggable expectations network and memory-aware migration scheduler, VM-(VM|PM) affinities,

cold-migration

ready

boothalt

suspend

resume

… or overcome the limitations

running sleeping

re-instantation

supporting

Page 21: A flexible VM placement algorithm for IaaS clouds · adapt the VM placement depending on pluggable expectations network and memory-aware migration scheduler, VM-(VM|PM) affinities,

BtrPlacehttp:// .org

production ready live demo stable user API documented tutorials issue tracker support chat room

adhoc VM schedulers do not fit evolving requirements move to a flexible scheduler to be proactive