Virtual machine placement in a virtualized cloud

748 views
708 views

Published on

0 Comments
0 Likes
Statistics
Notes
  • Be the first to comment

  • Be the first to like this

No Downloads
Views
Total views
748
On SlideShare
0
From Embeds
0
Number of Embeds
0
Actions
Shares
0
Downloads
43
Comments
0
Likes
0
Embeds 0
No embeds

No notes for slide

Virtual machine placement in a virtualized cloud

  1. 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.aspJournal Impact Factor (2012): 3.9580 (Calculated by GISI) ©IAEMEwww.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. 2. International Journal of Computer Engineering and Technology (IJCET), ISSN 0976 –6367(Print), ISSN 0976 – 6375(Online) Volume 3, Issue 3, October-December (2012), © IAEMEwork is related to a popular approach called “virtual machine migration” that is adopted by most of thedata centers to minimize energy usage. The problem of underutilized servers is a major concern in most of the cloud data centers. In mostof the data centers a typical server utilizes only about 5-10% of its total processing capacity and less than50% of total disk storage capacity [1]. This can be solved by server consolidation with virtualizationwhich consolidates workload among small number of physical servers. Virtualization is a foundational technology for cloud computing which enables efficientutilization 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 ordownscale 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 forefficient utilization of server resources by reducing the number of migrations. Apart from efficient severutilization, migration provides benefits like reduced cost, slow down the server sprawl etc. The usualpractice followed by data centers is migrating applications from dedicated server to small number ofvirtualized servers as batch jobs. But in large data centers, where the applications are encapsulated invirtual machines, server consolidation has to be performed at frequent intervals. In this approach, thevirtual machines are migrated among servers depending upon the resource requirements. Our workfollows the latter approach of migration. The traditional method of migration involves listing down of servers and manually mappingvirtual machines from the source to the destination server. This manual approach is time consuming andnot applicable as the number of applications range to thousand in a cloud data environment[2].So we haveto formulate an efficient approach to reallocate virtual machines efficiently which in turn shouldminimize the number of physical servers. The algorithmic perspective for approaching the virtualmachine migration problem is to model it as a bin packing problem, that deals with packing items ofdifferent 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 forvirtual machine migration. The algorithm we propose inspires ideas from bin packing algorithm namely best fit algorithm .Thebin packing algorithm aims at only minimizing the number of nodes as represented in Figure (1).The twomain objectives of our novel approach are avoiding unnecessary migrations as well as minimizing themigration of virtual machines with minimal downtime as migration is a costly affair. We consider variousparameters affecting the selection of virtual machines as well as migration. The three main parametersconsidered 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 goaland also with the consideration of the above parameters, the model we propose could fetch very efficientresult at the end as in (Figure 2). We conducted a series of experiments using java to analyze theefficiency of our migration algorithm. The results indicate that our algorithm minimizes the number ofmigrations with least downtime. The remainder of this paper is organized as follows. Section II provides an overview of the volumeof existing literature on live virtual machine (VM) migration. Section III presents the mathematicalmodel. Section IV describes the algorithm. Section V discusses the experiments performed, theirevaluation and results obtained. Finally section VI outlines conclusion with some future directions of thiswork. 436
  3. 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 December2. BACKGROUND WORK The advent of new technologies like virtualization and live migration has provided a newdimension for the functioning of cloud data centers .The impact of migration of virtual machines on Thepower saving, server consolidation, load balancing has been studied on some of the research works.workSome research works have been done recently in Server consolidation using virtual machine migrationlike performance overheads discussed in [4][5] . Benevento et al. [6][7] predicts the performance ofvirtual 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 modelused by Wood et al.[9] make use of live migration technology to terminate hotspots in data centers. centersAjiro and Tanaka has modeled server consolidation problem as a vector packing problem in twodimensions (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 roposesuses 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 todesign an effective virtual machine placement algorithm with minimal downtime. And finally thealgorithm proposes a method to service the incoming request without migration, by considering theindividual 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. 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 basedon modified bin packing (best fit) criterion. Objective of this formulation is to minimize thenumber 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 physicalservers 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. 5. International Journal of Computer Engineering and Technology (IJCET), ISSN 0976 –6367(Print), ISSN 0976 – 6375(Online) Volume 3, Issue 3, October-December (2012), © IAEMEThe incoming request for a resource in a physical server should not exceed the maximumcapacity of a server as (eq1)Rqsize ≤ 100 ……………………………………………………….……… (1) The incoming request size (Rqsize) should satisfy the condition (2) to proceed with migrationbecause physical machines should have enough space for the new request or else the scenarioends in instantiating a new physical machine.ࡾ࢙ࢗ࢏ࢠࢋ ൑ ∑࢔ ൫૚૙૙ െ ∑‫ ܒܑ܄ ܕ‬൯ ࢏ୀ૚ ‫ܒ‬ୀ૚ or ࡾ࢙ࢗ࢏ࢠࢋ ൑ ∑࢔ ሺ ‫ ܡܜܑ܋܉ܘ܉܋ ܚ܍ܞܚ܍ܛ‬i ) ……..…. (2) ࢏ୀ૚Cost of single migration or the time taken to migrate a virtual machine with a particularbandwidth 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 migrationdowntime also increases and if the bandwidth available for migration increases then thedowntime 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 smallsized VMs to migrate. ‫܍ܢܑܛܕܞ‬Total migration overheadi = ∑࢘ ቀ࢈ࢇ࢔ࢊ࢝࢏ࢊ࢚ࢎ ሺ࢙ࢋ࢘࢜ࢋ࢘ሺ࢏ሻ ࢚࢕ ࢛࢔࢚ࢇ࢘ࢍࢋ࢚࢘ࢋࢊ ࢙ࢋ࢘࢜ࢋ࢙࢘ሼ࢑ୀ૚,૛…࢘ሽሻቁ…… (6) ࢑ୀ૚ Where i denotes the total migration overhead for a particular server. Let server (i) is thetarget server and {k=1, 2….r} is the list of untargeted servers where the migration is from targetto other servers {k=1, 2….r}.The efficient time in which the request can be placed in any one of the machines withoutmigration is done through waiting for the VMs already running in the physical machines to finishtheir 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 serveriThe 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. 6. International Journal of Computer Engineering and Technology (IJCET), ISSN 0976 –6367(Print), ISSN 0976 – 6375(Online) Volume 3, Issue 3, October-December (2012), © IAEMEFminFinishingTime = 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 indetermining 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 etcand we used the Best Fit algorithm. Our algorithm minimizes the number of virtual machinemigrations and reduces the downtime by finding the effective way to migrate VMs efficientlybetween servers to make room for the incoming requests. The basic idea used in the algorithm isto 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 sizeinto consideration, as the size of VM increases the, downtime also increases (VM size directlyproportional to the downtime).The aim is to formulate a model that results in minimalmigrations. As efficient bandwidth is required for migrating virtual machines from one server toanother, bandwidth is considered as an important parameter in our approach. The time taken tomigrate 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 makeroom 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 1Input: S, V, RqsizeS 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.BEGINTime get current time 440
  7. 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 ifEnd 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 ifEND 441
  8. 8. International Journal of Computer Engineering and Technology (IJCET), ISSN 0976 –6367(Print), ISSN 0976 – 6375(Online) Volume 3, Issue 3, October-December (2012), © IAEMEALGORITHM 2Getrestime (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]ENDALGORITHM 3Getmigcost (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. 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 resultsfrom algorithm two and three and evaluate the best way (with migration or without migration) to place therequest in the server. The servers are sorted and selected in increasing order of the capacity (Best Fit strategy) andassuming each server as target ,the algorithm three checks the migration cost overhead and algorithmtwo 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 inthe increasing order. The virtual machine with the least completion time in a particular target server isobtained after various iterations. The minimum value obtained will be compared with migration overheadfrom algorithm three to proceed further. The algorithm two takes the target server as input and sorts the VMs size in the increasing orderand the existing capacity of the instantiated untargeted servers (servers expect target server) are sorted inincreasing order. Iteration starts by checking the way how migration is done and what cost it takes tomigrate. We are not considering the migration of the VMs. We just check the possibility or way that howto migrate VMs for providing enough room to place incoming request in the server and obtaining themigration overhead cost (it includes the VM size, the number of migrations and bandwidth available foreach 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 migrateVMs. Figure 5.c Best fit algorithm our algorithm5. PERFORMANCE ANALYSIS To evaluate and compare our scheduling algorithm with its basic heuristics, Best Fit strategyof bin packing algorithm, we have created a simulation environment in java. Number of serverswas taken as ten and number of task requesting for resources is taken as five hundred. The taskarrivals are modeled on random basis. Figure 5 presents the results obtained from the conductedexperiments. The results obtained show that the average number of migrations is considerablysmaller in comparison to other migration algorithms. In all the three scenarios mentioned in thebelow graph, the proposed algorithm acts like the best algorithm. The algorithm checks whethermigration is required or not before migrating virtual machines. This in turn avoids unnecessarymigrations and keeps the migrations minimal. 443
  10. 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 algorithm6. CONCLUSION AND FUTURE WORK. To achieve efficient virtual machine placement in a cloud virtualized environment, this newalgorithm is proposed. We have simulated our heuristics using java. The experimental resultsshow that the proposed algorithm outperforms the traditional bin packing algorithm (best fitstrategy).Still many issues like cost of migration, communication costs, bandwidth cost are notconsidered when placing virtual machines. Indeed we like to simulate the proposed approach inan 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 BinPacking: 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 forServer 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, “DiagnosingPerformance Overheads in the Xen Virutal Machine Environment”, VEE’05,2005. p.13-23.[6] F. Benevenuto, C. Fernandes, etc., “Performance Models for Virtualized Applications”, ISPA2006, LNCS 4331, p.427-439.[7] D. A. Menasce, L. W. Dowdy, and V. A. F. Almeida, “Performance by Design: ComputerCapacity 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 withRDMA over modern interconnects,”in Proceedings of the IEEE International Conference onCluster Computing, 2008, pp. 11–20.[9] T. Wood, P. Shenoy, A. Venkataramani, and M. Yousif, “Black-box and gray-box strategiesfor virtual machine migration,”in Proc. Networked Systems Design and Implementation, 2007.. 444
  11. 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 ServerConsolidation, 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. Mastersthesis. Brigham Young University, April 2009.[12] B. Li, J. Li, J. Huai, T. Wo, Q. Li, and L. Zhong. EnaCloud: An Energy saving ApplicationLive Placement Approach for Cloud Computing Environments. In: Proceedings of theInternational 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 resourcemanagement for dealing with heterogeneous workloads in virtualized data centers, In 11thACM/IEEE international conference on grid computing (Grid 2010), Brussels, Belgium, pageno. 25–32, Oct 2010 445

×