INTERNATIONAL JOURNAL OF ADVANCED RESEARCH IN ENGINEERING AND TECHNOLOGY (IJARET) International Journal of Advanced Research in Engineering and Technology (IJARET), ISSN 0976 ISSN 0976-6480 (Print) ISSN 0976-6499 (Online) Volume 5, Issue 4, April (2014), pp. 230-238 IAEME: www.iaeme.com/ijaret.asp Journal Impact Factor (2014): 7.8273 (Calculated by GISI) www.jifactor.com IJARET I A E M E LOAD BALANCING IN CLOUD USING PROCESS MIGRATION Dr. Narayan A. Joshi Associate Professor, CSE Department NIRMA University Ahmedabad, Gujarat, India. ABSTRACT Advancements in processing, storage and networking technologies have stimulated enhancements and acceptance of virtualization and cloud computing technologies. Due to rapid innovations and availability of the state of the art computing technology and growing market competition, it has become essential for service providers to serve the cloud based services in proficient manner. The day by day growing demands for cloud-based resources have made the resource allocation task very challenging for the cloud service providers to keep up with the SLAs. To earn customer satisfaction and more revenue, the service providers are forced to efficiently organize and manage the cloud infrastructural resources. The concept of load sharing can be a solution for optimized resource allocation in such scenarios. The paper describes a load balancing algorithm by means of the process migration mechanism. The behavior of suggested implementation is shown in the paper. Keywords: Cloud Computing, Virtualization, Load Balancing, Load Sharing, Process Migration. 1. INTRODUCTION The developments in microelectronic semiconductor technology have given rise to the availability of high-speed inexpensive storage and processing units. In addition to such evolutions, the improvements in internetworking technology have become one of the major driving forces in the innovation of not only loosely-coupled distributed systems but also the virtualization and cloud computing technologies [9]. Moreover, it is seen that the loosely-coupled distributed systems and cloud computing technologies have been widely accepted by the IT solution providers for implementation of modern computing solutions. Several key features including tolerance, higher scalability and better reliability, better resource utilization and sharing, flexibility, on-demand 230
availability are the motivating factors behind acceptance of the distributed and cloud computing environments. In general, the cumulative computational capability of the interconnected workstations and the virtual machines across the distributed and the cloud computing environment, theoretically appears much larger than the capability of an individual virtual machine or an isolated computer system. However, it is common that in a distributed and cloud computing environments with a number of networked virtual machines and workstations, some of them may be overloaded while other of them may be left almost idle which resulting into wastage of the computing power that goes unused. This means, there are chances that some of the nodes are heavily loaded, while others are left under loaded; which in effect causes utilization of only a fraction of overall theoretical computing power. However, performance gains and the optimum resource utilization may be achieved by transferring processes from the heavily loaded virtual machines to the lightly loaded or idle virtual machines known as load balancing [10] Section 2 of the paper describes related work and existing approaches towards load balancing in cloud and distributed systems. Section 3 focuses on the process migration mechanism. The suggested load balancing mechanism is described in section 4. Section 5 focuses on the outcomes of the algorithm suggested in the section 4. Some of the implementation issues and assumptions are mentioned in section 6. Finally, the concluding remarks and further scope of research are summarized in section 7. 2. RELATED WORK The cloud computing environment comprises of the building blocks such as data centers, distributed servers and users. Well-designed implementation and usage of cloud computing environments may help in solving several having different operational and behavioral demands such as- on-demand availability, flexibility, fault tolerance, scalability, reduced cost of ownership and effective utilization and sharing of resources [4][13]. However, sometimes the implementation of cloud computing environments using virtualization technology may result into performance reduction for the processor centric and memory crunching computational jobs [15]. The resource management mechanisms sometimes also associate with the load balancing mechanisms not only to improve utilization and response time but also to avoid situations where some of the virtual machines are overloaded while others are lightly loaded or sitting idle. Accordingly, the load balancing mechanism sees that all the networked virtual machines perform nearly the equal amount of jobs [6], [14]. Difficulties faced in joining different cloud computing environments are discussed in [2]. The load balancing work suggested in [3], is based on the number of connections. It determines the nodes having least number of connections first and then sends requests to such nodes. Reference [1] has proposed an improved implementation of [3]; he has focused on session switching at the application layer. Additionally, it calculates the connection time between the client and the node. Availability of unlimited virtual resources is an important characteristic of cloud-based infrastructures. However, it may always not be feasible for providers to guarantee the allocation of all the demanded resources [8]. They have suggested significant work showing reduction in SLA violation in federated clouds environment. Reference [17] suggests a load balancing technique which collects the workload information of nodes using the ants behavior and accordingly assigns the job-request to appropriate node. An effort has been suggested in [7] has to solve the synchronization issue of [17]. The suggested work is based on committing suicide by an ant however. The work suggested in [13], aims to provide dynamic load balancing by reducing duplication of data by suggesting the Index Name Server algorithm. The work presented in [14] suggests load balancing efforts by allocating the job requests to the node which is having the least number of connections. Moreover, [11] and [10] present work related to centralized and distributed 231
load balancing mechanisms for homogeneous networked systems. A resource aware load balancing work which provides better results using exponential smoothing forecast is presented in [16]. However, the discussion made so far shows that there is a scope for the betterment in the existing work. Here we focus on efficient resource allocation using load balancing by means of the process migration mechanism. Though there are huge scopes in adoption of cloud based computing services, there is a lack of standardization in the development and application of process migration mechanism and open source cloud computing services. 3. PROCESS MIGRATION The issue of efficient resource utilization in cloud computing environments can be addressed by distributing workload of a virtual machine among other virtual machines in the cloud using process migration. The implementation of process migration technique may result into efficient overall system utilization by making use of the idle virtual machines [12]. The technique involves transfer of a process from one virtual machine to another virtual machine in the cloud. The dynamic process migration technique involves critical operations such as collecting the current state information of the desired process running on the source virtual machine, move the collected information to the desired destination virtual machine, restore the process state on the destination virtual machine and resume the restored process for execution [5]. 4. MECHANISM The architecture of suggested load balancing algorithm and comprising modules are described here and depicted in figure1. The cloud provider maintains a dedicated virtual machine or a physical machineand designates it as a ServerVM; for simplicity and cost-cutting reasons, the cloud controller itself may be made to act as a ServerVM. The virtual machines in the cloud other than the ServerVM which have signed the contract for availing load balancing facility provided by the cloud service provider, we name them as member virtual machines or membervms. The ServerVM is assigned a role to handle and retain the workload measurements of the member virtual machines. Additionally, the cloud service provider reserves one more virtual machine or physical machine, say BalancerVM, which is dedicated to the job of balancing the workload of member virtual machines. In order to carry out the assigned role, the BalancerVM determines the overloaded member virtual machines, the idle member virtual machines (or the under loaded member virtual machines) and with the help of the VMProcessMigrator module, it performs load balancing between the overloadedvm and the underloadedvm. Moreover, the suggested algorithm facilitates the overloaded member virtual machine to take load balancing decisions by itself instead of relying upon the load balancing decisions given by the BalancerVM; the overloaded membervm may make load balancing requests to other under loaded membervms in the cloud. However, the algorithm prevents the underloadedvm from receiving consecutive load balancing requests, thereby preventing such membervms from spontaneous overstretching. Sometimes, it may inadvertently happen that the BalancerVM consecutively picks the same underloadedvm as a destination for redirecting the surplus workload from multiple overloaded membervms. Suppose, at time T1 the BalancerVM determines the same virtual machine VMi as underloadedvm and therefore it may select the VMi as an endpoint for load balancing. Because of (i) the latency in process migration and (ii) the process scheduling policy on VMi, the migrated process may resume on VMi after some time say T2. Here, T2 includes the waiting time in ready queue say Tr and the time taken for actual migration say Tm i.e. T2 = Tr + Tm. As a result, during the transitional time (i.e. T2 T1), the VMi will appear as an underloadedvm to not only the 232
BalancerVM but also the other membervms; which in turn may encourage them to pick the VMi as an endpoint for their further load balancing decisions; thereby causing overburdening of VMi which was initially considered as an underloadedvm. The algorithm therefore assigns every membervm one of the three state flag values ACTIVE, PASSIVE and INACTIVE [11]. Figure 1: Architecture of Load Balancing in Cloud using Process Migration The algorithm suggested here extends the work suggested in [10] & [11] in the context of virtualization and cloud computing, and comprises of the following foremost steps: 1. Implement a module VMPortal which resides and continuously executes on participating membervm, periodically determines the workload information of the virtual machine, and periodically sends the capacity vector and the workload details to the ServerVM. 2. The ServerVM module continuously executes and receives the capacity vectors and workload information which are periodically sent by the VMPortal residing on all membervms in the cloud. The module periodically updates the availability status of the membervms in its repository to ACTIVE, PASSIVE or INACTIVE. One of its thread periodically (time interval Tp) toggles the current status into ACTIVE state from PASSIVE state (i.e. PASSIVE- 233
>ACTIVE) of the VM which was earlier (i.e. before time interval Tp) picked up as an endpoint for load balancing by the BalancerVM module. 3. The BalancerVM module runs in collaboration with the ServerVM module: it determines the ACTIVE overloaded and ACTIVE under loaded virtual machines on the basis of the workload information and the capacity vectors available, instructs the overloadedvm VMo to transfer some of its workload to the underloadedvm VMu. Following the dispatch of migration instruction, it immediately updates the status of the underloadedvm VMu to PASSIVE state. 4. The VMRequestDispatcher module runs on the membervms and periodically determines whether the virtual machine has become overloaded or not. If the virtual machine is determined as overloaded, then depending upon the SLA signed with the cloud service provider, it dispatches load balancing request to either the BalancerVM or the peer membervms in the cloud. In case of the request pertaining to the BalancerVM, the BalancerVM may indicate to it about the underloadedvm as an endpoint to which it may transfer the workload. Otherwise, it waits for the reply from the peer membervms. In case of an affirmative reply, it performs load balancing by making process migration with the help of VMProcessMigrator module; otherwise, it keeps on doing round robin policy for in turn membervms in the cloud. 5. The VMRequestListener module also runs on the peer membervms; it listens for incoming requests for load balancing sent by the VMRequestDispatcher module. After receiving the request, the module decides whether to accept it or not and replies the same to the source VMRequestDispatcher module. If it decides to accept the load balancing request, then it toggles its status as PASSIVE and informs the updated status to the ServerVM also. 6. The workload shifting workis carried out in the form of process migration from the overloadedvm to the underloadedvm,via the send_migartion_order() function which is performed by the VMProcessMigrator module [10], the module resides on all participating member VMs in the cloud. The outline of the BalancerVM module includeing some of the foremost data structures and functionsare described here. Module BalancerVM { struct VMCapacityVector { int ncpu, float ghz, long tot_ram, free_ram, long free_disk_space; int bandwidth; }; enum vm_stat {INACTIVE=0, ACTIVE=1, PASSIVE=2}; struct VMLoad { char ip_address[16]; //IP address associated with the VM double load; //VM s current load history int current_status; // VM is ACTIVE or PASSIVE or INACTIVE unsigned long time_of_passive_set; //time when current status is set to PASSIVE 234
}; void BalancerVM() { struct VMLoad* p_overloadedvm; //represents overloaded VM struct VMLoad* p_underloadedvm; //represents under loaded VM int seep_t=10; //indicates sleeping time interval for this function while(1) //run continuously { sleep(sleep_t); //find out the underloadedvm in the cloud p_underloadedvm = find_underloaded_vm(); if(!p_underloadedvm) //if no underloadedvm is available continue; //find out the overloadedvm in the cloud p_overloadedvm = find_overloaded_vm(); if(!p_overloadedvm) continue; //verify the capacities of the source and destination if(capacity_vector of underloadedvm >= capacity_vector of overloadedvm) { //begin transaction by setting semaphore //toggle status of underloadedvm p_underloadedvm->status = PASSIVE; /* also askthe selected underloadedvm to update its status */ //process migration from overloadedvm to underloadedvm send_migration_order(p_overloadedvm, p_underloadedvm); } } }//end of funciton } //end of module //end transaction by resetting semaphore 5. OUTCOMES The behavior of the suggested load balancing algorithm is discussed here: The figure 2 depicts the snapshot representing the overloaded virtual machine having workload 1.240 at IP 169.254.254.49. 235
Figure 2: Before load balancing The figure 3 depicts the snapshot representing reduction in the workload of the virtual machine 169.254.254.49 after application of the suggested load balancing algorithm which migrates its workload to the underloadedvm 169.254.254.50. An important advantage of the suggestedload balancing technique for cloud environment is that the proposed algorithm performs the task of load sharing by shifting the desired process instead of the whole VM among virtual machines by means of the process migration mechanism. Thereby the technique avoids the need of migration of an entire virtual machine among the physical nodes in the cloud. Moreover, if desired, the suggested load balancing mechanism may also act across multiple physical nodes in the cloud environment, thereby allowing process migration from one physical node to another physical node. Figure 3: After load balancing using process migration 236
6. IMPLEMENTATION ISSUES The suggested algorithm takes the service of process migration mechanism to carry out the transfer of workload between the member virtual machines. A coupleof issues need to be addressed on the aspect of implementation of process migration mechanism in the cloud computing environment. One of the implementation issue is fault tolerance. The algorithm assumes the availability of the dedicated controlling systems including the ServerVM and the BalancerVM. However, the suggested steps have taken care about the issue of fault tolerant load balancing unavailability of the ServerVM and the BalancerVM will not at all bring down the load balancing mechanism, instead the peer member virtual machines will keep on doing load shifting themselves without requiring consultation from the ServerVM and the BalancerVM. Another implementation issue is security in the process migration mechanism and the cloud computing environment. The source and destination virtual machines need to have very strong confidence on each other. Here we assume that the source virtual machine trusts that the destination virtual machine will not disturb the execution of migrated process. Vice versa, the destination virtual machine also assumes that the migrated process sent by the source virtual machine is trustable and not harmful for the destination virtual machine environment. However, the suggested mechanism focuses on the accomplishment of the load balancing functionality by means of the process migration mechanism, and leaves various security issues including the one discussed above, on the service level agreements and the practice of signing up for the membership for availing the load balancing among virtual machines in the cloud computing environment. 7. CONCLUDING REMARKS A novel idea representing the task of load balancing in cloud computing environment by means of the process migration mechanism is suggested in this paper. Our future aim is to minimize the migration latency. Moreover, as justified in the implementation issues section above, future work may be carried out for redesigning the policy documents which are required for the service level agreements due to the presence of load balancing facility. Furthermore, we intend to carry out further work to frame and suggest a policy document which will be required for signing up an additional agreement for [becoming a member for]availing the load balancing service by means of process migration from the cloud service provider. REFERENCES 1. B. Radojevic and M. Zagar (2011), "Analysis of issues with load balancing algorithms in hosted (cloud) environments." In proceecings of 34th International Convention on MIPRO, IEEE. 2. B. Rochwerger, D. Breitgand, E. Levy, A. Galis, K. Nagin, I. M. Llorente, R. Montero, Y. Wolfsthal, E. Elmroth, J. Caceres, M. Ben-Yehuda, W. Emmerich, and F. Galan (2009), The Reservoir model and architecture for open federated Cloud computing, IBM Journal of Research and Development, vol. 53, no. 4, pp. 1 11, July. 3. B. Sotomayor, R. Montero, I. Llorente, and I. Foster (2009), "Virtual infrastructure management in private and hybrid clouds," in IEEE Internet Computing, Vol. 13, No. 5, pp: 14-22. 4. H. Qian, H. Zu, C. Cao, and Q. Wang (2013), Css: Facilitate the cloud service selection in IaaS platforms, Proceeding of IEEE International Conference on Collaboration Technologies and Systems. 237
5. J. C. Sancho, F. Petrini, K. Davis, R. Gioiosa and S. Jiang (2005), Current Practice and a Direction forward in checkpoint/restart implementations for fault tolerance, Proceedings of 19 th IEEE International Symposium on Parallel and Distributed Processing. 6. J. Gasior and F. Seredynski (2012), Load balancing in cloud computing systems through formation of coalitions in a spatially generalized prisoner s dilemma game, in Cloud Computing 2012, Third International Conference on Cloud Computing, GRIDs, and Virtualization, pp. 201 205. 7. K. Nishant, P. Sharma, V. Krishna, C. Gupta, KP. Singh, N. Nitin and R. Rastogi (2012), "Load Balancing of Nodes in Cloud Using Ant Colony Optimization." In proc. 14th International Conference on Computer Modelling and Simulation (UKSim), IEEE, pp. 3-8, March. 8. K. Patel and A. Sarje (2012), VM Provisioning Method to Improve the Profit and SLA Violation of Cloud Service Providers, IEEE International Conference on Cloud Computing in Emerging Markets, October. 9. N. Joshi and D. Choksi (2011), Checkpointing Process VMA for Process Migration, Journal of Emerging Trends in Computing and Information Sciences, ISSN- 2079-8407, Vol.2 Special Issue, pp. 7-10. 10. N. Joshi and D. Choksi (2012), Mechanism for Implementation of Load Balancing using Process Migration, International Journal of Computer Applications, ISSN- 0975-8887, Vol.-40 No.-9, pp. 16-18, February. 11. N. Joshi and D. Choksi (2013), Balancing the Load of Networked Workstations, Journal of Information, Knowledge and Research in Computer Science and Applications, ISSN: 0975-6728, Vol.-2 Issue-2, pp. 119-122, February. 12. N. Vasudevan, P. Venkatesh (2006), Design and Implementation of a Process Migration System for Linux Environment, 3 rd International Conference on Neural, Parallel and Scientific Computations, Atalanta, USA. 13. R. Buyya, C.S. Yeo & S.Venugopal (2009), "Market-oriented Cloud computing: Vision, hype, and reality of delivering IT services as computing utilities," 10th IEEE International Conference on High Performance Computing, pp. 5 13. 14. R. Lee and B. Jeng (2011), Load-balancing tactics in cloud, in Proceedings of the International Conference on Cyber-Enabled Distributed Computing and Knowledge Discovery, IEEE Computer Society, pp. 447 454. 15. S. Ristov, G. Velkoski, M. Gusev, and K. Kjiroski (2013), Compute and memory intensive web service performance in the cloud, in ICT Innovations 2012,Springer Berlin, vol. AISC 257, pp. 215 224. 16. X. Ren, R. Lin and H. Zou (2011), "A dynamic load balancing strategy for cloud computing platform based on exponential smoothing forecast" in proceedings of International Conference on Cloud Computing and Intelligent Systems, IEEE, pp. 220-224, September. 17. Z. Zhang and X. Zhang (2010), "A load balancing mechanism based on ant colony and complex network theory in open cloud computing federation", in proceedings of 2nd International Conference on. Industrial Mechatronics and Automation, IEEE, Vol. 2, pp. 240-243, May. 18. D.Asir, Shamila Ebenezer and Daniel.D, Adaptive Load Balancing Techniques in Global Scale Grid Environment, International Journal of Computer Engineering & Technology (IJCET), Volume 1, Issue 2, 2010, pp. 85-96, ISSN Print: 0976 6367, ISSN Online: 0976 6375. 19. Priya Deshpande and Sunayna Giroti, Priority Based Dynamic Adaptive Checkpointing Strategy in Distributed Environment, International Journal of Computer Engineering & Technology (IJCET), Volume 4, Issue 6, 2013, pp. 378-385, ISSN Print: 0976 6367, ISSN Online: 0976 6375. 20. M. A. Mahajan and G. T. Chavan, Use of Multiple Ant Colony Optimization for Load Balancing in Peer to Peer Networks, International Journal of Computer Engineering & Technology (IJCET), Volume 4, Issue 3, 2013, pp. 419-425, ISSN Print: 0976 6367, ISSN Online: 0976 6375. 238