1. Introduction
Cloud computing represents a fusion of two major trends that are IT efficiency and business agility. The cloud has the provision of storing data without any limitation as well as hiding a tremendous volume of data from other users. The users can access the required files, documents and applications on demand. Users only pay for the services provided by the cloud instead of buying the own expensive infrastructure. Cloud computing has various features such as on-demand resource allocation, quality of service, elasticity, etc. which makes this very engaging both in the academic as well as the business domain. The continual demand for services provided by the cloud has led to the need to manage the load of machines, energy produce by that machines and scheduling of resources. Load balancing is the technique of allocating different tasks over different resources in the data center to maintain balance [
1]. The resources available can be a data center, a virtual machine, or, a physical machine [
2,
3].
The resource and service dispensation must be done in a systematic way so that every resource should experience the same loads at any instant of time and should improve the average utilization rate of resources [
4]. If there is any kind of load imbalance, then the system performance will be drastically decreased. While maintaining the load, energy consumption should also be kept in mind. Green cloud computing is a term that covers utilization of resources efficiently as well as reduces energy consumed by these resources [
5]. The energy consumption resources in the datacenter are both due to cooling as well as computational resources. While the computational resources cover around 60% of the total energy consumption the other 30% is covered by the cooling infrastructure [
6].
The energy consumption problem can be divided into two parts: (a) First, one with server-side operations, and, (b) networking side communications. Optimizing resource allocation as well as reducing the operational cost is a key concept. This can be implemented in the platform as a service segment. Schedulers are used to schedule the resources and the load balancers are used to balance the resources and to predict the load as well as to reduce the energy. In case of cloud computing, the services or resources are either allocated or de allocated. The major benefit of incorporating into cloud is that it removes the pressure of upfront investment and hence lowers the cost of operation and maintenance. Also,
Figure 1 below depicts a demonstration of cloud infrastructure. The scalability of cloud computing provides users with a level of flexibility and can be scaled up and down according to the need of users. Resources allocation is the task of allocating the resources while maintaining the proper balance in the environment. To maintain a proper balance, resource scheduling algorithms are applied to get an efficient performance.
Nowadays fog computing and edge computing which are extensions of cloud computing are also used, because IOT devices use cloud computing for storage of data. Fog computing helps to reduce the network burden of data centers and edge computing is used to minimize and manage the traffic [
8,
9]. A lot of work has already been done on cloud systems using various optimization algorithms but there is still a need for improvement due to the increase in cloud system usage on a daily basis. The number of users is increasing, so companies are using more and more servers to make their services better, but this additional usage is also increasing the load, energy consumption and resources needed in the cloud system.
Hence, the key motivation behind this research was to improve various aspects of the performance of cloud systems like load balancing, resource scheduling, energy consumption using a novel metaheuristic approach named whale optimization algorithm (WOA). Before implementing the WOA algorithm, we perform an experimental survey on various algorithms that are good for load balancing, resource scheduling and energy efficiency. We used particle swarm optimization (PSO) and cuckoo search algorithm (CSA) algorithm for balancing the load over the clod system and calculate the corresponding values. Then we test CSO and BAT algorithm, which was doing good task-resource allocation as per literature and get their result for resource scheduling. Finally, we propose and implement the whale optimization algorithm which gives the best result for task execution, response time and energy consumption for a cloud system.
In the first phase, we implement the two algorithms PSO and CSA. PSO is a useful algorithm to allocate loads to different machines that is based on the social behaviors of animals as they find their food. PSO is useful to find the machines which have less load and assign tasks to that particular machine but the algorithm also has some limitations in that it takes more execution time [
7]. The CSA algorithm is based on the strategy of cuckoos to lay eggs in the best nest and this strategy of cuckoos helps find the best machine for task allocation so that loads can be balanced properly [
10]. This algorithm is best suited for job scheduling but the algorithm has limitations like resource scheduling. Both these algorithms give best results for load balancing but are not good for resource scheduling. Then in a second phase, implementation of the cat swarm optimization (CSO) and BAT has been done. The CSO algorithm uses the concept of cats based in two modes—seeking and tracing—which aims to efficiently allocate the available resources to a number of tasks in a cloud environment with minimum cost [
11]. This algorithm gives good task-resource allocation strategy results. The bat algorithm is based on the strategy used by bats to catch them pray [
12]. This approach is implemented to allocate the resources to tasks in such way that resources can be successfully scheduled using less budget and time, but it does not give good results as far as energy consumption is concerned. Both BAT and CSO give better results as compared to PSO and CSA.
Lastly, the whale optimization algorithm (WOA) algorithm that gives the best result as compared to all algorithms that were implemented in previous phases has been implemented [
13]. WOA starts with a random solution by considering the current solution is the best solution and based on that position the population is updated. It is based on the strategy of exploitation and exploration. The WOA algorithm gives comparative results for load balancing, resource scheduling and energy efficiency of cloud systems. For this testing, Cloud Analyst has been used.
This paper includes various sections that cover a brief introduction to cloud computing, the proposed algorithms and results.
Section 1 covers the introduction to the cloud concept.
Section 2 is a review of the load balancing, energy efficiency and resource scheduling literature.
Section 3 includes the proposed algorithms, while
Section 4 shows the simulation results of our research and compares the results of existing and the proposed algorithms. Finally,
Section 5 gives the conclusions and future scope of the research.
3. Proposed Work
3.1. Working Methodology
The optimized energy efficient resource management model for cloud computing architectures uses certain algorithms for load balancing that help reduce the energy consumption effectively while balancing the loads among the servers [
42]. The central aim of the system is to perform load balancing by the load transfer from overloaded servers to under loaded servers as well as perform task scheduling efficiently that helps in minimizing the energy consumption in a cloud environment. Although many such systems have been designed to achieve this purpose, the consumption of energy can be significantly decreased by applying a combination of algorithms. The proposed system utilizes the Cloud Analyst tool to model and imitate the cloud infrastructures. This work follows a certain procedure to perform balancing of workload and resource allocation to decrease the consumption of energy.
Figure 3 depicts the workflow of the newly designed energy efficient load balancing system.
In the
Figure 3 workflow, first of all there is the Json file which provides parameters to different tasks and collect their inputs in the form of the task then there is scheduler that allocates the task to different virtual machines based on the load given to that particular machine. After that a proposed algorithm checks the performance of different machines based on their functions and then redistributes the resources to improve the performance of the system.
The proposed optimized energy efficient load balancing model works by following certain algorithm steps. These methodology steps are as follows:
Input the required number of parameters to create the number of tasks.
Host the number of servers on each virtual machine to allocate the different resources on it.
Use the data center to launch all the virtual machines on it and to allocate the storage for them.
Use the optimization methods to best schedule the resources and to balance the load from one server to another by migrating the resources and to compute the energy consumption.
We need to compute the pre-migrations and post migrations time for migration and energy consumption and execution time for load balancing on cloud.
To build the GUI for each optimization methods with proper executing button by using we can fire the event to execute the optimization methods one by one.
By executing all the proposed methods, we can come to identify the best method for the research work at hand.
Perform all the proposed work by using Java programming and the Cloud Analyst toolkit.
3.2. Energy Consumption over the Cloud System
Many models are available to calculate the energy consumed by servers, like CPU models, system models, and parallel system models [
43]. Cloud systems use servers with many hardware parts, but an essential part of physical machines is the CPU, which consumes most of the energy. Software can be developed based on less CPU utilization, while other software can also manage the consumption. Based on this, we can find a solution to improve the energy consumption of a cloud system.
Chedid et al. [
43] have given an equation for the energy consumption of CMOS circuits:
where
is the effective switching capacitance of the operation,
V is the supply voltage, and
is the clock frequency and
is related to supply voltage Kumar [
44].
In a cloud system, we assign loads to virtual machines which increase or decrease their CPU utilization and we can formulate that as follows:
Here is the energy consumed by the CPU expressed as a utilization u% and u is the percent value of the processor utilization, where as and are the power consumption at maximum performance in Watt and at idle status, respectively.
Our proposed algorithm effectively schedules the task, so that server load is appropriately maintained. When the server picks up the load for executing the tasks, that state of the server is at maximum power consumption while if there is no load on the server, the server is consuming minimum power. We assumed that , the minimum power consumption on an ideal server is 200 Watts and the maximum power consumption considered, , is 400 Watts. It is better to maintain 70–80% CPU utilization otherwise, there will be a compromise in system performance.
3.3. Mathematical Model
In a cloud system, there are basically two concepts: one is resource allocation and the second is task allocation. Resources allocation means allocation of virtual machines that act as resources of the cloud system. These virtual machines are allocated to tasks based on some assumptions like which machine is ideal, machines performing the same kind of task and more. The second is task allocation, where tasks are those assignments that come from consumers and we have to perform that on our virtual machines [
44]. Every task comes with some parameters like its ID, arrival time, CPU utilization, etc. Resource allocation is done only if we have matching resources available for that particular task.
For minimizing the energy resource allocation of cloud system, a linear programming equation can be used as represented in Equation (3):
Here and:
≤ peak load at time T,
= 0; when task j is not assigned to node Ri.
= ; when task j is assigned to node Ri.
3.4. Algorithm Used for Load Balancing, Scheduling, Energy Efficiency
The proposed optimized energy efficient load balancing model is designed in various phases that are described in this section. Every phase employs certain algorithms to achieve load balancing as well as resource scheduling in the system. In the first phase PSO and CSA have been implemented. Then, after that in the second phase CSO and BAT was implemented for better resource utilization. Finally, the whale optimization algorithm has been implemented which gives the best results for optimizing the cloud system. This section discusses about these algorithms used in this system.
These algorithms are discussed below:
(i) Particle Swarm Optimization (PSO)
Particle swarm optimization is a metaheuristic algorithm has inhabitants—called a swarm—of contender solutions known as particles [
45]. These particles tend to progress around the search-space in accordance with the following statement: the particle movement is controlled by their own best known position and the entire swarm’s finest position. When the better locations are found, then they come to guide the swarm movements. Many empirical evidences have showed that this algorithm is an effective optimization tool. The workings of PSO are also described by various authors Bala [
7], Satapathy et al. [
45], and Liu et al. [
46]. The above algorithm is explained in
Figure 4 below.
Pseudo code
For each particle |
Initialize particle |
End |
Do |
For each particle |
Calculate Fitness value |
If fitness value is better than the best fitness in history |
Set current value as new pbest. |
Set current value as new pbest. |
End |
Choose the particle with best fitness value of all particles as the gbest |
For each particle |
Calculate particle velocity |
Update particle position |
End |
While max iterations or minimum error criteria is not attained |
(ii) Cuckoo Search Algorithm (CSA)
This is an optimization algorithm that is utilized to perform load balancing inspired by the required or compelled parasitic behavior of some cuckoo species that lay their eggs in the nests of some other host birds of some other species [
10]. The nest which will be best with high quality of eggs carries out the next generation. The number of host nests is constant or fixed. The host nest he wants to throw out eggs to make a new nest solution [
47,
48].
Pseudo code
Begin |
Objective function f(x) |
Generate initial population of n host nest |
Evaluate fitness and rank eggs |
While (t > MaxGeneration) or Stop criterion |
T = t + 1 |
Get a cuckoo randomly/generate new solution by Levy flights |
Evaluate quality/fitness, Fi |
Choose a random nest j |
If (Fi > Fj) |
Replace j by the new solution |
End if |
Worst nest is abandoned with probability Pa and new nest is built |
Evaluate fitness and Rank the solution and fit current best |
End while |
Post process results and visualization |
End |
(iii) Cat Swarm Optimization (CSO)
This algorithm is an intelligent algorithm that gets its motivation from the natural behavior of cats – their tracing mode and the seeking mode. In this algorithm, initially the number of cats that are to be used is decided, then the cats are applied in the algorithm to resolve the issues. To merge the two modes in CSO, a mixture ratio needs to be defined that must be a small value [
11]. The action of cats normally comprises spending their most of the time resting but attentive, with a relaxed and intended approach called seeking mode. There is another mode called tracing mode when hunting targets as they travel with great velocity. This technique is inspired by the behavior of cats to get a difficult answer for optimal explanations. Complete mathematical models have been explained by various authors Bilgaiyan et al. [
49], and Ahmed et al. [
50].
Pseudo code
Randomly initialize cats. |
While (is terminal condition reached) |
Distribute cats to seeking/tracing mode |
For (i = 0; i < NumCat;i++) |
Evaluate Fitness for cat. |
If (Cati in seeking mode) THEN |
Search by seeking mode process. |
Else |
Search by tracing mode process. |
End |
End For |
End While |
(iv) Bat Algorithm
This is a metaheuristic algorithm inspired by the reverberation characteristic of bats with variation in pulse rates of emission as well as loudness Cai et al. [
51]. It is created to perform global optimization tasks. Bats follow some rules [
52,
53]:
- ➢
Bats use echolocation to find the distance between food sources but they also have knowledge of the difference between background barriers and food.
- ➢
Bats search for their food with velocity vi at position xi with fixed frequency fmin with varying wavelength. They adjust their position and wavelength based on the target.
The pseudo code of the bat algorithm is as follows:
Pseudo code
Objective function f(x),x = [x1, x2, …, xd]T |
Initialize the bat population xi(i = 1,2, … n) and vi |
Define Pulse frequency fi at xi initialize pulse rates ri and the loudness Ai |
While (t< Max numbers of iterations) |
Generate new solutions by adjusting frequency |
And updating velocities and locations/solutions [(1)] |
If (rand>ri) |
Select a solution among the best solutions |
Generate a local solution around the selected best solution |
End if |
Generate a new solution by flying randomly |
If (rand < Ai and f(xi) < f(x*)) |
Accept the new solutions |
Increase ri and reduce Ai |
End if |
Rank the bats and find the current best x* |
End while |
Postprocess results and visualization |
(v) Whale Optimization Algorithm (WOA)
Whales can find out the location of their prey and then encompass them. Since the situation of the ideal plan in the pursuit space isn’t known earlier, the WOA algorithm considers that the present current best up-and-comer arrangement is the objective prey or is near the ideal solution [
13]. When a best representative is defined then other one will also try to change their values according to the best one. The mathematical model has been explained by Thennarasu et al. [
54]. This algorithm is explained in
Figure 5 below.
The pseudo code of Whale Optimization algorithm (WOA) is as follows:
Pseudo code
Randomly initialize the whale population |
Evaluate the fitness values of whales and find out the best search agent X* |
While t < tmax |
Calculate fitness function for each agent |
For each search agent |
If h < 0.5 where h is the random number between 0 and 1 then |
If then ……………………………………Equation (1) |
Else if ……………………………………Equation (2) |
end If |
Else If h ≥ 0.5 then |
………………………………………………Equation (3) |
End If |
End For |
Evaluate the fitness of X(t + 1) and updates X′ |
End While |
In WOA, h is the random number between 0 and 1. In Equation (1), is the updated position, X* (t) is the best solution and method A = (2*a*r)-a where a is linearly decreased from 2 to 0 depends on max iteration number shrinking encircling and r is random vector between [0,1] and D = where X (t) is position vector
In Equation (2), D = and is position vector. In Equation (3), b defines the logarithmic spiral shape, L is random number between −1 and 1 and D = .
3.5. Simulation Toolkit
Cloud Analyst is a simulation toolkit which provides modelling as well as simulation of the core functionality of the cloud such as event processing, creation of cloud entities, communication between varying entities, etc. This toolkit provides many services and features:
- ➢
Test the services of applications in a reoccurring and controlled environment.
- ➢
Performs experiments with varying workload mix and with different performance scenarios on imitated infrastructure for development.
- ➢
Tune the system limitations before deployment of apps in an actual cloud.
- ➢
It is a complete platform for modelling cloud’s service agents, provisioning, and, allocation strategy.
- ➢
It provides imitation of a cloud-environment which can inter-connect resources of both public as well as private domains.
- ➢
Virtualization engine availability that helps in creation as well as management of several independent virtual services on a DC node.
3.6. Parameters Used in Toolkit
There is datacenter tab in the Cloud Analyst simulation toolkit which allows defining the configuration of the datacenter. There is need to give values to various parameter fields like name, region, operating system, number of servers, etc. Under data center, a second table appears which require more parameter values like machine id, memory, storage, processor speed, VM allocation policy as shown
Figure 6. Other than this there are some important parameters that are:
- ➢
User Grouping Factor: This parameter is used to guide simulator that in a single bundle of traffic, how many users will be treated simultaneously.
- ➢
Executable instruction length (in bytes): Simulator execute instructions based on length setting under this parameter.
- ➢
Load balancing policy: This parameter is used to allocate request to various virtual machine based on policy setting.
- ➢
Request Grouping Factor: Simulator treat multiple requests for single unit of processing using this parameter.
The data center contains various physical servers which all have different kinds of properties of resources like storage, CPU, speed, storage, architecture, etc. as shown in the XML configuration file (see
Figure 7). In the proposed algorithm, we have considered eight servers with different configurations, meaning that some servers have 2 GB RAM, some have 3 GB RAM. Similarly, few servers are of 32-bit architecture, others are of 64-bit architecture. These values are used when the system load the machines. For the proposed WOA algorithm, the XML file also includes Pmin and Pmax values for each server because our algorithm is not only scheduling tasks but also calculating energy consumption by that particular machine during the task allocation as per Equation (4):
where Pmin is set as minimum power consumed by the server in its ideal state and Pmax is the maximum power consumed by the server in its utilization state [
55] and these values are set in the configuration file. These values have been set as 200 and 400 as min and max values, respectively, because it has found that most servers consume near to 200 Watts of power when they are in an ideal state and if they contain a large number of resources then they can consume nearly 400 Watts of power [
56,
57,
58].
Based on all these values, when our proposed WOA algorithm schedules the tasks to different virtual machines, the corresponding energy consumption is calculated based on the utilization of resources of that server [
59].
3.7. Simulation Output Screen
The following snapshots show the result in terms of response time, execution time, throughput, and, energy consumption when PSO, CSO, BA, and, CSA, WOA are applied to multiple numbers of servers.
Figure 8 and
Figure 9 shows the simulation results of PSO, CSO, BA, and, CSA, WOA algorithms using seven and eight servers, respectively.
5. Conclusions and Future Work
Cloud computing has appeared to be one of the most sought after network configurations to which IT and other data storage facilities are leaning with a cost effective approach. The utilization of cloud computing has increased significantly which indeed has led to traffic clogging at the web servers. Due to the large number of clients, the demand for resources has also increased thereby creating an imbalance in the distribution and allocation of resources. The proposed work addresses the problem of load balancing and resource scheduling with a cost effective approach. It is also seen that implementation of different algorithms for effective resource allocation and balancing of workload in cloud causes great a consumption of energy. To harness greater output, firstly we have implement algorithms like PSO, CSO, CSA and BAT and check their result using Cloud Analyst simulator. Finally, our proposed work uses the whale optimization algorithm which lowers the energy consumption rate and also decreases the execution time as compared with other algorithms.
One of the limitations of the present work is that we have not compared WOA using other parameters like cost, makespan, etc. In future work, we will compare different algorithms with different parameter settings. We can implement various meta-heuristics techniques for the improvement of the work. Secondly, we can also move towards different computing system such as fog computing along with cloud for load balancing and energy efficiency. We can also implement our proposed algorithm in a real cloud system like Amazon’s EC2, Microsoft’s Azure etc. rather than just use the Cloud Analyst simulator.