٣
٣
Wu Zheng-tao
Abstract. In cloud computing, because all the tasks are submitted and requested
by the users, it is the key to improve the quality of service whether all tasks are
scheduled to every host to achieve the shortest completion time for all tasks. In
this paper, the basic ant colony algorithm is modified appropriately to enable task
scheduling and load balancing. The simulation results show that the ant colony
algorithm can effectively obtain the global optimal solution and realize the
shortest task completion time.
Keywords: cloud computing; load balance; Ant Colony Optimization
0 Introduction
ACO is a new bionic intelligent algorithm. The first ant guides and influences the
selection of the following ants by means of pheromone, so as to achieve the goal of
cooperation among ants. The application of ant colony algorithm in the task scheduling
of cloud computing is studied in this paper.
In a data center of cloud computing, there are n virtual hosts, they are set as
,Each virtual host has a different MIPS (millions of in-
structions per second). At the same time, there are m tasks that need to be scheduled to
work on the n virtual hosts. The total amount of time spent in these tasks is:
Where indicates that the i virtual host completes the time allocated to all of its
tasks, calculated by formula (2) and formula (3).
In the above two formulas, suppose that the performance of platform I virtual host
is MIPS, and there are k tasks allocated on it, the number of instructions corresponding
to each task is (Million Instructions), so the time for each task is .
2 Ant Colony Optimization
After finding the food, the ants will randomly explore the way from home to food,
and leave on the road with pheromones that are inversely proportional to the length of
the journey. Subsequent ants will be based on the concentration of pheromones, select
the nearest road, so as to achieve the group to find the best path of the results. If the
shortest path is interrupted, the ants will randomly explore and converge quickly to the
new shortest path.
The basic ACO in the TSP (traveling salesman problem) on the state as follows:
at time 0, all the ants and n city will initialize m ants randomly in a city as a starting
point, each edge between the city has an initial pheromone concentration Each
ant places its city as the first element of the tabu list. Each ant then selects the next city
to move, based on the probability function of the two parameter( ) (formula (6)),
moving from the city I to the city J, and fill out the corresponding tabu list. After a cycle
of N times, all ants go through all the cities and fill out the tabu list. After that, calculate
the path length of each ant and then update corresponding pheromone
according the formula (4) Save the shortest path that ants walk through, and get the
shortest path after one traversal And empty all the tabu tables and start the
next traversal loop. Repeat the process until the number of iterations reaches the
required number of iterations( ),get the shortest path in the global situation
where means In the tabu list of K, the J city has not passed yet.
In summary, fig.1 shows the flow chart using ACO to solve the TSP problem.
Fig.1.ACO solve TSP problem
In the solution of the shortest time, m ants were placed in the initial position,
according to the rules of a certain probability choice every ant can arrange Vm for
next task, until all tasks completed, and then pheromone increment table will be updated
based on the total time. After all ants have finished their work, the best solution is
selected from all candidate allocation and the historical optimal solution, and it is
recorded, then the homologous pheromone table is updated. Then the pheromone is
corrected, simulating the ants releasing pheromone on the optimal path and the natural
volatilization of pheromone, leading the ant to find the global optimal solution. Fig.2
shows the flow chart of the algorithm implementation.
Fig.2 the flow chart of the algorithm implementation
In the formula, the Q is expressed as a constant, and L is the total time after which
the current ant is assigned the task. Each ant will leave pheromones on its path, and in
the end, the global pheromone increment is the sum of the pheromone left by all the
ants.
(2) calculation rule of task transfer probability
When the ant chooses the virtual host for the next task, it is determined by the
pheromone left before it and a heuristic information. The probability formula for
assigning the task J to the virtual host I is shown in formula (6), where is
pheromone concentration, is the heuristic information. The formula of is
given by formula (8) and (9):
According to the above principle and various rules, this paper has designed and
stipulated a series of parameters. In the formula (7), the value of the constant Q will
affect the left ant pheromone on global pheromone influence, it will weaken the
influence of a better path on later ants if Q is too small otherwise it will faster
convergence which can easily fall into local optimal solution. According to the task
length and the MIPS value of Vm, repeated experiments were conducted, and finally
100 was selected. In the formula (6) and (10), are control parameter, where
respectively indicate the importance of pheromone and heuristic information,
and is the volatilization rate of pheromones. Studies have shone that when is 1,
the resulting optimum is better than the other. When value of is from 1 to 5, the
optimal solution quality will gradually become better, and when is more then 5, the
quality of the solution can be reduced, therefore, 5 is assigned to . value changes
between 0.3~0.9, the solution changed little, when its value is 0.5, the quality of
solution is the best, is suggested to value of 0.5[5]. In formula (9), MIPS is randomly
chosen in 100~300, and BW is the interface bandwidth. In this paper, the default value
of simulation software is taken. The task length of all tasks is also random, with a range
of 10000~50000.
Before the simulation starts, the paper specifies some parameters in the ant colony
algorithm, as shown in table 1:
Q
100 1.0 5.0 0.5
In order to ensure the heterogeneity of all virtual hosts, Java is used to randomly specify
20 different MIPS hosts. The range of MIPS is 100~300, and the value of MIPS is
shown in table 2:
Table.2.the MIPS of 20 Vm
VmId 1 2 3 4 5
Mips 228 299 108 204 152
VmId 6 7 8 9 10
Mips 275 202 278 109 195
VmId 11 12 13 14 15
Mips 208 294 196 143 140
VmId 16 17 18 19 20
Mips 209 292 194 212 255
At the same time, 100 tasks with different task lengths are generated randomly, and the
length is 10000~50000.
In order to determine the optimal solution, the number of ants is taken as half of the
number of virtual hosts, 1000 iterations, and the final total running time is
813.1402877697841. Task assignment is shown in table 3:
VMID TASK ID
0 27 73 97 50 16 15
1 72 0 56 58 68 94 42 14
2 9 84 43
3 3 74 46 54 13 17
4 11 49 86 24
5 90 88 98 93 47 8
6 7 71 62 30
7 63 59 22 37 55 95 87
8 38 70 77
9 51 89 75 10
10 52 36 91 18
11 85 44 53 92 45 12 19
12 33 61 99
13 29 39 83 35
14 32 78 4
15 28 66 1 26 20
16 6 21 64 67 40 82
17 31 34 57 80 81
18 23 65 96 76 2 60 48
19 25 69 79 5 41
4 Conclusion
In this paper, a method of load balancing for Cloud Computing Based on ant colony
algorithm is proposed, and simulation experiments are carried out. The method
guarantees that all virtual hosts can receive task assignments as evenly as possible, and
that the total time of task completion is as short as possible. It can be seen that ACO
has the following characteristics in load balancing:
As the ants continue to spread pheromones to the environment, new information will
soon be updated to the environment, with dynamic characteristics.
Each ant makes its own choice according to the environment, and also sends out its
pheromones. Therefore, ACO has distributed features.
Ants share environmental information and influence environment at the same time,
so ACO has the characteristics of cooperative operation.
These characteristics are consistent with the super large scale, heterogeneous and
real-time characteristics of cloud computing, so ACO is important for load balancing.
Although ACO can solve the problem of load balancing, but also has the following
problems need further study:
Load balancing is a multi-dimensional and multi constrained QoS problem. In this
paper, the shortest time problem in load balancing is discussed, as well as the minimum
transfer and the economic principle.
ACO needs to initialize some parameters, and the choice of parameters has an
important influence on the performance and the final results. Therefore, in the cloud
computing environment, the setting of various parameters needs further study.
The search time of ACO is too long, and the convergence speed is slow. How to
combine ACO with neural network and particle swarm algorithm to improve the
performance and efficiency of the algorithm in order to meet the requirements of re-
sponse time and response speed of cloud computing.
References
1. Liu Peng. Cloud computing (Third Edition) [M]. Beijing: Publishing House of electronics
industry, 2015.
2. Li Fenghua. Research on load balancing scheduling algorithm of cloud computing resource
based on ant colony algorithm [D]. Yunnan: Yunnan University, 2013.
3. Zhang Ning. Research on task scheduling of cloud computing based on adaptive ant colony
algorithm [D]. Dalian: Dalian University of Technology, 2015.
4. Kong Lingjun, Zhang Xinghua, Chen Jianguo. Basic ant colony algorithm and its
improvement [J]. Journal of Beihua University, 2004, 5 (6):572-574.
5. Ye Zhiwei, Zheng Zhaobao. The parameters alpha, beta in the ant colony algorithm, with
an example of TSP problem [J]. Journal of Wuhan University, 2004 of P set, 29 (7):597-
601.
6. Wang Xiajun.Cloudsim, cloud computing simulation tools, research and application of [J].
micro computer applications, 2013, 29 (8):59-61.
7. Tian Qinghua.An Abstract of Ant Colony Optimization [J].Shijiazhuang: Journal of
Shijiazhuang Vocational Technology Institute,2004,16(6):37-38.
8. Zhang Hang,Luo Xiong.Status and Prospect of Ant Colony Optimization Algorithm [J].Hu-
nan:Information and Control,2004,33(3):318-324.