www.ijecs.in International Journal Of Engineering And Computer Science ISSN:2319-7242 Volume 4 Issue 1 January 2015, Page No. 9966-9970 Double Threshold Based Load Balancing Approach by Using VM Migration for the Cloud Computing Environment Rajyashree1, Vineet Richhariya2 1 Lakshmi Narain College of Technology, Bhopal, India rajyashree.singh.1@gmail.com 2 Lakshmi Narain College of Technology, Bhopal, India vineetrich100@gmail.com Abstract: Cloud computing is emerging as a new paradigm for next generation computing in the field of computer science and information technology because of their attractive services such as adaptive, online, value added and pay as use scheme. Virtualization is the core technology in the cloud computing, which allow the sharing of physical resources. With the help of virtualization single physical device can be share by the multiple users. So it increased the resource utilization. Cloud is a very large in size and having complex structure. Cloud resources are heterogeneous and geographically distributed and the resource demanded by the user may change dynamically on runtime. So the resource management and the resource scheduling in such a large-scale distributed environment is a very challenging task. In cloud environment each data center can contain number of host, so there may be a situation when some hosts are overloaded and some are underloaded. To avoid this situation we proposed a double threshold based load balancing approach, where threshold is decided based on the utilization. This approach motivated by the fact that overloaded situation can’t be avoided, but can be control by assigning the dynamic threshold. For assigning the dynamic threshold we monitored host utilization for each 20 Second and assign the threshold based on the utilization in the previous interval. Experiment result shows that our approaches reduce the energy consumption and minimize the number of migration Keywords: Virtual machine, Physical machine, Server consolidation, VM migration, Hot spot mitigation. 1. Introduction Cloud computing [1, 2] emerging as a new paradigm for nextgeneration computing in the field of computer science and information technology because of their attractive services such as easy to use, online, on demand and pay as use scheme. Cloud is a business model, which the on demand services to the user. User can access these services any time at anywhere in the world. Cloud support three types of services i.e. Software as a Services (SaaS), Platform as a Services (PaaS) and Infrastructure as a Services (IaaS) [3, 4]. It can be deployed in three different way i.e. Private cloud, Public cloud and Hybrid cloud [3, 4]. Private cloud is more secure than the public cloud. Virtualization [5, 6] is the core technology in the cloud, which allows the sharing of the physical resources. With the help of virtualization single physical device can be share by the multiple users. When any user demands for the resources hypervisor or virtual machine monitor (VMM) create a VM and bind the requested resources with the VM. Virtualization can be classified in two types i.e. Full virtualization and paravirtualization. Full virtualization is a technique in which a complete installation of one machine is run on another machine. In full virtualization, the entire system is emulated (BIOS, drive, and so on), but in paravirtualization, its management module operates with an operating system that has been adjusted to work in a virtual machine. Paravirtualization typically runs better than the full virtualization model, simply because in a fully virtualized deployment, all elements must be emulated. Number of VM can be created in each host and each VM behave like a physical machine. Figure-1 Cloud service model Rajyashree, IJECS Volume 4 Issue 1 January, 2015 Page No.9966-9970 Page 9966 of the resources. Priorities are assigned based on the size of resources required in each dimension and volume. Higher priority are assign to the VM which having a higher resource requirement. This algorithm balance the resource but it will increase the waiting time for the VM which having a lower priority. Figure- 2 Virtualization Resources in the cloud are heterogeneous and geographically distributed. Furthermore resource demand by the user can change dynamically at run time. So the resource management and the resource scheduling in such a large-scale distributed environment is a very challenging task. Resources management is a core function of any dynamic systems, it requires some complex policies and decisions for the management of multi dimension objective such as CPU, memory and network bandwidth. For the proper utilization of the resources an efficient load balancing strategy are required. Load balancing approach can be static or dynamic. In the static approach fixed threshold are used that can not changed with time to define a percentage of resources that can be used. While in the dynamic load balancing approach threshold can be changed with time. Static load balancing approach is not suitable for the cloud, where user request can change with time. Generally lower and upper threshold are used to define the underloaded and overloaded host respectively. So in this paper we proposed double threshold based dynamic load balancing approach. If load on the host is below the upper threshold all VM running on that host are move to the other host, which is known as a server consolidation. If load on the host is greater than the upper threshold then our host is overloaded therefore some VM has to be migrated. VM migration [7, 8] techniques are used in the load balancing. VM migration is a technique where VM are moves from one host to the another host. Mayank Mishra et al. [11], Proposed a method for placing the VM which is based on Vector theory. They are using resource vectors TCV, RUV, RCV and RRV in the 3-D space which we will use for making different VM placement decisions. One of our prime goals while placing VM is to make the resource utilization of PMs as balanced (along each resource dimension) as possible, i.e., the RUV of a PM should be as closely aligned to the TCV as possible. This would require that we have a way of finding complementary VM for a PM. They proper balance the resources but not focus to the server consolidation. So energy consume by the data center is high. T. Wood et al. [12], proposed an approach for the hot spot mitigation know as sandpiper. Sandpiper use black and gray box approach to monitor the host. They use the Xen hypervisor. The monitoring engine is responsible for tracking the processor, network and memory usage of each virtual server. It also tracks the total resource usage on each physical server by aggregating the usages of resident VMs. Problem with this approach is that they only consider the cpu load to calculate the load on host. A. Beloglazov et al. [13], proposed an energy efficient load balancing approach. They argue that average power consumed by an idle server is 70% of power consumed by fully utilized server. So power consumed by the data center can be controlled by the proper load balancing approach. They used fixed lower and upper threshold with the difference of 40 between lower and upper threshold. So if lower threshold is 30 than upper threshold is 70. This approach reduced the number of migration but main problem with this approach is that they used the fixed value of lower and upper threshold. 2. Literature Survey 3. Proposed Work Paul et al. [9] proposed an algorithm which is focus on how to utilize resource efficiently in cloud computing and gain maximum profits. They treated task scheduling as a general assignment problem to find the minimal cost. For this purpose, they proposed a credit based scheduling algorithm, which evaluate the entire group of tasks in the task queue and find the minimal completion time of all tasks. The proposed scheduling method considers the scheduling problem as an assignment problem in mathematics where the cost matrix gives the cost of a task to be assigned to a resource. Main aim of this algorithm is to assign the resources for which the corresponding completion time of all jobs is the minimum. Problem with this algorithm is that it only considers the probability of a resource to be free soon after executing a task so that it will be available for the next waiting, but processing time of a job are not considered. A cloud environment consists of data center, VM and host. Each data center can have multiple hosts and each host can run number of VM. When user demands for the resources VMM create a VM and assign to the user. VMM is a main part of the virtualization, which handle all VM related task. So VM creation, deletion and scheduling all are done by the VMM. It is also responsible for the monitoring of the resources such as CPU, RAM used by the VM and PM. Resource utilization can be increased by the virtualization but for the proper utilization of the resource an efficient load balancing approach is required that take the decision according to the situation. Here we proposed double threshold based dynamic load balancing approach, where thresholds are calculated based on the host utilization. If load on the host is below the upper threshold all VM running on that host are move to the other host, which is known as a server consolidation. If load on the host is greater than the upper threshold then our host is overloaded therefore some VM has to be migrated. When the load on the host is below / above the threshold then VM migration strategy are used. It is a technique where VM is move from one host to another host. During the migration VM is suspended for a few times, that will decrease the performance of the system. So an Subramanian S. et al. [10] proposed apriority based algorithm for the VM scheduling. In this approach VM are scheduled according to the priority. They assigned some priority for each job, which varies dynamically based on their capacity and load factor. This dynamic priority concept leads to better utilization Rajyashree, IJECS Volume 4 Issue 1 January, 2015 Page No.9966-9970 Page 9967 effective load balancing approach should minimize the number of migration. Main objective of our approach is to reduce the number of migration. T1 = T2 = Four steps are involved in the VM migration. i. Calculate load on the PM and VM. T3 = ii. Calculate the upper and lower threshold to find the overloaded and undreloaded condition. temp ← (T1 + T2 + T3 )/3 iii. Select the best VM for the migration Tupper = 1- x*temp iv. Select the best host to place the selected VM 3 Tupper = 1-5*temp/100 Load Calculation for the Physical and Virtual Machine We consider three parameter i.e. CPU, memory and bandwidth for the load calculation. So each VM have it own CPU, memory and bandwidth. Load on the VM can be calculated as VMcpu = Tlower =0.03 Where n is the number of VM in the host and x is the percentages of the temp. Based on the experiment x=.05 is the suitable value, which maintain the tradeoff between the number of migration and resources wastages. Threshold for the next interval is calculated based on the previous history i.e. threshold for the t2 interval depends on the host utilization in the t1 interval VMbw= 3.2 Virtual Machine Selection VMram= Load on the VM is depends on the CPU utilization. So load of the VM is directly proportional to CPU utilization and define as a VMload = = Total load on the host is the total load of the VM running into that host. If there are n VM on pth host then average load on the pth host can be calculated by the given equation PMload = 3.1 Lower and Upper Threshold Calculation Two thresholds i.e. lower and upper are used to define the overloaded and underloaded host. These thresholds can be Static and dynamic. In the static threshold lower and upper thresholds are fixed and they not changed with time, while in the dynamic threshold, lower and upper thresholds are changed with time. Dynamic threshold is more suitable for the cloud, where resources required by the VM are changed dynamically. It is analyze that VM migration possibility increase with the threshold. That means as the upper threshold increase it will also increase the possibly of the migration. Most of the work done only considered the CPU for calculating the load, but RAM is the most critical element in the system as compare to the CPU. So for calculating the upper threshold we consider CPU, RAM and bandwidth with equal weight. Each host can have number of VM. So which VM is selected for the migration affect the total migration time and down time? Down time is the time for which VM not available to the user and total migration time is time required to transfer the whole machine. If we select the large VM than it will increase the total migration time and down time and if we select the small VM then number of VM have to be migrated. So in our approach we select the VM which size is greater than or equal to the difference between the upper threshold and the host utilization. Sudo code for the VM selection given below 1. Input: hostList, vmList Output: migrationList 2. Arrange each host into decreasing order of their utilization 3. for each h in hostList do 4. hostUtil ←host.util() 5. bestVmUtill ← Utilization of first VM 6. while hostUtil > host.upThresh do 7. for each vm in vmList do 8. diff ← hostUtil ─ host.upThresh 9. if vm.util() > diff then 10. temp ← vm.util() 11. if temp < bestVmUtill then 12. bestVmUtill ← temp 13. bestVm ←vm 14. else 15. if bestVmUtill = First VM then 16. bestVm ← vm 17. break 18. hostUtil ← hostUtil ─ bestVm.util() 19. migrationList.add(bestVm) 20. vmList.remove(vm) Algo for the consolidation 1. if hotUtil < lowThresh() then 2. Migrate all VM from the host Rajyashree, IJECS Volume 4 Issue 1 January, 2015 Page No.9966-9970 Page 9968 3.3 Select the Host to Place the Selected VM Target PM Selection is the most critical step in the VM migration, because it affects the overall performance of the system. Wrong selection of the PM may increase the number of VM migration as well as resource wastage. In our approach we select the VM which is power efficient. 1. 2. 3. 4. 5. 6. 7. 8. 4. Input: hostList, vmList Output: allocation of VMs Sort all PM according their utilization foreach vm in vmList do foreach host in hostList do if Host_Load<=H_UTD && Host_Load>=H_LTD Assign VM to the host where less increment in the power else Activate new host and assign VM to that host Experiment Result To implement our approach we are using CloudSim simulator [14]. This simulator is based on the Java and contained the classes, for all the function which is required to implement the cloud based approaches. To check the efficiency of our approach we compare our algorithm with the exiting energy aware resource allocation approach [13]. We have simulated a data center 10 PM. Each PM is modeled to have one CPU core with the performance equivalent to 1000, 8 GB of RAM and 1 TB of storage. Maximum power consume ed by the host is 250 W. So according to the power model [13], a host consumes 175 W with 0% CPU utilization, up to 250 W with 100% CPU utilization. Each VM requires one CPU core with 250 MIPS, 128 MB of RAM and 1 GB of storage. Each VM runs some application with 150,000 MI, which required 10 min on the 250 MIPS with 100% utilization. To generate the variable load a uniform random function is used, which generate the random value between 1-250. Since requested MIPS by the VM changed every time, so for each execution it gives the different number of migration for the same number of physical and virtual machine. Therefore each experiment has been run 10 times. Initially we take 10 hosts and 20 VM. To calculate the upper threshold we execute our approach 20 times for the different value of X, where is the percentage (X=.03 to .08) and calculate the average number of migration. We found that x=.05 is the best value. Figure-3 For calculating different value of X To compare the efficiency of our approach, both approach are executed 7 times and compare the number of migration. Figure-4 Comparison of number of migration Total energy consume by the data center is depends on the number of migration. So we plot the graph between the energy consumption and number of migration. Conclusion Load balancing is a very important task in every system, because the system performance is totally depends on the load management. But load balancing in cloud is very challenging task, due to the resource required by the VM is changed dynamically. Furthermore resources in the cloud are distributed dynamically. In this paper we proposed a double threshold based load balancing approach. In this approach VM migration approach is used to balance the system. Lower threshold are use to implement the concept of server consolidation and upper threshold are use for the load balancing. Experiment result show that our approach reduced the number of migration as well as energy consumption. 5. References [1] M. Armbrust et al., “Above the Clouds: A Berkeley View of Cloud Computing”. In: EECS Department, University of California, Berkeley (2009) Rajyashree, IJECS Volume 4 Issue 1 January, 2015 Page No.9966-9970 Page 9969 [2] RK Gupta et al., “A Complete Theoretical Review on Virtual Machine Migration in Cloud Environment”, IJ- Closer, vol. 3, pp. 172-178, 2014. [3] V. Sarathy et al., “Next generation cloud computing architecture”, 19th IEEE int. workshop on enabling technology: infrastructure for collaborative enterprise, pp.48 -53,2012. [4]. R. Buyya et al. Market-oriented cloud computing: Vision, hype, and reality for delivering it services as computing utilities, Proc. of the 10th IEEE Intl. Conf. on High Performance pp. 54-58, 2011. [5] Borja Sotomayor et al., “Enabling cost-effective resource leases with virtual machines,” Research Gate article may 2014.. [6] L. Cherkasova et al. “When virtual is harder than real: Resource allocation challenges in virtual machine based it environments” in proc. 10th conference on hot topic in operating system, Vol. 10, pp.20-20, 2005 [7] H. Jin et al., Live virtual machine migration with adaptive memory compression” proceeding of the IEEE international conference on cluster computing, pp. 1-10, 2012. [8] H. Jin et al., “Live migration of virtual machine based on full system trace and replay”, proceeding of the 18th ACM 2009. [9] Paul, M. et al. “Task-scheduling in cloud computing using credit based assignment problem”,.International journal of Comput. Sci. Eng., pp. 26-30, 2011 [10] Subramanian S et al., “An Adaptive Algorithm For Dynamic Priority Based Virtual Machine Scheduling In Cloud” IJCSI International Journal of Computer Science Issues, Vol. 9, Issue 6, No 2, November 2012. [11] Mayank Mishra et al., “On Theory of VM Placement: Anomalies in Existing Methodologies and Their Mitigation Using a Novel Vector Based Approach”, IEEE/ACM 4th international conference on cloud computing, pp 275-282, July 2011. [12] T. Wood et al., “Black-Box and Gray-Box strategies for virtual machine migration”, NSDI'07 Proceedings of the 4th USENIX conference on Networked systems design & implementation, pp. 7-17, 2007 [13] A. Beloglazov et al. “ Energy-aware resource allocation heuristics for efficient management of data centers for Cloud computing”, Elsevier journal of Future Generation Computer Systems, pp. 755–768, 2012. [14] R.N. Calheiros et al., “CloudSim: a toolkit for modeling and simulation of cloud computing environments and evaluation of resource provisioning algorithms, Software: Practice and Experience”, pp. 23–50, 2011. Rajyashree, IJECS Volume 4 Issue 1 January, 2015 Page No.9966-9970 Page 9970