cloud computing resource scheduling method research based on improved genetic algorithm
TRANSCRIPT
Cloud Computing Resource Scheduling Method Research Based on
Improved Genetic Algorithm
Cui Yun-fei1 Li Xin-ming1, Dong Ke-wei2, Zhu Ji-lu1
1The Academy of Equipment Command & Technology, Beijing 101416, China 2China Satellite Maritime Tracking & Control Department, Jiang yin Jiangsu 214431, China
email: [email protected]
Key words: Cloud computing; Resource scheduling; Genetic Algorithm; CLOUDSIM
Abstract. Resource scheduling is the key port of cloud computing resource management. One
excellent method may enhance the efficiency of the whole cloud computing system, and effectively
share resource in wide area. Genetic Algorithm has adaptability, global optimization ability and
implicit parallelism, which is not in other methods. For the sake of scheduling effective resource to
accomplish relevant task, improved genetic algorithm is adopted in cloud computing resource
scheduling research. Finally, a simulation based on cloudsim is carried out, which proves the
correctness and validity of the scheduling method mentioned in this paper.
Introduction
The most important aim of cloud computing is to offer information services according to need. And
cloud computing services are made up by a set of correlative child services [1] (the logic relationship
between child services is supposed known in this paper).
The key to offer information services is how to implement resource scheduling. When
scheduling child services, each child service is supposed to be implemented by every resource that
can be used.
There areMchild services and N resources, then
1) { }1 2, , ,
MS S S S= �
: child services;
2) { }1 2, , , NR R R R= �: resources;
3) ijt :the time needed to implement child services ( 1,2, , )iS i M= � by resources ( 1,2, , )
jR j N= � .
4) iP :the time needed to implement the ithservice by standard resource.
5) rjR :operation ratio between the jth resource and standard resource.
In one scheduling, we use )( jRC to define the time to implement all local child services by
jR ,
use T to define the whole time to implement all child services, then
max( ( ))jT C R= , 1, 2, ,j N= � (1)
Cloud computing resource scheduling aims to look for min( )T . And the relationship between
services can be shown by a directed acyclic graph (as in figure 1).
Advanced Materials Research Vols. 271-273 (2011) pp 552-557Online available since 2011/Jul/04 at www.scientific.net© (2011) Trans Tech Publications, Switzerlanddoi:10.4028/www.scientific.net/AMR.271-273.552
All rights reserved. No part of contents of this paper may be reproduced or transmitted in any form or by any means without the written permission of TTP,www.ttp.net. (ID: 68.181.176.15, University of Southern California, Los Angeles, United States of America-06/04/14,11:37:30)
Figure 1 Directed Acyclic Graph
Between two connective child services in two layers, the above node is called father node when
another one is called child node. One precondition to implement services in child node is to
implement services in child node.
Improved Genetic Algorithm
Colony Initialization. For one scheduling question, including m child services and n resources, chromosomes are created by random, which means to random distribute one service to
one resource. Owing to satisfy sequence restriction of child services, we rank the child services
firstly when colony initialization.
The relationship between services can be shown by a directed acyclic graph (as in figure 1). In
one DAG, each layer has a depth value, and lesser depth value means higher PRI. Depth value is
computed by formula (2).
+ otherSparentlevel
nodefathernohasSSlevel
i
i
i,1
0, =
)))((max(
)(
, 1, 2i m= 2 (2)
Here, )( iSparent is the father nodes aggregate of iS , )))((max( iSparentlevel is the maximal
depth value of the father nodes aggregate of iS . We can get depth information of nodes in DAG
based on the method of depth search. After getting depth information, we arrange child services on
the same resource, according depth value. Then child services on the same resource will avoid
deadlock.
We will secondly arrange the child services arranged before. And the principle is father node
first and short service first [2-4]
.
For child services, which have different depth value on the same resource, the validity of the
logic between child services can be assured by arranging child services according depth value.
Meanwhile, child services, which have same depth value, can be implemented at the same time.
For child services, which can be implemented at the same time on same resource, the child
service will be first implemented that has child nodes. If there are two child services, which have
child nodes or have no child nodes, the short services will be first implemented.
For the sake of keeping colony variety and avoiding constringency prematurely, multi-colony
parallel genetic algorithm is adopted [4-6]
.
1) Initialization. There are ( 2)p p ≥ colonies, which has q chromosomes;
2) The ( 2)p p ≥ colonies carry through genetic operation;
3) When the genetic number can be divided by w (w is supposed according fact), we choose
the individuals, which have the maximal fitness in each colony. And we arrange these individuals
from the biggest one (1y ) to the least one( 2y ) according fitness;
Advanced Materials Research Vols. 271-273 553
4) We use1y replace the individual, which has the least fitness in the colony that includes 2y ;
5) Circulate till satisfying end condition.
Fitness Computing. According one-dimensional integer encoding and arrange rule, we
decode each chromosome. We will compute the whole time cost by each resource to implement all
child services on it. And the fitness is the reciprocal of the most time cost.
Suppose [ ][ ]i jfin is the time that iS is implemented on jR , then
ij[ ][ ]= [ ][ ]i j i jfin start t+ (3)
[ ][ ]i jstart is the time that iS is start implemented on jR . ijt is the time need to implement iS
on jR .
[ ][ ] ( )( )( ) [ ][ ]{ }jmTriparentfinsrejistart +−= ,max (4)
sre − is the latest leisure time on jR ; max( ( ( )))fin parent i is the time that all father nodes of
iShave been implemented; [ ][ ]m jTr is the communication delay between
jR and
mR , which
implements the last father node ofiS .
We defines ( )f x to be the fitness of chromosome x , then
)])}][[))(((,(max{/1
)]][[(/1])][[(/1)(
max
maxmax
1
11
ij
Mi
ij
MiMi
tjmTriparentfinsparere
tjistartjifinxf
++−=
+==
≤≤
≤≤≤≤
(5)
Genetic Operator. In the genetic algorithm, selection operator can maintain the stability of
colony. We select the chromosome, which has largest colony fitness, directly copied to the next
generation. Then the remaining chromosomes using roulette wheel selection operation model.
We suppose ∑ if to be the sum of fitness value of the remaining chromosomes in the colony,
and suppose fi to be the fitness value of the ith chromosome, of which the probability to be selected
is∑ i
i
ff .
In the genetic algorithm, crossover is the most important search operator. Firstly, each colony
takes genetic operation alone till the scheduled number of reproduction. Then we choose the
individuals, which have the maximal fitness in each colony. And we arrange these individuals from
the biggest one (1y ) to the least one( 2y ) according fitness. We use
1y replace the individual, which
has the least fitness in the colony that includes2y . Then circulate.
The algorithm uses a single point crossover operator. After crossover operator, variation will be
carried through according variation probability that 0.01MP = .
554 Advanced Materials and Information Technology Processing
The scheduling process of the improved genetic algorithm. We have designed cloud
computing resource scheduling process based on improved genetic algorithm (as in figure 2).
step 1 Creating DAG according logic relationship between child services;
step 2 According DAG, arranging based on that father node first and short service first;
step 3 Colony initialization. There are ( 2)p p ≥ colonies, which has q chromosomes.
step 4 Ascertain the operating parameters, as maximum number of iteration(N), crossover
probability(Pc) and variation probability(Pm).
step 5 Computing fitness; Carry through genetic operation side by side till the number of
genetic operation is w, then go to step 6;
step 6 If it is the optimization condition, go to step 8, otherwise, go to step 7;
step 7 We choose the individuals, which have the maximal fitness in each colony. And we
arrange these individuals from the biggest one (1y ) to the least one( 2y ) according
fitness, and use1y replace the individual, which has the least fitness in the colony that
includes 2y . Then go to step 5;
step 8 Select the individual that has the maximum fitness;
step 9 Get scheduling result.
step 10
Arrange
child
services
Colony
initialization
according to
real number
coding
Get
scheduling
result
no
yes
no
Each
colony
carries
through
genetic
operation
Individual
replace
Create
the
DAG of
child
services
yes Export
optimal
individual
If is the
number
of genetic
operation
w?
If is it the
scheduled
condition?
Figure 2 Cloud computing resource scheduling process based on improved genetic algorithm
Experiment based on cloudsim
Cloudsim. Cloudsim[7] is a cloud simulator that is developed and is published by Rajkumar
Buyya. It is used for cloud computing infrastructure and application services to modeling,
simulation and experimental. It also provides a resource scheduling and allocation strategy
simulation platform. We verify the given resource scheduling genetic algorithm through testing
different scheduling results of different scheduling strategies by the core module Datacenterbroke in
cloudsim.
An example is as figure3 and figure 4.
Advanced Materials Research Vols. 271-273 555
Figure 3 Schematic diagram of experimental operation
Figure 4 Schematic diagram of experimental running results
Simulation results and analysis. In order to validate the algorithm, we have compared the
improved algorithm and the basic algorithm. The numbers of cloud tasks are 10, 20, 30, 40 and 50.
The numbers of resources are 3, 5 and 8. There are 5 colonies. And each colony includes 30
chromosomes. The crossover is 0.8 while the mutation probability is 0.01. The most number of
genetic operation views is 300. The result is as table 1.
556 Advanced Materials and Information Technology Processing
Table 1 Comparison of the execution time for several scheduling algorithms
Task amount Virtual resource amount Min- min (ms) Max-min (ms) Basic GA (ms) Improved GA (ms)
10
3 137 143 146 148
5 87 87 93 91
8 53 49 56 55
20
3 281 283 293 293
5 153 148 152 146
8 105 94 102 109
30
3 431 431 420 413
5 318 302 292 285
8 172 165 163 157
40
3 587 593 564 547
5 359 342 324 309
8 236 215 196 192
50
3 738 738 697 672
5 435 429 408 381
8 297 271 254 263
When the number of virtual resources and cloud tasks is small, the efficiency of GA, Min-min and
Max-min is equivalent. When the number of virtual resources and tasks increase, the efficiency of
GA is better than Min-min and Max-min. And the improved GA is better than the basic GA.
Summary
For the problem of cloud computing scheduling, we have improved GA. Through simulation based
cloudsim, the better efficiency of improved GA is proved.
Reference
[1] Cui yun-fei, Wang shuai, Li yi. Cloud Computing Resource Management Research Based on
Multi-level Hierarchical Control Structure [J]. Journal of the Academy of Equipment
Command & Technology. 2010,21(2):117-122.
[2] Zeng xian-zhao. New methods to optimize the military [M]. Military Science Press, 2005.
[3] Lin jian-ning, Wu hu-zhong. Scheduling in Grid Computing Environment Based on Genetic
Algorithm [J]. Journal of Computer Research and Development, 2004, 41(12): 2195-2199.
[4] Zhu chang-wu, Dai shang-ping, Liu zhi. Parallel Genetic Algorithm Applied to Multi-tasks
Schedule [J]. Control&Management, 2007, 23(6):200-201.
[5] Wang xiao-liang, Li qiang. Application and Research on Parallel Genetic Algorithm [J].
Control&Managemen, 2007, 23(9):205-206.
[6] Xiao guo-qiang, Wang li-ping, Peng bin. Research of Genetic Algorithm and its Parallelism [J].
Microprocessors, 2007, 28(5):69-73.
[7] Calheiros R N, Ranjan R, Cesar A. F, Buyya R. CloudSim: a novel framework for modeling
and simulation of cloud computing infrastructures and services[R]. GRIDS Technical Report,
2009.
Advanced Materials Research Vols. 271-273 557
Advanced Materials and Information Technology Processing 10.4028/www.scientific.net/AMR.271-273 Cloud Computing Resource Scheduling Method Research Based on Improved Genetic Algorithm 10.4028/www.scientific.net/AMR.271-273.552