2018 International Conference on Computer, Electronic Information and Communications (CEIC 2018) ISBN: 978-1-60595-557-5
Research on Cloud Computing Task Scheduling Based on Improved
Ant Colony Algorithm
Hai YANG
College of Information Science and Electricity Engineering, Shandong Jiaotong University, Jinan, Shandong, China 250357
Keywords: Cloud computing, Task scheduling, Ant colony algorithm, Pseudo-random proportional
rule.
Abstract. Task scheduling is one of the key problems of cloud computing system which focuses on how to make full use of cloud resources efficiently. In this paper an improved ant colony algorithm named ACA-S is proposed. The ACA-S algorithm can get more effective optimal solutions by using pseudo-random proportional rule, improved state transition strategy and pheromone updating strategy, so as to avoid trapping in the local optimal solution. Finally, the simulation experiment reflects that the ACA-S algorithm is better in optimization ability and improves the procedure of cloud computing task scheduling.
Introduction
Cloud computing is a new calculation model after distributed computing, grid computing and peer-to-peer computing, which really reflects the concept of on-demand service [1]. Cloud computing system could construct the computing platform satisfying multiple kinds of service requirements by integrating the distributed cloud resources. Meanwhile the distributed cloud resources and tasks are massive [2]. So how to make full use of the distributed cloud resources and how to schedule tasks efficiently are two of key problems of cloud computing system.
For the past few years, there are many researches on cloud computing task scheduling have been done and a certain number of algorithms have been proposed especially ant colony algorithm (ACA) [3]. The ant colony algorithm has been verified to be a good choice to solve the cloud computing task scheduling problem. But ACA also has some shortcomings like slow convergence and easy to stagnation.
This paper proposes an improved ant colony algorithm named ACA-S which have brought pseudo-random proportional rule, improved state transition strategy and pheromone updating strategy into the basic ant colony algorithm. Finally, the simulation experiment reflects that the ACA-S algorithm is better in optimization ability and speeds up the procedure of cloud computing task scheduling.
Description of Cloud Computing Task Scheduling Problem
Nowadays, most of all cloud computing system are using the Map/Reduce distributed computing mode to deal with massive data. The working framework of Map/Reduce distributed computing mode is shown as figure I.
There are two key stages including map and reduce in the working framework of Map/Reduce [4]: (1) The map stage. During the map stage the tasks submitted by users are divided into multiple subtasks firstly. Then the subtasks are assigned onto the corresponding nodes of cloud computing system to execute separately. The results of subtasks will be feed back to the primary node [5].
Figure 1. The working framework of map/reduce.
During the procedure of Map/Reduce, every node need to execute more than one subtask because the number of subtasks is much more than the number of nodes in the cloud computing system [6]. So the cloud computing task scheduling problem is how to assign all the subtasks onto the nodes so as to minimize the execution time of task, which could be described formally as follows:
The task can be divided into n subtasks, and then the n subtasks are assigned onto m nodes (m<n). Let T ={t1,t2,...,tn} denote the set of subtasks, tj (0< j≤n) denote the jth subtask. Let
} , , ,
{vm1 vm2 vmm
VM = denote the set of nodes in the cloud computing system, i
vm (0<i≤m)
denote the ith node. Every tj only can be executed on one vmi. The corresponding relation between
Tand VM can be denoted as an distribution relation matrix X as follows:
=
mn m
m
n n
x x
x
x x
x
x x
x
X
... ... ...
2 1
2 22
21
1 12
11
(1)
Where xij is the corresponding relation between tj and vmi, xij∈{0,1},
∑
== m
i ij
x
1
1, i∈{1,2,,m},
} , , 2 , 1
{ n
j∈ . If subtask j
t is assigned onto the node vmi, xij =1, otherwise xij =0. Let ETij
denote the expected value of execution time of subtask tj on the node vmi, the ET matrix can be
described as follows:
=
mn m
m
n n
ET ET
ET
ET ET
ET
ET ET
ET
ET
2 1
2 22
21
1 12
11
(2)
Let the starting time of vmi is ci, the excepted finishing time of node vmi is described as the formula (3):
∑
= × +
= n
j
ij ij i
i c ET x
CT
1
(3)
Where i∈{1,2,,m}, j∈{1,2,,n}.
Set CTmax =max{CTi}, CTmin =min{CTi}. So the excepted finishing time of the whole task is
max
∑
= − − = m j i CT CT CT CT CT f 1 min min max ) ( (4)Let ECij denote the total cost of subtask ti on the node vmj, Aij is the occupied resource of
subtask ti on the node vmj, then ECij, ETij and Aij satisfy the formula (5) as follows:
ij ij
ij ET A
EC =
ε
× × (5)The EC matrix is described as formula (6) as follows:
= mn m m n n EC EC EC EC EC EC EC EC EC EC 2 1 2 22 21 1 12 11 (6)
Let ECi denote the cost of node vmi,i∈{1,2,,m}, then
∑
= × = n j ij iji EC x
EC
1
. The fitness function
of total cost of all subtasks is described as formula (7) and the fitness function of task scheduling is described as formula (8):
∑∑
∑
= = = = m i n j ij m i i EC EC EC f 1 1 1 (7) EC CTfitness f f
F =
α
× +β
× (8)Where α+β =1, 0≤α,β ≤1. The subject is to find a matrix X which could minimize the value of Ffitness.
Ant Colony Algorithm
The ant colony algorithm, which is firstly proposed by Marco Dorigo in 1992 [7], was aiming to find out an optimal path based on the behavior of ants seeking food. In the natural world, ants initially wander randomly, and upon finding food return to their nest while laying down pheromone trails. If other ants find such a path, they are likely not to keep traveling at random, but to instead follow the trail, returning and reinforcing it if they eventually find food. When the ant k moves to the next node j from node i, the node j can be decided with the probability Pijk(t) which can be calculated by
formula (9): ∈ =
∑
∈ otherwise A j t t t t t P k As is is
ij ij k ij k 0 ) ( ) ( ) ( ) ( )
( α β
β α η τ η τ (9)
Where
τ
ij(t) denotes the pheromone density, Ak is the set of optional nodes adjacent to node i. αis the heuristic factor of pheromone. β is the heuristic factor of expectation. ηij(t) is the distance
ij ij
d
t) 1
( =
η (10)
Where dij denotes the distance from node i to node j.
Over time, however, the pheromone starts to evaporate, thus reducing its attractive strength. The more time it takes for an ant to travel down the path and back again, the more time the pheromones have to evaporate. A short path, by comparison, gets marched over more frequently, and thus the pheromone density becomes higher on shorter paths than longer ones. Pheromone evaporation also has the advantage of avoiding the convergence to a locally optimal solution. If there were no evaporation at all, the paths chosen by the first ants would tend to be excessively attractive to the following ones. In that case, the exploration of the solution space would be constrained.
Local pheromone updating strategy is regarded as follows:
) ( ) ( ) 1 ( )
(t n ij t it t
ij ρ τ τ
τ + = − ⋅ +∆ (11)
Where
ρ
is the evaporation rate of pheromone. ∆τit(t) denotes the increment of pheromone onpath (i , j) during once iteration. ∆τit(t) can be gain by formula (12) as follows:
= ∆
otherwise j i L
Q
t k
it
0
) , ( /
) (
τ (12)
Where Q is the pheromone density and Lk denotes the total length of the route ant k moved.
Improved ant Colony Algorithm and Its Application on Cloud Computing Resource Scheduling
Initialization of Pheromone
The pheromone of paths will be initialized before the execution of algorithm. m ants select subtasks and nodes randomly so as to result into the (T,vm) which can be the starting node of path. The initialization of pheromone can be executed according to formula (13):
∑
−= ×
= 1
0 0
min 1 m
k
k
CT m
τ (13)
Where m is the number of ants,
∑
−= 1
0 min m
k
k
CT denotes the set of shortest execution time of subtasks
on nodes.
Improved State Transition Strategy
According to the feature of cloud computing task scheduling problem, the improved ant colony algorithm proposed in this paper uses the pseudo-random proportional rule to find the optimal path. The improved state transition strategy is described as formula (14):
> ≤ ×
×
= ∈
0 0
) , (
)} , ( ) , ( ) , ( { max arg
p p s
i P
p p i
k i i
j Ni
λ λ
η λ
τα β γ
λ
(14)
Where p0 is a constant (1≤ p0≤1), p is a random value between [0,1], Ni is the neighbor nodes
of node i. If p≤ p0 , select the special node which could maximize the value of
) , ( ) , ( ) ,
( λ η λ λ
τα β γ
i k i
∈ × × × × =
∑
∈ otherwise N s i k i i s i k s i s i s i P i Ni , 0 , ) , ( ) , ( ) , ( ) , ( ) , ( ) , ( ) , ( λ γ β α γ β α λ λ η λ τ η τ (15)Where τ(i,s) is the pheromone of paths between subtask i and subtask s, η(i,s) is the impact of task execution intervals, k(i,s) is the impact of task priority. α, β, γ are the weights of influence factors.
Local Pheromone Updating Strategy
The local pheromone updating strategy of the improved ant colony algorithm is described as formula (16). When the ants move from (Ti,vmn) to (Ti+1,vmn+1), the pheromone of paths will be updated.
0 ) ( ) 1 ( ) 1
( ρ τ ρ τ
τi t+ = − × i t + × (16)
Where τi(t) is the pheromone of (Ti,vmn) at t time, τi(t+1) is the pheromone of (Ti+1,vmn+1) at
) 1 (t+ time.
Global Pheromone Updating Strategy
When all of the ants finish moving, the pheromone of the optimal path will be updated according to formula (17) and (18):
∑
= ∆ + ⋅ − = + m k k ij ijij t n t
1 ) ( ) 1 ( )
( ρ τ τ
τ (17)
= ∆
∑∑
= = otherwise j i EC Q m i n j ij k ij 0 ) , ( 1 1τ (18)
Where
∑∑
= = m i n j ij EC 1 1denotes the sum of maximum of ECij according to the path moving by ant k.
The Pseudo code of ACA-S
The Pseudo code of the improved ant colony algorithm named ACA-S according the thinking mentioned above is described as follows:
Begin
Initialize the pheromone of every path
For each i in iterator
For each j in ant set
Put every ant in a random (Ti,vmn) node
While (k in tasks set )
Choose the next (Ti+1,vmn+1) node according to formula (14) and (15)
Update local pheromone
End While
End For
Calculate the best time and the optimal scheduling path
End For
End
Simulation Experiment
In order to verify the feasibility and effectiveness of the improved ant colony algorithm named ACA-S in solving cloud computing task scheduling problem, the simulation experiment is carried out using the Cloud-Sim 3.0 platform. The cloud resource, tasks and virtual machines in the cloud computing system are generated by the tools of Cloud-Sim 3.0 platform such as DataCenter, Cloudlet and VM etc. The experimental data are shown in TABLE I.
[image:6.612.181.432.274.368.2]Then the optimal solutions are calculated using the improved ant colony algorithm (ACA-S) and basic ant colony algorithm (ACA) separately. The experimental factors include: the number of ants m=20, the maximum number of iterations is 500, α=1.0, β=5.0, ρ=0.5, Q=5.0. The range of tasks number varies from 20 to 100.
Table 1. The parameters of the experimental data.
VM
Number MIPS of VM
Task Number
Ants Numbe
r
Iteration
5 500-1500 20 20 500 5 500-1500 40 40 500 5 500-1500 60 60 500 5 500-1500 80 80 500 5 500-1500 100 100 500
The results shown in Figure II reflect that the execution time of ACA-S is shorter than ACA. So ACA-S has higher efficiency for task scheduling in cloud computing.
Figure 2. Comparison of the aca and aca-s on resource scheduling.
Conclusion
[image:6.612.198.417.414.569.2]References
[1] Zhang Huanqing, et al. Task scheduling algorithm based on load balancing ant colony optimization in cloud computing[J]. Microelectronics & Computer, 2015(5):31-40.
[2] Cristian Mateos, Elina Pacini, et al. An ACO-inspired algorithm for minimizing weighted flow time in cloud-based parameter sweep experiments[J]. Advances in Engineering Software, 2013(56):38-50.
[3] Alakeel M. A guide to dynamic load balancing in distributed computer systems[J]. International Journal of Computer Science and Network Security, 2010, 10(6):153-160.
[4] H. W. Tian, F. Xie. Resource Allocation Algorithm Based on Particle Swarm Algorithm in Cloud Computing Environment[J]. Computer Technology and Development. 2011, 21(12):22-25.
[5] Y. Liu, X. H. Wang, et al. Resources scheduling strategy based on ant colony optimization algorithms in cloud computing[J]. Computer Technology and Development, 2011, 21(9): 19-23.
[6] Dodonov E, deMell R. A novel approach for distributed application scheduling based on prediction of communication events[J]. Future Generation Computer Systems, 2010, 26(5):740-752.