Analysis of Energy Saving Approaches in Cloud Computing using Ant Colony and First Fit Algorithms

Cloud computing is a style of technology that is increasingly used every day. It requires the use of an important amount of resources that is dynamically provided as a service. The growth of energy consumption associated to the process of resource allocation implemented in the cloud computing is an important issue that needs to be taken into consideration. Better performance will be acquired by allowing the same required workload to be performed using a lower number of servers, which could bring to important energy savings. So it is a requirement to adopt efficient techniques in order to save and minimize energy consumed clouds such as virtual machines migration. This paper analyzes two algorithms: First Fit and Ant Colony which address the use of virtual machine migration approaches to improve the cloud performance in terms of reducing the consumed energy. Keywords—Cloud computing; VM migration; first fit; ant colony; energy savaging


I. INTRODUCTION
Large scale computing systems refer to the use of substantial number of Information & Communication Technology (ICT) resources that communicate with each other to form a network.cloud is a considered as a distributed large scale computing system that are used to in implementing reliable and concurrent distributed applications.Usually, cloud service provider keeps many computing resources which consume much amount of energy.According to the report in 2015, data centers exist around the world consumes 416.2 terawatt hours of energy which may be higher than the energy consumed in some countries [1].According to [2] the rate of consumed energy will continue to increase and therefore cloud energy aware approaches are needed to efficiently allow cloud to provide services with minimizing the amount of consumed energy.These approaches are basically based on allowing resource allocation mechanisms with the objective of minimizing the CO2 emitted due to the overheated run of the physical infrastructure [3].
The growth of energy consumption associated to the process of resource allocation implemented in the cloud computing is a crucial factoring that need to be taken into consideration.Most probably, the number of servers used to form the cloud computing is high so that even small reduction of consumed energy will have an important effect on the cloud overall performance.One way to reduce energy consumption is to control the operation modes of each server such as heavy duty, sleep or hibernate modes.The other way is to apply the live migration technique to introduce a CPU reallocation with the objective of minimizing the power consumption and keeping the highest performance.Anyway, the adopted technique should balance between the amount of consumed energy and the overall cloud computing performance.Better performance will be acquired by allowing the same required workload to be performed using a lower number of servers, which could bring to important energy savings.
The presented work will assume that there is a set of tasks with different properties.Each task can be processed on any given available cloud resource.A cloud resource has a given level of capacity (e.g., CPU, memory, network, storage).Also, task is processed on one resource at a time, and the given resources are available continuously.The overall aim of this paper is to conduct a critical thinking study to identify and evaluate the First Fit and Ant Colony algorithms used to improve the energy consumption efficiency and performance of Clouds computing environment.
The rest of this paper is organized as follows: Section 2 presents the related work.Section 3 illustrates the VM migration concepts.Section 4 introduces the investigated algorithms.Section 5 presented the experiments as well as the results of this paper.Finally, Section 6 presented the conclusion.

II. RELATED WORK
Cloud computing is considered as a latest promising technology that attracted a lot of businesses due to its reduced cost, scalability, pay as you go services and energy saving.However, there are several issues that need to be addressed by researchers in order to magnify the benefits of using cloud computing.These issues may be addressed in terms of security, reliability of data, unpredictable performance and energy efficiency [4].According to several studies, servers used in data centers consume energy even if they are in idle modes since most of the time 10 to 50 percent of their capacity is consumed.
The power usage effectiveness (PUE) metric is used in evaluating the cloud data center infrastructure efficiency.This www.ijacsa.thesai.orgmetric is defined by the Green Grid organization as a data center power usage meter.It simply computes the power consumed by servers in contrast to other overheads such as cooling [5], [6].PUE is computed by dividing the total data center energy usage by the IT energy usage.The numerator includes the IT energy in addition to the energy used for lighting, heating, cooling and the other IT center facilities.As stated in [7] the standard value for the PUE is 2 and the data center is considered as efficient as its PUE becomes closer to 1. Using PUE is not enough in order to evaluate the cloud data center power consumption efficiency.Energy Reusable Efficiency or ERE has been defined by the green Grid to measure the usage of the wasted energy that leaves the data center by other neighbor non-data center spaces [8].Both PUE and ERE are useful to be used together to help in analyzing the energy usage efficiency in cloud data centers.However, since the PUE metric doesn't take the IT efficiency or IT load distribution into account then it might be not a sufficient efficiency measure [9].
Efficient energy consumption is connected directly to find mechanisms and policies to manage the clouds data centers to have a less energy consumption.The maximum gain may be achieved by shutting down the unused and idle servers.However in [10] the presented work shows that the server used consumes 208 Watts when idle and 253 Watts when used at its maximum capacity.Also in [11], the researchers noticed that energy consumed by idle server contribute up to 66% of the peak power.In [10] Virtual Machine live migration reduces consumed energy by about 25%.In this research green open cloud is used where all the cloud machines are provided with a power that acts as an energy data collector module.When tasks are submitted to the cloud, the energy data is used by an energy aware resource manager that assigns the submitted task to servers which consumes less power.The overall goal of this scenario is to have the highest number of idle machines in order to shut them down.This work uses a prediction algorithm to avoid too frequent on/off cycles.
In fact, energy consumption would be achieved by reducing the number of running servers.Virtualization is an important concept that leads to better utilization of the cloud resources and consequently energy consumption is reduced.Also, as far as technology is advanced, newer faster servers would be used to replace older and slower server.This action would increase the energy efficiency of data centers by reducing the number of servers required to deliver the same IT workload [12].
Virtual Machines (VM) consolidation is another technique that could be employed in such a way to reduce the consumed energy of machines in the cloud data centers.VM consolidations is a technique that is based on maximizing the number of VMs allocated to one physical server and turn off the other servers in order to save energy.On the other side the number of VMs per server should be limited to certain level to keep the server running without performance degradation [13].
In [14] authors introduced a technique that is based on extending the cloud computing infrastructure by harvesting unused global computing resources that are widely available within public domains such as universities and organizations.
Researchers in [15] studied techniques of achieving energy efficient solutions under the conditions of using intensive tasks.They compared between the use of frequency scaling against the use of fixed frequency and concluded that the frequency scaling is more efficient until 65% use of the CPU processing power.Another result concluded by [15] is that, the use of hyper threading is better than the use of VMs in terms of the amount of consumed energy.
Dynamic Voltage Frequency Scaling (DVFS) is considered one of the techniques used to achieve efficient energy consumption.The techniques observe the workload provisioned to change the CPU power consumption accordingly, which affect the performance level as well [16].In [17] data centers providers may increase their profits by reducing power consumption using the DVFS approach.DVFS approaches provide a way that reduces the level of energy consumption of the CPU by controlling and lowering the supply of voltage and frequency.
In [18], authors introduced an algorithm to minimize the consumed energy when parallel jobs run and keep a moderate overall execution time at the same time.it is based on extending the execution time for un-stressed tasks while lowering the voltage and frequency of processors.The algorithm is considered energy efficient in multi-core systems.
In [19] introduced an idea that based in motivating users to use a more efficient energy cloud solutions.This motivation comes by lowering the prices of the services provided using lower energy solutions.Of course, in this case users should scarify any real time requirements related to their submitted tasks in order to get the most economical services.
In [20], another user involvement technique is proposed by establishing what is called the Carbon Green Cloud Architecture.This architecture is more oriented towards carbon dioxide emission measurements.The idea is to offer the user with what is called Green Offers pricing to determine the most suitable time to access the cloud with the objective of minimizing the CO2 emission.The idea behind this concept is that the user can be an important asset to improve the cloud energy efficiency.
Green cloud computing is recently considered an important play factor in both industry and academia.Achieving the challenges of green cloud is based on having efficient scheduling algorithms that take power consumption into consideration and guarantee at the same time the system QoS requirements such as high computation capacity.Data centers hosting the cloud environment always runs very large number of applications which consume computing resources and a large amount of energy as well.In [21], the report states that data centers in US consume about 3% of the overall electricity consumption in 2011.So, reducing energy consumed by data centers is considered a very important issue in cloud computing.There are a chain of technical methods introduced for that purpose such as cooling technology and dynamic voltage and frequency scaling (DVfS) [22].Another important and effective way for reducing consumed energy is to dynamically fine tune the capacity of the data centers and use www.ijacsa.thesai.orgscheduling algorithms to provide resources to applications.This might be a good solution but it needs careful handling since the scheduling problem is considered a big challenge and not an easy job to be applied in an optimum way.
Most of the traditional scheduling algorithms are based on the concept of fair resource distribution.However in cloud environment real situations, faire resource distribution in intensive applications may lead to more energy consumption which is not desirable to happen.Therefore, energy consumptions should be taken ito account when doing scheduling.
In [23] authors introduced an energy consumption model of the cloud computing environment.They implemented an energy aware virtual machine scheduling algorithm.It is based on study the dependency between tasks then using some sort of statistical modeling in order to save the consumed energy.
In [24] an optimization model for an energy aware task scheduling algorithms is presented.The proposed model is based on formulating the problem in terms of integer programming problem.The objective is to minimize the energy consumption by assigning tasks to the possible minimum number of servers and keep a good response time at the same time.
Authors in [25] introduced an energy saving approach.The approach assigns an energy-saving score per virtual machine.Virtual machines with the highest and the lowest score are merged together that lead to avail some redundant physical machine.The approach determines the redundant physical machine to shut it down and consequently save energy.
In [25] an energy saving framework is introduced with the objective of maximizing the advantages of heterogeneous resources using the improved best fit decreasing 0-1 knapsack problem.They handle the scheduling issue as multi-objective optimization problems.The objectives are task execution, energy saving and load balancing.The efficiency of the approach is affected by the presence of multiple objectives.Also, determining appropriate weighs per objectives is not an easy task and consequently the overall performance of the algorithm cold be affected greatly with wrong choice of weights.
In [26] a scheduling algorithm called e-STAB is introduced.The algorithm takes the traffic intensity into consideration when allocating tasks to resource.Traffic intensity helps in achieve a scheduling process that verifies the efficiency of consumed energy and the load balancing of the network nodes.
Authors in [27] presented how to use a mix of Maximum-Flow Minimum-Energy routing algorithm and Future-Internet network to achieve low-latency energy-efficient communications in Global Scale Cloud Computing systems.Also, in [28] energy efficient work flow scheduling algorithm is introduced with the objective of minimizing energy consumed and hence the amount of CO2 emitted.The algorithm also satisfies other QoS requirements such as low latency.

III. VM MIGRATION
In cloud computing environments the concept of virtualization become more efficient and less costly to provide a good pay per use model.Data centers employed in provide cloud services consumes a lot of energy even if the server machine is idle as stated in [29] where idle machines consumes about 66% of its peak value of energy requirements.Reducing energy has a positive impact on reducing the overall cost.Currently the virtualized datacenters has replaced the traditional single applications data centers.The presence of Virtualization concept help in achieving an efficient use of both hardware and software resources by constructing logical units called virtual machines that is assigned and hosted by a high end physical machine.VM migration from physical host to another would positively improve the overall system performance whether in terms of scalability or energy consumption.The migration process could be executed even while it is in its active mode which is called live migration.In order to achieve good energy management results, VM migration is employed as a tool to dynamically consolidate physical hosts to get minimum workload and turn off the idle servers to minimize their unnecessary consumed energy.In order to achieve the energy management approaches, victim physical machine should be nominated to apply the consolidation process and another machine to act as a target machine.This process is called VM placement.Several factors need to be considered when doing VM placement such as allocation cost, SLA violation and power consumption.
Energy aware virtualization can be achieved at several levels such as decanter design level, VM placement or physical machine consolidation.In this paper we focus on introduce and test two VM placement techniques, Ant Colony and First Fit (FF), to as case studies to emphasize on the importance of the introduced material.
The VM problem is always converted to be treated as an optimization problem with specific resource constraints.For example the ant colony and First Fit approaches handles with the VM placement as a bin packing problem.The bin packing problem can be used in order to map VM to physical machines.The overall cost is reduced by maximized the number of VM packed on the least number of physical machines.

IV. INVESTIGATED ALGORITHMS
In this section the author presented the fundamental information about two techniques that are widely used to improve the power consumption efficiency and performance of Clouds computing environment.These two techniques are the First Fit and the Ant Colony.

A. First Fit Algorithm
First Fit algorithm is considered one of the famous greedy algorithms that is used for solving the classic "bin packing" problem.In this algorithm, items are sorted in descending order where each item is packed in its most suitable bin that can afford it.In spite of the effectiveness of this algorithm, it is not guaranteed to have an optimal solution.But according to [30] among all solution produced by the FF algorithm, one solution is an optimal solution.www.ijacsa.thesai.org The main objective is to create the over utilized machines list so that VM migration policy is executed with the concern of achieving minimum migration time.This problem can be formulated in terms of bin packing problem.In the bin packing problem, bins simulate the physical host machine where the VMs are the items that need to be assigned to certain physical host machine.Bin sizes are characterized by several properties such as size and price.Size is represented by the host machines CPU capacities and the price is represented by the power consumed by the host machines.The bin packing problem is NP-hard which means it is not solvable in polynomial time.The problem is solved using the basic OS algorithms in Cloudsim simulator platform.The First fir algorithm is employed to choose the destination host machine.
The algorithm starts by extracting the over-utilized hosts from the host machines list.This list is fed as an input to the algorithm.The algorithm output is to map the VM to the host machines.In The first stage of the algorithm, there is no constrains on the host available power when selection a host machine.But, in the second stage and before execute the actual allocation, the over-utilized machines are excluded.

B. Ant Colony Algorithm
Ant Colony [31], [32] is a meta-heuristic based algorithm that is adopted to discover near optimal solutions by applying probabilistic approach.Also, this algorithm belongs to the NPhard class.Ant Colony algorithm is introduced by M. Dorigo [31] by watching and translating the usual food-discovering methods of real ants that communicate indirectly via the surrounding environment by depositing a chemical element called pheromone.The communication process is called stigmergy.The ants start to search for the food by predicting a probabilistic verdict and they select the routes with higher pheromone quality.While the ants are finding their food, they put the pheromone on their return so that other ants may be convinced to follow trail the food source.A process of hiding the natural pheromone is adopted to reduce the pheromone volume as time proceeds in order to maintain regular paths that lead to better solutions.Synthetic ants could be considered as a multi-agent system and could lead to complex solution when used in solving combinatorial problems like Bin Packing Problem (BPP) [33], [34].
To implement the Ant Colony algorithm, the pheromone levels are implemented by an (n x m) matrix.
 Initially, every ant starts b having the following items: Empty solution, set of host machines and set of shuffled VMs.
 A random ant is selected to select a VM among all feasible and is allocated to its current host machine using a probabilistic decision rule (The Pseudo-random Proportional Rule).When constructing a solution, an ant k selects a VM s to be assigned to host machine p with the following pseudo-random proportional rule [31]: Where, q is a random number uniformly distributed in [0; 1], q 0 is a parameter in interval [0; 1], v;p represents the current pheromone value associated with the VM and Local host pair and can be computed according the following equation: ( Where  is the global pheromone decay parameter (0 <  < 1) and  v,p is the pheromone reinforcement applied to each VM and host machine pairs according to the following equation: Back to (2),  is a non-negative parameter is responsible for determining the relative importance value of the pheromone against heuristic value in the decision rule.
 If the current host machine is over utilized then a new empty machine is allocated.
 When all ants completed building the solutions, all these solutions are compared to all solutions found till that moment.All the solutions are globally stored in Global Best Solution (GBS).The solution with best value is selected among this list.
 Equation 3 is used in calculating the pheromone reinforcement amount.The pheromone levels of each of VM and the host machine pair is updated to emulate the pheromone disappearance according to (2).
 The reinforcement rule is applied only the pair of VM and host machine which belong to the GBS set.
 Later, the whole process of finding new solutions repeats.The algorithm finish in case there is no more improvement in the solution quality.

V. RESULTS AND EXPRIMENTS
In this section, we present the results achieved from our critical study by simulating both First Fit and Ant Colony algorithms.The CloudSim simulator framework is used in the valuation process.CloudSim is an existing framework that is used in implementing and performing the actual behavior of cloud based algorithms.It is very adaptable in terms of practicing the continuous evolution of cloud computing frames and application services.This allows researchers to concentrate on explicit algorithms concerns without taking care of low level aspects related to Cloud based frames and services.CloudSim is used for assessing different cloud based algorithms because of the following reasons [35], [36]:  Allows cloud users to establish and pretend vast virtual data centers, presenting flexible policies for assigning the host resources to the Virtual Machines.
 Supports modeling and simulating energy-aware computational resources, different network topologies for data center and message passing applications.www.ijacsa.thesai.org Allows the simulation-time addition of imitation resources or computational blocks, as well as the ability to stop and resume the simulation at any stage.
 Offers the capability to assign host machines to Virtual Machines following the tailored actions.
 Decides rules to assign the host resources to the Virtual Machines.

C. Performance Comparison
In each experiment 200 virtual machines and 200 hosts are used for the simulation and each experiment is run for 40 times.Other simulation parameters are listed in Table I.Throughout the simulation, the energy consumption has been computed using different parameters and when using both Ant Colony and FF algorithms.
Fig. 1 shows a comparison between the two techniques, First Fit and Ant Colony in terms of the required number of active host machines and the number of VMs.This curve acts a tracer for the number of running host machines to exclude situations of having machines idle for long times and consume at the same time high level of energy.This situation is not desirable and may violate the main objective of reducing the overall consumed energy.Once idle host machines are identified their mode is set to sleep mode.The results in the figure show that the Ant Colony algorithms cause lower number of active hosts when compared to the First Fit algorithm.These results because, Ant Colony repeat execute several optimization cycles that help in improve the method of selecting suitable host machine to be allocated for VM.It uses global optimization that leads to faster convergence speed and minimizes the number of VM migrations and consequently reduces energy consumptions.
Similarly, results in Fig. 2 show the number of VM migrations executed by the two algorithms.The Ant colony algorithm performs lower number of VM migration.
In case of having lowered number of required host and number of VM migrations, Ant Colony requires less energy consumption than First Fit algorithm.Fig. 3 shows the ability of reducing the number of active but idle host machines that truncate the energy demands.It reaches competent resource utility levels affecting the number of VM migrations.Fig. 4 shows that the average energy consumption in case of different threshold of host machines utilization for the two algorithms.It is shown that, as the host machines utilization increases, average energy consumption decreases.This behavior of improvement done by the Ant colony algorithm is achieved due to the energy-aware VM allocation decisions.

VI. CONCLUSION
In this paper we analyze the First Fit and Ant Colony algorithms that have been used in VMs migration in cloud computing environments.VMs migration is an important issue that can be utilized to save the energy consumed in the cloud computing environment.Hence there is always a need to apply different VMs techniques to improve the cloud efficiency.To implement VMs migration the two discussed algorithms can be utilized.The advantages of using the investigated algorithms is to avoid the use of the over utilized machines and consequently minimize the amount of processing power consumed by host machines and the consumed energy will be reduced as a result of that.As a future work in this field is to build up on the presented algorithms to provide better results and this may be achieved by considering other factors such as service availability and QoS level.

Fig. 1 .
Fig. 1.Number of VMs vs Number of hosts.

TABLE I .
SIMULATION PARAMETERS