• No results found

Energy Efficient Load Balancing of Virtual Machines in Cloud Environments

N/A
N/A
Protected

Academic year: 2021

Share "Energy Efficient Load Balancing of Virtual Machines in Cloud Environments"

Copied!
14
0
0

Loading.... (view fulltext now)

Full text

(1)

Energy Efficient Load Balancing of Virtual Machines in Cloud

Environments

Abdulhussein Abdulmohson

1

, Sudha Pelluri

2

and Ramachandram Sirandas

3

University of Kufa - Alnajaf-Iraq

1

Osmania university-Hyderabad-India

2,3

[email protected]

1

,

[email protected]

2

,

[email protected]

Abstract

Today Cloud computing is used in a wide range of domains. By using cloud computing a user can utilize services and pool of resources through internet. The cloud computing platform guarantees subscribers that it will live up to the service level agreement (SLA) in providing resources as service and as per needs. However, it is essential that the provider be able to effectively manage the resources. One of the important roles of the cloud computing platform is to balance the load amongst different servers in order to avoid overloading in any host and improve resource utilization. The concept of Genetic algorithm is specifically useful in load balancing for best virtual machines distribution across servers. In this paper, we focus on load balancing and also on efficient use of resources to reduce the energy consumption without degrading cloud performance.

Keywords: Cloud computing, load balancing, genetic algorithm, energy efficient

management

1. Introduction

With the explosive growth of the use of cloud computing ,the workload on servers is increasing rapidly and servers may easily be overloaded. The effective use of resources is important to serve a large number of customers, maximizing productivity and reducing the response times in cloud. Effective management of resources also enables minimize resource starvation, avoid possible overloads and ensure fairness amongst the parties utilizing the resources. Load balancing has great impact on performance in a cloud computing environment, it makes the cloud more efficient and improve user satisfaction. Energy efficient Load balancing is an effective way to reduce resource consumption and serve a large number of users and hence improve performance. Energy efficient Load balancing using genetic algorithm uses the memory, CPU, bandwidth as a parameters for calculating the load of each host and migration cost for each virtual machine (Migration parameters should not increase load and reduce the benefit of transfer of virtual machine to another server). During low-workload hours, the CPU utilization is less than we’d like. As a result, overall memory and CPU utilization is not as efficient as we’d like. For example, one specific type of Facebook server consumes about 60 watts when the server is IDLE, while the consumption jumps to 130 watts when it runs low-level CPU task [16]. But surprisingly, at high load the power consumption is only 150 watts. The difference between the power consumption in low load and high load is only marginal. Hence, it would be highly beneficial to run high load on most servers. To do that, we try to decrease the number of servers running by combining the total load and accommodating it in less numbers of servers without overloading on any servers. We can hibernate some servers by efficiently managing the load on servers. The main gain is obtained by reducing the number of servers that are switched- on.

(2)

2. Proposed System Architecture

Figure 1. System Architecture

As shown in Figure 1 we have used VMware workstation to implement our algorithm, there are four Vsphere servers (ESXi 5.1) each server contains four virtual machines (windows XP as operating system), one server for management (Vceneter 5.1) and one server as a storage server (FreeNAS 9). Energy efficient load balancing procedure done by Java language using Eclipse luna (4.4.1). Eclipse luna connected to VMware workstation by using VMware api. Using VMware, we can move active VMs as quickly and as seamlessly as possible from one physical server to another with no service interruption. The VMware Vmotion is faster than other type of virtual environment for example the VMware Vmotion solution was up to 5.4 times faster than the Microsoft Hyper-V Live Migration solution, therefore we use VMware in this work [16].

3. Load Balancing

A technique to spread work between two or more computers, in order to get optimal resource utilization, maximize throughput, and minimize response time is called load balancing . To achieve these goals, the load balancing mechanism should be designed properly to distribute the load across the servers. Hence, the load information on each server must be updated constantly, so that the mechanism for load-balancing work rapidly. In a centralized load-balancing algorithm, the global load information is collected at a single server (central server). The central server will make all the load balancing decisions based on the information that is collected from other servers and virtual machines. This decision is taken by using the Genetic algorithm as applied to the current scenario, and explained in detail in the next section. After getting the decision the central server starts giving orders to rest of the servers to change their virtual machines' position by migration these virtual machines to these new servers.

4. Live Migrating of Virtual Machine

Live Migration of virtual machine is an advanced feature that allows running virtual machine to continue throughout a migration from one physical host to another. After the virtual machine is migrated to the new host, it runs on the new host. From outside, users don’t observe much noticeable disruption of services on the virtual machine. When migration happens, the entire state of the virtual machine and its configuration file, if necessary, are moved to the new host. The associated virtual disk remains in the same location on the storage that is shared between the two hosts.

(3)

The Cost of VM Live Migration

Live migration of VMs (in VMware environment called Vmotion) means transfer of virtual machines between Vsphere (servers) without suspending running virtual machines. As mentioned in part II above, this goal can be achieved in VMware in a short downtime and without users’ sensing change of their work environment. Live migration reduces the performance of applications running on a virtual machine during migration. We used equations (1) and (2) as mentioned in [15] to calculate the migration time and performance degradation.

𝑇𝑀𝑗=𝑀𝑗

𝐵𝑗 . . . (1) 𝑈𝑑𝑖= 0.1. ∫𝑡𝑜+𝑇𝑚𝑗𝑈𝑗(𝑡)𝑑𝑡 . . . (2)

𝑡𝑜

Where Udj is the total performance degradation by virtual machine j, t0 is the time when the migration Starts, TMj is the time taken to complete the migration, Uj (t) is the CPU utilization by VMj, Mj is the amount of memory used by VM j, and Bj is the available network bandwidth.

5. Genetic Algorithm

A genetic algorithm is a search heuristic that mimics the process of natural selection. This heuristic is routinely used to generate useful solutions to optimization and search problems, which generate solutions to optimization problems using techniques inspired by natural evolution, such as inheritance, mutation, selection, and crossover.

Steps of Genetic Algorithm

A. Population Coding:

The coding method depends on the property of the problem and the design of genetic operators. The binary encoding of chromosome is the classic genetic algorithm. Instead of binary encoding we used virtual machine encoding, each Individual contains 16 VMs which represent the running virtual machine plus "NULL" when there are some power off virtual machines like as in Figure 2.

Figure 2. Population Coding

B. Initialization of Population

The number of individuals are selected based on the type of work and our experience, In this work we determine 100 individuals in each population.

C. Fitness Function

Since the servers that contain all virtual machines can overload along one, two, three or four dimensions (memory, B.W, CPU, disk I/O) we define equation which capture the

(4)

combined all of these metrics for each server. The fitness equation calculated based on servers load and migration cost.

𝐹𝑖𝑡𝑛𝑒𝑠𝑠 =𝐴 − 𝐷𝑖𝑓𝑓𝑒𝑟𝑒𝑛𝑐𝑒 𝑙𝑜𝑎𝑑 𝐵 + 𝑚𝑖𝑔𝑟𝑎𝑡𝑖𝑜𝑛 𝑐𝑜𝑠𝑡

Where, A and B are weighted coefficients which are defined in concrete application. D. Selection Strategy

In Selection strategy, we select the individual of next generation, according to the principle of survival of the fittest. In this paper, we selected the best distribution of servers and virtual machine for this generation. The best distribution depends upon the fitness function by taking into consideration the migration cost. Selection strategy is the guiding factor in genetic algorithm’s performance. Different selection strategies will lead to different selection pressure or rather, the different distribution relationship of parental individuals of the next generation. We have chosen roulette wheel as a selection method for choosing the best parent and use these parent to produce children.

E. Crossover and Mutation

Genetic algorithm departs significantly from other evolutionary algorithms in the implementation of the operators of crossover and mutation. The most commonly used forms of crossover are VMs crossover. Given two servers, VMs crossover randomly (and independently) selects a crossover point in each parent tree. Then, it creates the offspring by replacing the number of VMs Starting from the crossover point in a copy of the first server with a copy of the same number of VMs Starting from the crossover point in the second server, as illustrated

Figure 3. Crossover between Two VSphere Servers

The common form of mutation is point mutation, which is genetic programming’s rough equivalent of the bit-flip mutation used in genetic algorithms. In point mutation, a random VM is selected and the primitive stored there is replaced with a different random primitive of the VMs taken from the primitive set.

6. Algorithm Analysis

We have implemented the algorithmic steps using our LAB which contains four servers, each server hosting four virtual machines. The steps that are followed:

(5)

1) In the first step, one server (Vsphere) is powered on and all other servers are IDLE state /Hibernating.

2) When user1 enters in the cloud he opens the main cloud page and enter username and password, the cloud controller decides which virtual machine belongs to this user. 3) If this virtual machine is located on an active running server then this virtual machine

is PowereOn and the user can use it, otherwise virtual machine migrates to the active server then it PowerOn.

4) The cloud controller checks the server performance to prevent the load from exceeding 90% of its capacity.

5) Users are constantly entering to cloud until the load becomes 90% of the first server capacity, at that time the second serves wakes up and load balancing is start between active servers. This ensures that the differences in Load become lesser.

6) The steps 2,3,4 continue for all new users or virtual machines load increase. Every period of time without new login, the cloud controller does load balancing where the IDLE servers wake up when the active server load becomes more than 90% of capacity.

7) When the user logout the cloud or the virtual machine load decreases. The cloud controller checks if the total load of all servers can be distributed in less number of server such that that new load of the current working server does not reach to 60% of the total capacity. When this condition is satisfied, the virtual machines at lightly loaded server migrates to remain servers and this server become IDLE.

These algorithms can be shown in Figure 4 and Figur 5 where Figure 4 explain energy efficient management while Figure 5 explain the load balancing procedure.

Figure 4. Energy Efficient Management Flowchart

Also In Figure 5 we can see the automatic energy efficient load balancing flowchart. If no new user login or no any user logout then the cloud manager for each time period (in our work we choose two minutes) checks the performance monitoring of all servers and do load balancing and energy efficient management of all those running servers. Also we have used a database to save the performance monitoring of all servers every 20 seconds (this interval determined by VMware environment) and calculate the power consumption, wastage of resources and load for each server.

(6)

Figure 5. Load Balancing Flowchart and of Automatic Energy Efficient Load Balancing Algorithm

7. Result

After we've applied energy efficient load balancing with GA and taking the migration cost into consideration, the VMs distribution becomes as shown in the following tables.

Table 1. Performance and Distribution of Four Virtual Machines on ESX Servers

VM ESX IP Memory CPU Disk

vm1 192.168.0.128 928152 90 1499

vm2 192.168.0.128 842208 26 153

vm3 192.168.0.129 680768 23 8

vm4 192.168.0.129 49584 2195 6

Table 2. Performance of ESX Servers after Load Balancing

ESX IP Memory CPU Disk Network

192.168.0.128 2640748 1066 2289 6549

(7)

Table 3. Performance and Distributions of Six Virtual Machines on ESX Servers

VM ESX IP Memory CPU

vm1 192.168.0.128 707852 22 vm2 192.168.0.129 921972 21 vm3 192.168.0.129 980396 39 vm4 192.168.0.129 1032224 22 vm5 192.168.0.128 1034272 19 vm6 192.168.0.128 12596 2190

Table 4. Performance of ESX Servers after Load Balancing

ESX IP Memory CPU Disk Network

192.168.0.128 3825268 3091 7937 8246

192.168.0.129 3412232 1147 429 40

Table 5. Performance and Distributions of Six Virtual Machines on ESX Servers

VM ESX IP Memory CPU Disk

vm1 192.168.0.128 220368 22 99 vm2 192.168.0.129 252464 20 212 vm3 192.168.0.129 471860 21 36 vm4 192.168.0.133 235316 230 19 vm5 192.168.0.129 275404 23 0 vm6 192.168.0.128 912500 23 351 vm7 192.168.0.128 865524 24 273 vm8 192.168.0.128 1022560 22 51 vm9 192.168.0.128 858504 14 51 vm10 192.168.0.133 1032256 105 858 vm11 192.168.0.129 1015020 2169 154

Table 6. Performance of ESX Servers after Load Balancing

ESX IP Memory CPU Disk Network

192.168.0.128 2637364 385 167 2126

192.168.0.129 2923596 642 755 21

192.168.0.133 3014592 428 1244 2369

Table 7. Performance & Distributions of 15 VMs on ESX Servers

VM ESX IP Memory CPU Disk

vm1 192.168.0.128 200640 20 30

vm2 192.168.0.128 708704 23 15

vm3 192.168.0.128 160360 25 66

vm4 192.168.0.133 380564 86 273

(8)

VM ESX IP Memory CPU Disk vm6 192.168.0.129 287684 62 98 vm7 192.168.0.129 151892 46 112 vm8 192.168.0.128 198988 63 194 vm9 192.168.0.133 394948 85 37 vm10 192.168.0.133 292592 25 27 vm11 192.168.0.129 279924 28 124 vm12 192.168.0.129 283620 48 43 vm13 192.168.0.129 985616 51 611 vm14 192.168.0.133 514472 51 350 vm15 192.168.0.133 6144 2184 37

Table 8. Performance of ESX Servers after Load Balancing

ESX IP Memory CPU Disk Network

192.168.0.128 2796668 859 3163 652 192.168.0.129 3113316 577 201 109 192.168.0.133 2893204 1442 3702 3482 192.168.0.133 321055 823 309 452

While table (9) and (10) describe the performance and distribution of virtual machine after doing energy efficient machine with GA procedure.

Table 9. Performance & Distributions of Six VMs on ESX Servers

VM ESX IP Memory CPU

vm1 192.168.0.128 698842 326 Vm4 192.168.0.129 922492 102 Vm7 192.168.0.129 780396 789 Vm8 192.168.0.128 1032224 134 Vm12 192.168.0.128 1024571 98

Figure 6. Fitness of Distribution of Virtual Machines on ESX Servers Table 10. Performance of ESX Servers after Energy Efficient Management

ESX IP Memory CPU Disk Network

192.168.0.128 2637364 385 167 2126

(9)

In the Figure (6) We can see the effect of using GA to get best result over many choices, the individual (72) and (55) are best individuals out of all individuals which represent the best distribution of virtual machine to get load balancing. Figure 7, 8, 9 and 10 shows the gain that gets for all servers by using energy efficient load balancing compare with same environment that use only load balancing algorithm (BLUE) and same environment without any load balancing or energy efficient management algorithm (RED). X axis represent the time (67 minutes) and y axis represent the percent profit of power.

Figure 7. Profit by Using Energy Efficient Load Balancing Compare with only Load Balancing Algorithm (BLUE), and No any Load Balancing or

Energy Efficient Management (RED)(server1)

Figure 8. Profit by Using Energy Efficient Load Balancing Compare with only Load Balancing Algorithm (BLUE), and No any Load Balancing or

Energy Efficient Management (RED)(server2)

Figure 9. Profit by Using Energy Efficient Load Balancing Compare with Only Load Balancing Algorithm (BLUE), and No any Load Balancing or

(10)

Figure 10. Profit by Using Energy Efficient Load Balancing Compare with Only Load Balancing Algorithm (BLUE), and No any Load Balancing or

Energy Efficient Management (RED)(server4)

Table 11 shows the comparison of power consumption over each server in the architecture by over three cases, first case when we use energy efficient load balancing algorithm, while second case when we use only load balancing algorithm, the third case when we did not use any improve algorithms. While Table 12 shows the resource wastage over these three cases.

Table 11. Servers Power Consumption and Resource Wastage over Three Cases

Power consumption Resource wastage

Servers Server 1 Server 2 Server 3 Server 4 Server 1 Server 2 Server

3 Server 4 Algorithms Energy efficient load balancing 13146 12038 9473 4238 59% 57% 38% 18.7% Load balancing 16006 15750 13303 11399 57% 53% 48% 58% NO any algorithm 15796 14838 14701 14384 44% 63.8% 63.9% 60.5%

From Tables 11 we can see that by using energy efficient load balancing we reduce 33.5% power consumption compared to the same environment that use only load balancing algorithm and 35% compared to the same environment that not use load balancing or energy efficient management. We can also see that by using energy efficient load balancing the wastage of resources, reduce by 11% compared to the same environment that use only load balancing algorithm and 15% compared to the same environment that not use load balancing or energy efficient management.

From Figure 11 we can see that the genetic algorithms are one of the best methods to get the optimal solution from thousands of solutions. For Example out of 16 Virtual machines we need 6227020800 Probability to get Best distribution of VM.BY using GA the Probability is less than 32 Repetition for 100 individual to get best result.

(11)

Figure 11. Genetic Algorithms Reputation for Each Login

8. Related Work

Many researchers have focused on energy saving and load balancing separately. Dynamic elastic service provided in cloud computing makes researchers focus on load balancing . Researchers try to reduce the power consumption in the low load times. Most researcher focus on either load balancing or energy aware capacity planning. Some of them use genetic algorithm as a dynamic algorithm to identify the target for placing the VM . For instance Xinlua et al.[1] use improved adaptive genetic algorithm to search best solution and takes real-time load parameters as a decision variable for resource scheduling model. While Jianhau et al. [2] considers the virtual machine resources with advantage of genetic algorithm and using the CPU utility. Kaleeswaran et al. [3] used a genetic algorithm for scheduling task according to computation and memory and the execution time is reduced by parallel processing. Sung et al. [4] the task scheduler calls the genetic algorithm function for every task. He uses throughput simulation time, average virtual machine utilization, average processing cost and number of tasks as a parameter. Shaminderkaur et al. [5] have modified the genetic algorithm with shortest cloudlet to faster processor and longest cloudlet to slowest processor . They use cloudlet makespan and cost as parameters. Other researchers focus on decreasing power consumption . For instance , Quanyan et al. [6] provide a control-theoretic solution to the dynamic capacity provisioning problem which minimizes the total energy cost . While meeting the task completition time requirements , they use Model Predictive Control (MPC) to find the optimal control policy. They use Simulations using real traces obtained from a production Google compute clusters. While Brian [7] presented an automated system for energy-aware server provisioning . It reduces energy and reliability costs in hosting clusters. Their results show that the system can quickly identify the optimal assignment of servers and they focus on server power management at the ensemble layer. Abbasi et al. [8] have proposed a workload distribution algorithm and thermal-aware server provisioning technique. They use heuristic methods to select active servers, and they use specific threshold that must not be exceed by server while they do the workload distribution to satisfy SLA.

9. Future Work

In next work we will focus on software as a service. In this service we will do load balancing and energy efficient management based on page request and histrorical data.

10. Conclusion

Due to demand fluctuations in the cloud, change of energy prices and dynamic capacity reconfiguration, each month cloud provider has to spend huge funds for electrical power. An Increase in the price of electricity makes it even more challenging for the provider. So it is essential for cloud providers to try to decrease the power consumption without affecting the services provided to the user. By using above mentioned approach, we can

(12)

save more than 33% of power in a lightly loaded system. As a result, even during high load, we can increase the number of users served by each server. Using genetic algorithm along with live migration cost computation provides less time consuming and energy efficient solution to a real challenging problem being faced by the cloud providers. This solution is a step in the direction to reduce total carbon footprint of the machines being used by the providers.

References

[1] Xin Lu, Jing Zhou and Dong Liu, “A Method of

Cloud Resource Load Balancing Scheduling Based on Improved Adaptive Genetic Algorithm, School of Computer Science and Engineering, University of Electronic Science and Technology of China.

[2] J. Gu, “A new resource scheduling strategy based on genetic algorithm in cloud computing environment”, Journal of Computers, vol. 7, no. 1, (2012), pp. 42-52.

[3] A. Kaleeswaran, V. Ramasamy, and P. Vivekanandan, "Dynamic scheduling of data using genetic algorithm in cloud computing”, Park College of Engineering and Technology, Coimbatore, India (1963).

[4] Jang and S. Ho, “The study of genetic algorithm-based task scheduling for cloud computing”, International Journal of Control and Automation, vol. 5, no. 4, (2012), pp. 157-162.

[5] S. Kaur, and A. Verma, “An efficient approach to genetic algorithm for task scheduling in cloud computing environment”, International Journal of Information Technology and Computer Science (IJITCS), vol. 4, no. 10, (2012), p. 74.

[6] Q. Zhang, “Dynamic energy-aware capacity provisioning for cloud computing environments”, Proceedings of the 9th international conference on Autonomic computing. ACM, (2012). [7] B. Guenter, J. Navendu and C. Williams, “Managing cost, performance, and reliability

tradeoffs for energy-aware server provisioning”, INFOCOM, 2011 Proceedings IEEE. IEEE, (2011).

[8] Z. Abbasi, G. Varsamopoulos, and S. KS Gupta, “Thermal aware server provisioning and workload distribution for internet data centers”, Proceedings of the 19th ACM International Symposium on High Performance Distributed Computing, ACM, (2010).

[9] S. Jin, “VMware VI and vSphere SDK: Managing the VMware Infrastructure and vSphere”, Pearson Education, (2009).

[10] Z. Xiao, W. Song, and Q. Chen, “Dynamic resource allocation using virtual machines for cloud computing environment”, Parallel and Distributed Systems, IEEE Transactions on vol. 24, no. 6, (2013), pp. 1107-1117.

[11] W. Jiang, “A Resource Scheduling Strategy in Cloud Computing Based on Multi-agent Genetic Algorithm”, TELKOMNIKA Indonesian Journal of Electrical Engineering, vol. 11, no. 11, (2013), pp. 6563-6569.

[12] J. Hu, ‘A scheduling strategy on load balancing of virtual machine resources in cloud computing environment”, Parallel Architectures, Algorithms and Programming (PAAP), 2010

Third International Symposium on. IEEE, (2010).

[13] M. O’Neill, R. Poli, W. B. Langdon and N. F. McPhee, “A field guide to genetic programming.”, Genetic Programming and Evolvable Machines, vol. 10, no. 2, (2009), pp. 229-230.

[14] P. B. Galvin, “VMware vSphere Vs. Microsoft Hyper-V: A Technical Analysis”, Corporate

Technologies, CTI Strategy White Paper (2009).

[15] A. Beloglazov, “Energy-efficient management of virtual machines in data centers for cloud computing”, (2013).

[16] https://code.facebook.com/

(13)

Authors

Abdulhussein Abdulmohson, he was born in Al-Najaf, Iraq in

1979. He obtained the B. Tech. Degree in Computer Engineering from University of Technology, Baghdad, Iraq, 2002. Currently working toward the MTECH degree in the Computer science and engineering University College of Engineering, Osmania University, Hyderabad, India. He is an engineer in the Information Technology Research and development center, University of Kufa, Al-Najaf, Iraq.

Sudha Pelluri, she obtained her M.Tech (CS) and Pursuing Ph.D

in prediction of resource requirement in cloud computing. She is Assistant Professor in computer science and engineering department, Osmania university, Hyderabad, India.

Ramachandram Sirandas, he obtained his Ph.D form Osmnia

university. He is a professor in computer science and engineering department, Osmania university, Hyderabad, India. He is currently the principal of the college of engineering of Osmania university.

(14)

References

Related documents

After nearly two years of planning, negotiation and collaboration at local and state levels by Pamela Springer, Ph.D., R.N., Director of the School of Nursing and Pam Strohfus,

article, we propose a novel 4-sector 1 × 2 cylindrical-rectangular microstrip array anti-symmetrically fed by the microstrip line of 100 Ω with 180 degree phase difference

The main objectives of the present study is to make a detailed analysis of same Indian Medicinal leaves in particular Peepal Leaf, Betel Leaf, Karpooravalli, Hibiscus etc

Seven patients in the whole cohort had a clear-cell carcinoma, which is known for it ’ s high level of MMP-14 expression: of these patients only one patient showed no epithelial

Figure 1 Pre-ART patient LTFU experiences segregated by baseline (A) Cotrimoxazole (CPT) provision (B) baseline CD4 category and (C) HIV disclosure status among adult pre-ART

Figure 2 Immunostaining: A) Low expression (< 2%) of ki67 (10X); B) High expression of CD56 in epithelioid cells (10X); C) low expression of CgA (10X); D) Low/Moderate expression

Seismic noise analysis showed a steady increase in the high frequency base noise level and the emergence of spectral modes in the signal recorded by the sensor installed on the

Abstract: The profile of radon (222-Rn) and uranium (238-U) concentrations in15 surface soil samples collected from the three agricultural areas of town Qadafery, Kalar and