Energy-aware Task Scheduling using Ant-colony Optimization in Cloud

10
Proceedings of International Conference on Emerging Research in Computing, Information, Communication and Applications (ERCICA-14) Energy-aware Task scheduling in cloud using Ant-colony Optimization Linda J a, a , Ananthanarayana V.S. b a Department of Information Technology, PG Student, National Institute of Technology Karnataka, Surathkal, 575025, India b Department of Information Technology, Prof. & Head, National Institute of Technology Karnataka, Surathkal, 575025, India Abstract Task scheduling in a distributed environment like cloud has always been a prime problem to tackle with. Many algorithms have been developed to efficiently schedule the resources to the tasks and thereby increasing the profit for the cloud providers. Due to efficient task scheduling algorithms, the resources or servers are mostly kept busy and running the tasks of the clients and consuming a lot of power. Due to the increase in demand and the profit they get, the cloud providers tend to increase their infrastructure and so they deploy a lot many datacenters. The cost of establishment of datacenters is huge in terms of power. Further, the increased use of datacenters has reached to an extent where the cost of maintenance of these datacenters surpassed the total hardware acquisition cost. There arises a need for energy conservation. The project proposes an idea of saving energy while scheduling tasks to the virtual machines to run them. It is primarily based on the fact that different hosts in the cloud have different CPU utilization which directly affects their total power consumption. It uses ant-colony optimization to find the hosts that consume least power based on their CPU utilization and schedule the tasks and finally compares the performance of the algorithm with existing techniques. Through experiments, it is found out that the proposed method conserves the energy consumption in the hosts up to 22%. Keywords: ACO, Cloud Computing, Energy-Awareness, Task Scheduling. 1. Introduction The recent decade made cloud computing to become an indispensable technology that it has been widely adopted to be used in various scientific and engineering fields. A cloud is a computing model which helps the companies to reduce the cost of running the physical resources through the use of shared application and computing services. The aim of this technology is to offer resources as utilities. Many virtual machines are used by the clients everyday thereby increasing the demand for the resources. Scientists who run CPU-bound jobs expect faster computation of their a Corresponding author. Tel.:+919488063737. E-mail address:[email protected], [email protected]. 1

Transcript of Energy-aware Task Scheduling using Ant-colony Optimization in Cloud

Proceedings of International Conference on Emerging Research in Computing,

Information, Communication and Applications(ERCICA-14)

Energy-aware Task scheduling in cloud using Ant-colonyOptimization

Linda Ja, a, Ananthanarayana V.S.b

aDepartment of Information Technology, PG Student, National Institute of Technology Karnataka, Surathkal,575025, India

bDepartment of Information Technology, Prof. & Head, National Institute of Technology Karnataka, Surathkal,575025, India

Abstract

Task scheduling in a distributed environment like cloud has always been a prime problem totackle with. Many algorithms have been developed to efficiently schedule the resources to thetasks and thereby increasing the profit for the cloud providers. Due to efficient taskscheduling algorithms, the resources or servers are mostly kept busy and running the tasks ofthe clients and consuming a lot of power. Due to the increase in demand and the profit they get,the cloud providers tend to increase their infrastructure and so they deploy a lot manydatacenters. The cost of establishment of datacenters is huge in terms of power. Further, theincreased use of datacenters has reached to an extent where the cost of maintenance of thesedatacenters surpassed the total hardware acquisition cost. There arises a need for energyconservation. The project proposes an idea of saving energy while scheduling tasks to thevirtual machines to run them. It is primarily based on the fact that different hosts in thecloud have different CPU utilization which directly affects their total power consumption. Ituses ant-colony optimization to find the hosts that consume least power based on their CPUutilization and schedule the tasks and finally compares the performance of the algorithm withexisting techniques. Through experiments, it is found out that the proposed method conserves theenergy consumption in the hosts up to 22%. Keywords: ACO, Cloud Computing, Energy-Awareness, Task Scheduling.

1. Introduction

The recent decade made cloud computing to become an indispensable technology that ithas been widely adopted to be used in various scientific and engineering fields. Acloud is a computing model which helps the companies to reduce the cost of running thephysical resources through the use of shared application and computing services. Theaim of this technology is to offer resources as utilities.

Many virtual machines are used by the clients everyday thereby increasing the demandfor the resources. Scientists who run CPU-bound jobs expect faster computation of their

a Corresponding author. Tel.:+919488063737.E-mail address:[email protected], [email protected].

1

Linda J.et.al.

jobs in their virtual machines. So, efficient schedulers allocate jobs to the virtualmachines in such a way that, the jobs get completed in its minimal completion time sothat in the remaining time some other job can be allotted to the VMs.

Mainly, the cost of maintenance [1] becomes higher than the resources in thesedatacenters, as their number increases linearly with the physical resources. Therearises the need for Energy Conservation. Consequently, reducing the energy-consumptionbecomes an important factor to be considered while designing any scheduling algorithm.The project proposes a novel method for reducing the Energy Consumption whilescheduling the tasks to the Virtual Machines.

Taking into account the need for energy conservation our method uses the ant-colonysystem to dynamically find out the hosts whose power consumption is less based on theirCPU utilization, and allocate the Tasks to the VMs run by such hosts. Essentially, theproposed method adds makespan and power-awareness factors to the ant-colony system, sothat, the ants track the path with the least power consumption and makespan. Thecontribution of this project is the proposition of a new task scheduling algorithmenhanced with the makespan and power consumption factors. Experimental results showthat the proposed policy saves energy by 22 %.

The rest of the paper is organized as follows: In Section 2, the relevant existingsolutions are discussed. Section 3 deals with the System Model, the various techniquesapplied to the system. Section 4 explains about our proposed algorithm and itsmethodology. Section 5 deals with the results of our algorithm and the comparison withthe other methods. Finally, Section 6 concludes the paper.

2. Related Work

There has been various efforts made for improving the performance of TaskScheduling. Here, some of them are discussed with respect to Energy Conservation andTask Scheduling.

2.1 Related work in Energy conservation

Over the past decade, energy-efficient resource scheduling has extensively beenstudied. In this section, we discuss about some of the related research in this area.

VM consolidation is a technique, which is helpful in reducing the energy consumption ofthe hosts. The work in the paper [2] suggests the use of ant-colony optimizationalgorithms to find out the VMs to consolidate. Another variation in this method is theuse of best-fit algorithm to find out the VMs to consolidate.

Dynamic Voltage/Frequency Scaling (DVFS) is a very commonly used method in these days in theservers to dynamically change the CPU’s clock speed and thereby reducing the powerrequired to execute a job. The technique employed in [3] uses DVFS to dynamicallychange the voltage by adjusting the clock speed of the CPU. But, this method affectsthe execution time of a job on the virtual machine running on the host machine, sopreferred for IO-bound jobs mainly.

2

Preemption-aware Energy Management (PEMP), based on the work in the paper [4] reduces theenergy consumption by 18 percent by pre-empting the lesser priority Tasks and puttingthem in the queues and allowing higher priority Tasks to get the resources. The methodsuggested in the paper maintains a fixed threshold, MAWT (maximum average waitingtime) for each lesser priority Tasks which increases the priority of the Task when thewaiting time crosses the threshold Most of these work apply an energy conservation outside the scheduler, whereasthe proposed method tries to conserve energy while allocating Tasks to the virtualmachines. Typically, the proposed technique is a scheduler-level energy conservationscheme.

2.2. Related work in Task scheduling

FCFS or opportunistic load balancing in cloud assigns the first Task i to the firstavailable VM j. It uniformly assigns the Tasks to all the VMs in the cloud irrespectiveof the execution time of the Task in the VM. This method severely suffers from verylarge makespan and does not even care about the power consumed at the hosts. Anothervariation in the opportunistic load balancing is the Shortest Job First (SJF) which as the namesuggests assigns the task to the VMs having the least execution time. This variationalso suffers from the same drawback. The work in the paper [5] uses Ant-colony Optimization to assign the tasks to theVMs, this method is similar to our proposed method in the broader sense that both themethods use the same algorithm in background but varies in the following ways. Themethod does not consider the features of the tasks to be run before allocating the taskto a VM, while our method is based is based on that factor only. Also, the method doesnot consider the power consumed in the hosts running the VMs before allocating the taskto them. Since, all the Task allocation mechanisms has problem with load as well ascompletion time, it is necessary that the proposed algorithm has to go through everypossible combination of (Task,VM) pair to find out the minimal execution time alongwith power consumption.

3. System model

The users have a lot of tasks or jobs which are to be processed on the resources, theseresources are virtualized by the virtualization Layer and the physical resources areabstracted. The System [6] consists of a User pool, consisting of the users whose tasksare pooled together in Tasks pool and the VMs running on the physical machinesconstitutes the Virtual Resource pool whereas the hardware resources form the PhysicalResource pool. The pools are abstracted from each other and the scheduler allocates thetasks from the pool to a VM on a host. The The System Model is based on the Cloudsim[6] platform. The CIS is consisted of Scheduler and VM Allocator, the Schedulercomponent is enhanced to act as Energy-aware Scheduler. As shown in Figure 1, Energy-

3

Linda J.et.al.

aware Scheduler schedules the Jobs to the virtual resources and VM Allocator allocatesthe VMs to the physical resources.

3.1 Resource Task model

The resources and Tasks modelling in this method, is inspired from the ETC (ExpectedTime to Compute) matrix model from [7]. As per this model, the expected time tocomplete for the Task i on resource j is as follows:

(1)

Where, = the workload of the Task i, = the computing capacity of the VM j

Figure 1: The System Model

3.2 Linear Power Model

The power model used is linearly varying with the host’s CPU utilization as per [13].The power consumed at host, is defined as follows:

(2)

Where,φ = the CPU utilization of the host,

= the total power consumed by the host when its CPU utilization iszero, normally, it is 70 percent of the maximum power consumed. = the total power consumed by the host when its CPU is fully utilized.

The Hosts which have higher CPU utilization will consume higher power as per theequation in (2). Based on this idea, we have to choose the hosts whose CPU utilization

4

is less. In a cloud, where hosts have higher tendency to have varied CPU utilization,this method suits best.

4. Energy-aware Task scheduling in cloud using Ant-colony optimization

Task scheduling in cloud is scheduling the n Tasks (T1, T2, .., Tn) to m virtual machines (V1,V2, .., Vm) running on p physical hosts (H1, H2, .. Hp) having q processors or processingentities (P1, P2, .., Pq) in such a way that maximum completion time or Makespan of these nTasks will be minimized. Since, the existing methods for Task scheduling in cloudcauses increased Makespan and no consideration for power consumption we go for Taskscheduling using ant-colony optimization, which reduces the energy consumption whiletaking care of the Makespan.

4.1 Ant-colony system

Ant Colony optimization [10] one of the bio-inspired algorithms that are used to solvemany combinatorial optimization problems whose solution space is very huge. The antsare used to search the broader solution space in parallel while communicating with eachother using the pheromone trail (foraging) and to find the approximate solution.

4.2. Problem Modelling

The problem of Task scheduling in cloud is modelled along with the ant-colonyoptimization as follows. The Tasks and the VMs are treated as disjoint sets and a graphconsisting of Task nodes and VM nodes and arcs constitute the construction graph, overwhich the ants are made to move. The state transition rule [10], using which an antchooses the next node is broken down into VM rule and Task rule as per the requirementsof our problem. Initial pheromone value, local updation rule, global updation rule arediscussed in the following sections.

4.2.1. Initial pheromone

As the name indicates, the initial pheromone content on each of the arc in the graph istaken to be a constant, so that each of the arcs has the same probability of beingchosen by an ant. The constant value is taken as shown below:

(3)

Where,= The expected time for the Task i to get computed on the resource j.

It’s assumed to have known in prior.N = The total number of Tasks waiting in the pool of Tasks.

5

Linda J.et.al.

4.2.2. VM rule

The VM Rule allows the ant to choose the VM node from the list of not visited VM nodes.The VM Rule is as follows, an ant positioned on task node r chooses the VM node s tomove to by applying the probability rule given in equation 4.

(4)

Where τ is the pheromone across the edge formed by r and s, η is a function of thesubpath pathk traversed by the ant k. And is given by

Vk(s) is the set of the VM nodes that are already visited by ant k including VM nodes. θ(v) is the final completion time of the last Task assigned to v VM node in subpathpathk. Jk(r) is the set of the VM nodes that remain to be visited by ant k and β is theparameter which determines the importance of makespan and β≥0.

ω is also function of the subpath pathk which helps to find out the total energyconsumed in the hosts in the path and it is given by

Hk(s) is the set of the hosts that are in the path traversed by ant k including thehost that runs VM node s. µ(h) is the total power consumed by the hosts in that pathafter assigning Task r to the VM node s in the subpath pathk. γ is a parameter whichdetermines the importance of power and γ ≥0. This VM Rule, favours the movement of theants toward the nodes connected by edges with a large amount of pheromone and lessermakespan and lesser power-consumption value.

4.2.3. Task rule

The Task rule allows you to find the next Task node to visit. Every time, when ant hasto choose the next Task node, it simply samples a Task node from the list of nodes thatare not yet visited Jk and visits the node.

4.2.4. Global Updation rule

The global updation rule is implemented so that the ants will get to know the globallybest path, i.e. the best path among all the paths traced by the ants and it is

6

implemented as following equation. Once all ants have built their tours, pheromone isupdated on all edges according to the best path,

τ (r,s)=(1−α).τ(r,s)+α.△τ(r,s) (5)

Where,

Δτ(r,s ) =

0<α<1 is a pheromone decay parameter. Lk is the length of the tour performed by ant k.

4.2.5. Local updation rule

While building a solution of the problem, ants visit edges and change their pheromonelevel by applying the local updating rule shown below.

τ(r,s)=(1−ρ).τ(r,s)+ ρ.△τ(r,s) (6)

0<ρ<1 is a pheromone decay parameter and means the same as that in theglobal updation rule.

4.2.6. Best Path

After incorporation of the energy awareness feature, the ants decides the best pathbased on the product of Makespan and total power consumed over the time.

4.3. Working of the Algorithm

This section deals about the working of the entire algorithm that is proposed in theprevious sections. The proposed algorithm to minimize the total energy consumptionwhile allocating Tasks to the resources in the cloud uses ant-colony optimizationtechniques. Each ant randomly selects a start node and applies the VM rule and the Taskrule and then performs local pheromone updation till all the ants builds a completesolution. Then, a global pheromone updation is done by all the ants synchronously. Thisprocess iterates till the number of iterations provided by the user which is the endcondition. The Algorithm is given below in Algorithm 1.

7

Linda J.et.al.

5. Results and Discussion

This section discusses about the results obtained through the proposed method andcompare its performance with other existing methods. The experiment is simulated usingCloudsim platform. The comparison is made among opportunistic load balancing or FCFS,Energy-aware ACO scheduling algorithms.

5.1. Experiment Environment

It is assumed that the jobs are CPU bound or computationally intensive and they have noprecedence over each other, so that, there can be no pre-emption, no migration of thejobs. The simulated datacenter in Cloudsim used for experiments consists of nearly 100hosts each running a VM. Based on the requirements of the VMs, the hosts have variedCPU utilization. For this experiment, we considered 3 variations 35%, 50%, 90% of CPUUtilization in the hosts in an equal proportion in number. The jobs are from 1000 MI(Million Instruction) to 100,000 MI. The proposed algorithm aims to reduce the Makespanas well as reduce the energy consumption of the hosts in the datacenter.

5.2. ACO Parameter Setup

After performing extensive testing, the best values for the parameters of Energy-awareACO is found out and are given in the table shown below. The parameters specific toEnergy-aware ACO like ρ, α, β, γ are chosen after 100 successive experiments.

8

Table 1: Energy-aware ACO parametersParameter ValueNo. Of ants 10

No. Ofiterations

100

ρ 0.1α 0.1β 1γ 2

Figure 2: Comparative Makespan Graph

5.3. Comparison of Makespan against traditional opportunistic load-balancing or FCFS

The Figure 2, shows the Makespan value obtained by Energy-aware ACO and FCFS. In theFigure 2, 5 Tasks are run on 2 VMs, 10 tasks on 3 VMs and so on.

Figure 3: Comparative Energy Graph

Figure 4: Comparative Energy Chart

It can be seen from Figure 2 that the Energy-aware ACO improves the Makespan by 22%from the traditional FCFS. As per our experiments, in all the cases, our algorithmoutperforms the traditional FCFS. Our Method allocates a task to the VM only if thetotal power consumption will be less, but this check is not done in FCFS, thus leadingto the difference in Energy Consumption. The effect is more visible when the no. ofjobs are more.

5.4. Comparison of energy-consumed against opportunistic load-balancing or FCFS

The Figure 3, shows the energy consumed by Energy-aware ACO and FCFS. It can be seenfrom Figure 3 that the energy-consumed is lesser in the proposed Energy-aware ACO thanthe FCFS. The Figure 4, shows the same but in the form of a chart. It can be seen from

9

Linda J.et.al.

Figure 4 that the Energy-aware ACO improves the energy consumption by 22% from thetraditional FCFS.

6. ConclusionIn this article, a new task scheduling using Ant Colony Optimization that reduces theenergy consumption for cloud is proposed. The proposed algorithm incorporated withenergy awareness feature is compared with other classic task scheduling techniques likeFCFS. It is observed that the proposed method outperforms the existing techniques by22% in terms of energy consumption and makespan. In future, research could be done forIO bound and dynamic workload energy management in the cloud.

References[1] A. Belaglazov, R. Buyya, Optimal online deterministic algorithms and adapative heuristics for energy

and performance efficient dynamic consolidation of virtual machines in cloud datacenters, in: Concurrency and Computation: Practice and Experience, IEEE, 2011.

[2] A. Esnault, E. Feller, C. Morin, Energy-aware distributed ant colony based vm consolidation in iaas cloud, in: Proceedings of the SimulationModelling Practice and Theory, Elsevier, 2013.

[3] Y. Chang-tian, Y. Juong, Energy aware task scheduling using genetic algorithms, in: Proceedings of the 7th Annual Conference on GridsChina, IEEE, 2012.

[4] M. A. Salehi, P. R. Krishna, K. S. Deepak, Preemption-aware energy management in virtualized datacenters, in: Proceedings of the 5thInternational Conference on Cloud Computing, IEEE, 2012.

[5] K. Li, G. Xu, G. Zhao, Y. Dong, D. Wang, Cloud task scheduling based on load balancing ant colony optimization, in: Proceedings of the 6thAnnual Conference on Grids China, IEEE, 2011.

[6] R. N. Calheiros, R. Ranjan, C. A. F. D. R. Anton Beloglazov, R. Buyya, CloudSim: A Toolkit for Modeling and Simulation of CloudComputing Environments and Evaluation of Resource Provisioning Algorithms, Wiley Press, New York, USA, 2011.

[7] S. Ali, H. J. Siegel, M. Maheswaran, D. H. abd, S. Ali, Task execution time modeling for heterogeneous computing systems, in: Concurrencyand Computation: Proceedings of Heterogeneous Computing Workshop, International, 2000.

[8] G. T, T. Monteil, G. D. Costa, R. N. Calheiros, R. Buyya, M. Alexandro, Energy-aware simulation usingdvfs, in: Proceedings of SimulationModelling Practice and Theory, Elsevier, 2013.

[9] G. Srikanth, V. Maheswari, A. Shanthi, A. Siromoney, Tasks scheduling using ant colony optimization, Journal of Computer Science.

[10] M. Dorigo, L. M. Gambardella, Ant colony system:a cooperative learning approach to the travelling salesman problem, IEEE Trans. EvolutionaryComputation. 1 (1) (1997) 53–66.

10