More Related Content
Similar to Virtual machine placement in a virtualized cloud
Similar to Virtual machine placement in a virtualized cloud (20)
Virtual machine placement in a virtualized cloud
- 1. INTERNATIONALComputer EngineeringCOMPUTER ENGINEERING –
International Journal of JOURNAL OF and Technology (IJCET), ISSN 0976
6367(Print), ISSN 0976 – 6375(Online) Volume 3, Issue 3, October-December (2012), © IAEME
& TECHNOLOGY (IJCET)
ISSN 0976 – 6367(Print)
ISSN 0976 – 6375(Online)
Volume 3, Issue 3, October - December (2012), pp. 435-445
IJCET
© IAEME: www.iaeme.com/ijcet.asp
Journal Impact Factor (2012): 3.9580 (Calculated by GISI) ©IAEME
www.jifactor.com
VIRTUAL MACHINE PLACEMENT IN A VIRTUALIZED CLOUD
R Suchithra,
Faculty of Computer Applications
MCA Department
Jain University,Bangalore,India
suchithra.suriya@gmail.com
Dr.N.Rajkumar
Prof. of Department of Software Engineering
Ramakrishna College of Engineering
Anna University,Coimbatore,India
nrk29@rediffmail.com
ABSTRACT
Virtualization technology gives a high integrated solution for data centers by
dynamically managing the resources within a pool of cloud servers which are more reliable and
scalable. Server consolidation is one of the approaches of virtualization used in reducing the
number of physical servers. This technique helps in energy conservation and cost cutting
.Consolidation can be achieved through efficient migration of virtual machines. As migration of
virtual machines is a costly affair, efficiently placing the virtual machines is a challenging job.
We propose an efficient virtual machine placement algorithm by implementing ideas of bin
packing algorithm. We have verified the feasibility of our algorithm by simulating it with
multiple test cases. We show that our migration algorithm minimizes the number of needed
virtual machine migrations.
Keywords: Bin packing, Virtualization, Server Consolidation
1. INTRODUCTION
Green computing is practiced by most of the data centers through efficient utilization of
computing resources. This in turn results in energy and cost saving. The energy demands of
Cloud data centers are huge. There are number of methods adopted by data centers to reduce the
energy consumption like energy optimization, power minimization in wireless networks etc. Our
435
- 2. International Journal of Computer Engineering and Technology (IJCET), ISSN 0976 –
6367(Print), ISSN 0976 – 6375(Online) Volume 3, Issue 3, October-December (2012), © IAEME
work is related to a popular approach called “virtual machine migration” that is adopted by most of the
data centers to minimize energy usage.
The problem of underutilized servers is a major concern in most of the cloud data centers. In most
of the data centers a typical server utilizes only about 5-10% of its total processing capacity and less than
50% of total disk storage capacity [1]. This can be solved by server consolidation with virtualization
which consolidates workload among small number of physical servers.
Virtualization is a foundational technology for cloud computing which enables efficient
utilization of the existing computing resources. The key features of cloud computing are pricing,
scalability and virtualization. The highly scalable nature of cloud computing allows the user to upscale or
downscale the resource requirements within a fraction of time thereby paying premium based on usage
.Scalability can be achieved through virtualization.
Virtual machine migration is one of the effective ways of applying virtualization technology for
efficient utilization of server resources by reducing the number of migrations. Apart from efficient sever
utilization, migration provides benefits like reduced cost, slow down the server sprawl etc. The usual
practice followed by data centers is migrating applications from dedicated server to small number of
virtualized servers as batch jobs. But in large data centers, where the applications are encapsulated in
virtual machines, server consolidation has to be performed at frequent intervals. In this approach, the
virtual machines are migrated among servers depending upon the resource requirements. Our work
follows the latter approach of migration.
The traditional method of migration involves listing down of servers and manually mapping
virtual machines from the source to the destination server. This manual approach is time consuming and
not applicable as the number of applications range to thousand in a cloud data environment[2].So we have
to formulate an efficient approach to reallocate virtual machines efficiently which in turn should
minimize the number of physical servers. The algorithmic perspective for approaching the virtual
machine migration problem is to model it as a bin packing problem, that deals with packing items of
different sizes in least number of bins [3].We propose a modified bin packing algorithm (best fit strategy)
as the bin packing algorithm does not consider few important parameters and constraints required for
virtual machine migration.
The algorithm we propose inspires ideas from bin packing algorithm namely best fit algorithm .The
bin packing algorithm aims at only minimizing the number of nodes as represented in Figure (1).The two
main objectives of our novel approach are avoiding unnecessary migrations as well as minimizing the
migration of virtual machines with minimal downtime as migration is a costly affair. We consider various
parameters affecting the selection of virtual machines as well as migration. The three main parameters
considered are
• Virtual machine size.
• Network bandwidth.
• Finishing time of each individual virtual machine.
We modified the basic approaches and heuristics of bin packing algorithm to work for placement goal
and also with the consideration of the above parameters, the model we propose could fetch very efficient
result at the end as in (Figure 2). We conducted a series of experiments using java to analyze the
efficiency of our migration algorithm. The results indicate that our algorithm minimizes the number of
migrations with least downtime.
The remainder of this paper is organized as follows. Section II provides an overview of the volume
of existing literature on live virtual machine (VM) migration. Section III presents the mathematical
model. Section IV describes the algorithm. Section V discusses the experiments performed, their
evaluation and results obtained. Finally section VI outlines conclusion with some future directions of this
work.
436
- 3. International Journal of Computer Engineering and Technology (IJCET), ISSN 0976 –
6367(Print), ISSN 0976 – 6375(Online) Volume 3, Issue 3, October-December (2012), © IAEME
December
2. BACKGROUND WORK
The advent of new technologies like virtualization and live migration has provided a new
dimension for the functioning of cloud data centers .The impact of migration of virtual machines on
The
power saving, server consolidation, load balancing has been studied on some of the research works.work
Some research works have been done recently in Server consolidation using virtual machine migration
like performance overheads discussed in [4][5] . Benevento et al. [6][7] predicts the performance of
virtual machines migration for server consolidation Huang et al. [8] has formulated a model that uses
consolidation.
Remote Direct Memory access to improve the efficiency of VM migration. The Sandpiper system model
used by Wood et al.[9] make use of live migration technology to terminate hotspots in data centers.
centers
Ajiro and Tanaka has modeled server consolidation problem as a vector packing problem in two
dimensions (CPU and memory) [10 In [11] Terry et al has used Xen hypervisor for implementation of
[10].
live migration for dynamic load balanc
balancing. In the cited paper [11] X.Liao et al proposes enacloud that
roposes
uses the load aggregation of virtual machines for minimizing the required number of physical servers.
Most of these research works did not consider much on migration time. The objective of our work is to
design an effective virtual machine placement algorithm with minimal downtime. And finally the
algorithm proposes a method to service the incoming request without migration, by considering the
individual VM finishing time or the response time of the VMs currently running on the server.
e
.
Figure 1 Migration through best fit approach
1:
Figure 2: Migration through proposed approach
437
- 4. International Journal of Computer Engineering and Technology (IJCET), ISSN 0976 –
6367(Print), ISSN 0976 – 6375(Online) Volume 3, Issue 3, October-December (2012), © IAEME
Directly proportional
Vmsize α migration
. VM
size
Directly
Figure 3: VMsize directly proportional to migration downtime
Inversely proportional
Bandwidth α
ࢍ࢘ࢇ࢚ ࢊ࢚࢝ࢋ
Bandwidt
Inversely
Migration downtime
Figure 4: Bandwidth inversely proportional to migration downtime.
3. MATHEMATICAL MODEL FOR VIRTUAL MACHINE MIGRATION
This section presents a mathematical model for virtual machine placement problem based
on modified bin packing (best fit) criterion. Objective of this formulation is to minimize the
number of virtual machine migrations.
We start with a cloud computing environment consists of ‘S’ physical servers on which ‘V’
virtual machines are hosted and running. Each virtual machine denotes one resource requirement
(in our case CPU is considered as the resource) from the client. Assume that the set of physical
servers s1, s2, s3. . . . . sn and the resource capacity of each server is considered as 100% .
Let the virtual machine running in the particular server (Si) is (Vij) {j=1, 2, 3 . . . . m}.
For each Vij there is a
(i) VRij the response time or time taken to finish the execution in the server.
(ii) VCij the size of the virtual machine.
438
- 5. International Journal of Computer Engineering and Technology (IJCET), ISSN 0976 –
6367(Print), ISSN 0976 – 6375(Online) Volume 3, Issue 3, October-December (2012), © IAEME
The incoming request for a resource in a physical server should not exceed the maximum
capacity of a server as (eq1)
Rqsize ≤ 100 ……………………………………………………….……… (1)
The incoming request size (Rqsize) should satisfy the condition (2) to proceed with migration
because physical machines should have enough space for the new request or else the scenario
ends in instantiating a new physical machine.
ࡾ࢙ࢠࢋ ∑ ൫ െ ∑ ܒܑ܄ ܕ൯
ୀ ܒୀ or ࡾ࢙ࢠࢋ ∑ ሺ ܡܜܑ܋܉ܘ܉܋ ܚ܍ܞܚ܍ܛi ) ……..…. (2)
ୀ
Cost of single migration or the time taken to migrate a virtual machine with a particular
bandwidth between servers is calculated using equation (3).
Single migration cost= virtual machine size / bandwidth for migration………………….. (3)
According to formula (4) & (5), if the virtual machine size increases then the migration
downtime also increases and if the bandwidth available for migration increases then the
downtime decreases. This is represented in an efficient way in (fig 3 and fig 4)
Vmsize α migration downtime ………………………………………………………… (4)
Bandwidth α ࢍ࢘ࢇ࢚ ࢊ࢚࢝ࢋ
………………………………………………………... (5)
The below equation calculates the migration overhead in a best possible way by selecting small
sized VMs to migrate.
܍ܢܑܛܕܞ
Total migration overheadi = ∑࢘ ቀ࢈ࢇࢊ࢝ࢊ࢚ࢎ ሺ࢙ࢋ࢘࢜ࢋ࢘ሺሻ ࢚ ࢛࢚ࢇ࢘ࢍࢋ࢚࢘ࢋࢊ ࢙ࢋ࢘࢜ࢋ࢙࢘ሼୀ,…࢘ሽሻቁ…… (6)
ୀ
Where i denotes the total migration overhead for a particular server. Let server (i) is the
target server and {k=1, 2….r} is the list of untargeted servers where the migration is from target
to other servers {k=1, 2….r}.
The efficient time in which the request can be placed in any one of the machines without
migration is done through waiting for the VMs already running in the physical machines to finish
their execution. This is calculated using the below equation (7).
Finishing timei = min {i=1,2…n} {j=1,2…m} ( individual Finishing time or VRij ) ………………..(7)
Where {i=1, 2….n} is the index for list of servers
{j=1, 2….m} is the index for list of list of VMs in serveri
The expression (8) finds minimum migration overhead in terms of time.
Fminmigration = min {i=1,2…n} (Total migration overheadi ) ………………………………..(8)
The formula (9) determines minimum response time to wait.
439
- 6. International Journal of Computer Engineering and Technology (IJCET), ISSN 0976 –
6367(Print), ISSN 0976 – 6375(Online) Volume 3, Issue 3, October-December (2012), © IAEME
FminFinishingTime = min {i=1,2…n} (Finishingtimei ) ……………………………………....(9)
Min (Fminmigration, Ffinishingtime) ………………………………………………..….(10)
Equation (10) uses the results of expressions (8) & (9) to get the minimum value which helps in
determining whether to migrate virtual machines or not.
4. PROPOSED ALGORITHM FOR SERVER CONSOLIDATION
General Bin packing algorithms has many algorithms like First Fit, Worst Fit, Best Fit etc
and we used the Best Fit algorithm. Our algorithm minimizes the number of virtual machine
migrations and reduces the downtime by finding the effective way to migrate VMs efficiently
between servers to make room for the incoming requests. The basic idea used in the algorithm is
to find an effective way to migrate virtual machines by considering the below parameters.
(i) Each VM size and number of migrations.
(ii) The bandwidth required for each migration.
(iii) The individual response time or the time left for each VM to finish job.
VMsize is the size of the virtual machine running in the server. We take virtual machine size
into consideration, as the size of VM increases the, downtime also increases (VM size directly
proportional to the downtime).The aim is to formulate a model that results in minimal
migrations. As efficient bandwidth is required for migrating virtual machines from one server to
another, bandwidth is considered as an important parameter in our approach. The time taken to
migrate a VM will be inversely proportional to the bandwidth available between two servers.
If the time required for currently running VMs to complete the task and leave a server to make
room for other request is less than the time taken for the migration overhead discussed above,
then there is no need to migrate virtual machines. We can wait for the VMs to finish execution.
ALGORITHM 1
Input: S, V, Rqsize
S list of servers {S1, S2, S3. . . Sn}
V list of virtual machines running in the servers.
Vij denotes jth virtual machine in the ith server.
VRij the finishing time of the vm.
VCij the size of the vm.
Rqsize size of the incoming request.
BEGIN
Time get current time
440
- 7. International Journal of Computer Engineering and Technology (IJCET), ISSN 0976 –
6367(Print), ISSN 0976 – 6375(Online) Volume 3, Issue 3, October-December (2012), © IAEME
[Sort the list of servers by descending based on server remaining capacity]
For each [server Si] as target
Migcost Getmigcost (Si)
Restime Getrestime (Si)
If (Migcost == -1) then
[Migration not possible using Si as target and break loop]
End if
[To check the best time that is with migration (Migcost) or without migration (Restime)]
If (Migcost+time <= Restime+time) then
Cost[i] Restime+time
Else
Cost[i] Migcost+time
End if
End for each
[Check for the cost array to select the best server as target]
If ( All values in cost array are -1 ) then
[Migration not possible and exit]
End if
If (best time taken is through migration) then
[Proceed with the migration as]
Si target
Else
[Proceed with no migration]
End if
END
441
- 8. International Journal of Computer Engineering and Technology (IJCET), ISSN 0976 –
6367(Print), ISSN 0976 – 6375(Online) Volume 3, Issue 3, October-December (2012), © IAEME
ALGORITHM 2
Getrestime (server Si as target)
BEGIN
[Sort the Vij s of the server Si in the increasing order of VM response time]
For each Vij {Vi1, Vi2. . . Vim}
If (server capacity (sc) – vmsize (VRij) <= Rqsize) then
List[k] VRij
K k +1
[Break the loop]
End if
[Now consider all other vm’s {Vik, where k=2, 3, 4 . . . m} except Vij
While (server capacity (sc)-VRij- VRik) > Rqsize Do
List[k] list[k] + VRij
End for while
[Find the best value or minimum value of list array and return]
END
ALGORITHM 3
Getmigcost (server si as target)
BEGIN
[Select the server Si]
[Sort the untargeted server’s expect target server in the increasing best fit strategy of vmsize]
[Find the migration cost with Si as target and remaining as untargeted servers]
While Rqsize >= server capacity (sc) do
[Select the next possible Vij to migrate to the untargeted server]
Val VMsize (VCij) / bandwidth (from target to untargeted server)
[Continue to migrate until it is possible for target to service the request]
End for while
[Return the minimum value]
END
442
- 9. International Journal of Computer Engineering and Technology (IJCET), ISSN 0976 –
6367(Print), ISSN 0976 – 6375(Online) Volume 3, Issue 3, October-December (2012), © IAEME
We now describe our algorithm. There are three algorithms. The algorithm one uses the results
from algorithm two and three and evaluate the best way (with migration or without migration) to place the
request in the server.
The servers are sorted and selected in increasing order of the capacity (Best Fit strategy) and
assuming each server as target ,the algorithm three checks the migration cost overhead and algorithm
two finds the time taken by VM s to finish jobs in that particular server by selecting the minimum value
(finishing time of Vm) of the VMs .
The algorithm two takes the target server as input and sorts the virtual machine finishing time in
the increasing order. The virtual machine with the least completion time in a particular target server is
obtained after various iterations. The minimum value obtained will be compared with migration overhead
from algorithm three to proceed further.
The algorithm two takes the target server as input and sorts the VMs size in the increasing order
and the existing capacity of the instantiated untargeted servers (servers expect target server) are sorted in
increasing order. Iteration starts by checking the way how migration is done and what cost it takes to
migrate. We are not considering the migration of the VMs. We just check the possibility or way that how
to migrate VMs for providing enough room to place incoming request in the server and obtaining the
migration overhead cost (it includes the VM size, the number of migrations and bandwidth available for
each VM migration). The value is returned to the algorithm one.
After deriving values from both the algorithm two and three, the minimum value is obtained.
According to the selected minimum value that is the time taken, the algorithm decides whether to migrate
VMs.
Figure 5.c
Best fit algorithm our algorithm
5. PERFORMANCE ANALYSIS
To evaluate and compare our scheduling algorithm with its basic heuristics, Best Fit strategy
of bin packing algorithm, we have created a simulation environment in java. Number of servers
was taken as ten and number of task requesting for resources is taken as five hundred. The task
arrivals are modeled on random basis. Figure 5 presents the results obtained from the conducted
experiments. The results obtained show that the average number of migrations is considerably
smaller in comparison to other migration algorithms. In all the three scenarios mentioned in the
below graph, the proposed algorithm acts like the best algorithm. The algorithm checks whether
migration is required or not before migrating virtual machines. This in turn avoids unnecessary
migrations and keeps the migrations minimal.
443
- 10. International Journal of Computer Engineering and Technology (IJCET), ISSN 0976 –
6367(Print), ISSN 0976 – 6375(Online) Volume 3, Issue 3, October-December (2012), © IAEME
Figure 5.a Figure 5.b
Best fit algorithm our algorithm Best fit algorithm our algorithm
6. CONCLUSION AND FUTURE WORK.
To achieve efficient virtual machine placement in a cloud virtualized environment, this new
algorithm is proposed. We have simulated our heuristics using java. The experimental results
show that the proposed algorithm outperforms the traditional bin packing algorithm (best fit
strategy).Still many issues like cost of migration, communication costs, bandwidth cost are not
considered when placing virtual machines. Indeed we like to simulate the proposed approach in
an actual environment.
6. REFERENCES
[1] W.Vogels,”Beyond Server Consolidation”,ACM Queue January /February 2008
[2]http://www.infosys.com/infosys-labs/publications/infosyslabs-briefings/Pages/performance-
server-consolidation-virtualization.aspx
[ 3] E. G. Coffman Jr., M. R. Garey, and D. S. Johnson, “Approximation Algorithms for Bin
Packing: A Survey,” Approximation Algorithms for NP-Hard Problems, D. Hochbaum
(editor), PWS Publ., Boston(1997), pp.46-93.
[4] P. Padala, X. Zhu, Z. Wang, etc., “Performance Evaluation of Virtualization Technologies for
Server Consolidation”, HPL-2007- 59R1. http://www.hpl.hp.com/techreports/2007/HPL-2007-
59R1.html
[5] A. Menon, J. R. Santos, Y. Turner, G. Janakiraman, and W. Zwaenepoel, “Diagnosing
Performance Overheads in the Xen Virutal Machine Environment”, VEE’05,2005. p.13-23.
[6] F. Benevenuto, C. Fernandes, etc., “Performance Models for Virtualized Applications”, ISPA
2006, LNCS 4331, p.427-439.
[7] D. A. Menasce, L. W. Dowdy, and V. A. F. Almeida, “Performance by Design: Computer
Capacity Planning By Example”, Prentice Hall PTR, Upper Saddle River, NJ, USA, 2004
[8] W. Huang, Q. Gao, J. Liu, and D. Panda, “High performance virtual machine migration with
RDMA over modern interconnects,”in Proceedings of the IEEE International Conference on
Cluster Computing, 2008, pp. 11–20.
[9] T. Wood, P. Shenoy, A. Venkataramani, and M. Yousif, “Black-box and gray-box strategies
for virtual machine migration,”in Proc. Networked Systems Design and Implementation, 2007..
444
- 11. International Journal of Computer Engineering and Technology (IJCET), ISSN 0976 –
6367(Print), ISSN 0976 – 6375(Online) Volume 3, Issue 3, October-December (2012), © IAEME
[10] Yasuhiro Ajiro and Atsuhiro Tanaka, A Combinatorial Optimization Algorithm for Server
Consolidation, The 21st Annual Conference of the Japanese Society for Artificial Intelligence,
2007.
[11] Terry C. Wilcox Jr. Dynamic Load Balancing of Virtual Machines hosted on Xen. Masters
thesis. Brigham Young University, April 2009.
[12] B. Li, J. Li, J. Huai, T. Wo, Q. Li, and L. Zhong. EnaCloud: An Energy saving Application
Live Placement Approach for Cloud Computing Environments. In: Proceedings of the
International Conference on CloudComputing, pg. 17-24, IEEE, 2009
[13] Predicting the Performance of Virtual Machine Migration Sherif Akoush, Ripduman Sohan,
Andrew Rice, Andrew W. Moore and Andy Hopper
[14] I. Goiri, J. Fito, F. Julia, R. Nou, J. L. Berral and J. Guitart, ―Multifaceted resource
management for dealing with heterogeneous workloads in virtualized data centers, In 11th
ACM/IEEE international conference on grid computing (Grid 2010), Brussels, Belgium, page
no. 25–32, Oct 2010
445