Dynamic Resource Allocation using Virtual Machine for Cloud Computing Environment Zhen Xiao, Weijia...

Preview:

Citation preview

Dynamic Resource Allocation using Virtual Machine for Cloud Computing Environment

Zhen Xiao, Weijia Song, and Qi ChenDept. of Computer Science

Peking Universityhttp://zhenxiao.com/

ChinaSys2012 Talk

1

Introduction

Background: Nowadays Cloud computing allows

business customers to scale up and down their resource usage based on needs. It uses virtualization technology to multiplex hardware resources among a large group of users.

Problem: How can a cloud service provider best

multiplex virtual to physical resources?2

Amazon EC2-Style Service

4

User

User

Virtual Machines

Physical Servers

Virtualization

I-a-a-S Service

PM1

PM2 PM3

VM1cpu:0.1net:0.1

mem:0.61

VM2cpu:0.1net:0.1

mem:0.3

VM3cpu:0.6net:0.6

mem:0.05

VM4cpu:0.3net:0.3

mem:0.2

Amazon EC2-Style Service

VM

sPM

s

5

Goals and objectivesOur goals:

overload avoidance: the capacity of a PM should be sufficient to satisfy the resource needs of all VMs running on it. Otherwise, the PM is overloaded and can lead to degraded performance of its VMs.

green computing: the number of PMs used should be minimized as long as they can still satisfy the needs of all VMs. Idle PMs can be put to sleep to save energy. 6

Overview of the rest of the talk

System overview

Details of the algorithm

Simulation results

Experiment results

Conclusion

7

System Overview

Xen HypervisorWS Prober

Dom 0

MM Adjustor

Usher LNM

Dom U

Xen HypervisorWS Prober

Dom 0

MM Adjustor

Usher LNM

Dom U

Xen HypervisorWS Prober

Dom 0

MM Adjustor

Usher LNM

Dom U

Usher CTRL

VM Scheduler Plugin

Predictor Hotspot Solver Migration listMigration listColdspot Solver

8

System overviewHow to collect the usage statistics of resources for each VM ?

The CPU and network usage can be calculated by monitoring the scheduling events in Xen (XenStat)

The memory usage can be calculated by a working set prober (WS Prober) on each hypervisor to estimate the working set sizes of VMs. (We use the random page sampling technique as in the VMware ESX Server)

10

System overviewHow to predict the future resource demands of VMs and the future load of PMs?

VMware ESX Server uses EWMA (exponentially weighted moving average)

Our system uses FUSD (Fast Up and Slow Down)

11

Overview of the rest of the talk

System overview

Details of the algorithm

Simulation results

Experiments

Conclusion

12

Our Algorithm

Definitions1We define a server as a hot spot if the utilization of any of its resources is above a hot threshold. This indicates that the server is overloaded and hence some VMs running on it should be migrated away.

We define a server as a cold spot if the utilizations of all its resources are below a cold threshold. This indicates that the server is mostly idle and a potential candidate to turn off/sleep to save energy. 13

Parameters of the algorithm

Hot threshold

Cold threshold

Green computing threshold

Warm threshold

Consolidation limit

14

Our Algorithm

Definitions2We use skewness to quantify the unevenness in the utilization of multiple resources on a serverLet n be the number of resources we consider and be the utilization of the ith resource. We define the resource skewness of a server p as

where is the average utilization of all resources for server p.

cpu mem net0

0.2

0.4

0.6

skewness=0

cpu mem net0

0.20.40.60.8

1

skewness=1.13

15

Our Algorithm

Definitions3We define the temperature of a hot spot p as the square sum of its resource utilization beyond the hot thresholdLet R be the set of overloaded resources in server p and rt be the hot threshold for resource r. The definition of the temperature is :

16

Layout Predict results

Solv

e ho

tspo

tsInit hot threshold

Generate hotspots and sort them by their temperature

Any hotspots to solve?

Done

N

Choose a hot pm and try to solve it

Y

17

Our Algorithm

For each hot spot • Which VM to migrate

away?• Where does it migrated

to?

18

hotspot

Sort the vms on the hot pm based on the resulting temperature if

that vm is migrated away

Find out the pm which may accept the vm without becoming hotspot and generate a target list

Any vm to try?

Choose the pm with the maximum decrease of skewness value after

acceptting that vm to be the destination

N

Migrate the vm and solve (or cool) the hotspot

Is the target list empty?

Y

Y

Fail to solve this hotspot

N

Solv

e ho

tspo

t

19

Skewness

PM1 (mem > 0.9) PM2

PM3

VM1cpu:0.1net:0.1

mem:0.61

VM2cpu:0.1net:0.1

mem:0.3

VM3cpu:0.6net:0.6

mem:0.05

VM4cpu:0.3net:0.3

mem:0.2

PM1 (mem > 0.9) PM2 PM3 PM1

VM1cpu:0.1net:0.1

mem:0.61

VM2cpu:0.1net:0.1

mem:0.3

VM3cpu:0.6net:0.6

mem:0.05

PM2

VM4cpu:0.3net:0.3

mem:0.2

Dt:0.0036Ds:-0.337

Dt:0.0036Ds: 0.106

Dt:0.0035Ds: -1.175 Ds:0.1178 Ds:-0.98

20

Need green computing?

Generate coldspots and noncoldspots, and sort coldspots by used RAM

Any coldspots to

solve?

Choose a cold pm and try to solve it

Can it be solved?

Y

DoneN

Migration list

N

Y

Y

Move the cold pm to

noncoldspots

N

Solved num > limit?

Y

N

Gre

en c

ompu

ting

21

coldspot

Init

From all non-coldspots find out the pm whose resourse utilization is below

warm threshold after acceptting the vm and generate a target list

Any vm to solve?

Choose a pm with the

maximum decrease of skewness

value after acceptting that vm to

be the destination

N

From all the rest coldspots find out the pm whose resourse utilization is below warm threshold after acceptting the vm

and generate a target list

Is the target list empty?Y

Y

Fail to solve this coldspot

N

Is the target list empty?

Choose a pm with the maximum

decrease of skewness value after acceptting

that vm to be the destination

If the destination pm becomes non-coldspot, move it to non-coldspots

list

succeed

NY

Solv

e co

ldsp

ot

22

PM1 PM2

PM3

VM1cpu:0.1net:0.1

mem:0.1

VM2cpu:0.1net:0.1

mem:0.1

VM3cpu:0.2net:0.2

mem:0.25Skewness

VM4cpu:0.5net:0.5

mem:0.5

PM3 PM1PM1 PM2

PM2

VM2cpu:0.1net:0.1

mem:0.1

VM3cpu:0.2net:0.2

mem:0.25

PM3

VM4cpu:0.5net:0.5

mem:0.5

cold threshold = 0.25 warm threshold = 0.65

PM1

VM1cpu:0.1net:0.1

mem:0.1

VM2cpu:0.1net:0.1

mem:0.1

VM3cpu:0.2net:0.2

mem:0.25

23

Analysis of the algorithm

The skewness algorithm consists of three parts(let n and m be the number of PMs and VMs in the system):

Load prediction: O(n+m) ~ O(n)hot spot mitigation: O(n2)green computing: O(n2) (if we add restriction to the cold spots to solve, it can be down to O(n))

The overall complexity of the algorithm is bounded by O(n2)

26

Overview of the rest of the talk

System overview

Details of the algorithm

Simulation results

Experiments

Conclusion

27

SimulationGenerate work load

traces from a variety of servers in our university including our faculty mail server, the central DNS server, the syslog server of our IT department, the index server of our P2P storage project, and many others

a synthetic workload which is created to examine the performance of our algorithm in more extreme situations mimics the shape of a sine function (only the positive part) and ranges from 15% to 95% with a 20% random fluctuation

DNS server

desktop

logmail server

28

Parameters in the simulation

Hot threshold: 0.9

Cold threshold: 0.25

Warm threshold: 0.65

Green computing threshold: 0.4

Consolidation limit: 0.05

29

Effect of thresholds on APMs

(a) Different thresholds

30

(b) #APM with synthetic load

Scalability of the algorithm

(a) average decision time (b) total number of migrations

(c) number of migrations per VM

32

Effect of load prediction

33

Overview of the rest of the talk

System overview

Details of the algorithm

Simulation results

Experiments

Conclusion

35

ExperimentsEnvironment

30 servers with Intel E5420 CPUx2 and 24GB of RAM. The servers run Xen-3.3 and Linux 2.6.18.The servers are connected over a gigabyte Ethernet to three NFS centralized storage serverTPC-W Benchmark: a transactional web e-Commerce benchmark.

36

Algorithm effectiveness

37

Application Performance

38

Load Balancing

40

Overview of the rest of the talk

System overview

Details of the algorithm

Simulation results

Experiments

Conclusion

44

ConclusionWe have presented a resource management system for Amazon EC2-style cloud computing services.

We use the skewness metric to combine VMs with different resource characteristics appropriately so that the capacities of servers are well utilized.

Our algorithm achieves both overload avoidance and green computing for systems with multi-resource constraints.

45

Thank You!

46