resource allocation in industrial cloud computing using ... · resource allocation in industrial...
TRANSCRIPT
Resource Allocation in Industrial Cloud
Computing Using Artificial Intelligence
Algorithms
Sharmin Sultana SHEULY, Sudhangathan BANKARUSAMY,
Shahina BEGUM, Moris BEHNAM
Mälardalen University, Västerås, Sweden
Abstract. Cloud computing has recently drawn much attention due to the benefits
that it can provide in terms of high performance and parallel computing. However,
many industrial applications require certain quality of services that need efficient resource management of the cloud infrastructure to be suitable for industrial
applications. In this paper, we focus mainly on the services, usually executed
within virtual machines, allocation problem in the cloud network. To meet the quality of service requirements we investigate different algorithms that can
achieve load balancing which may require migrating virtual machines from one
node/server to another during runtime and considering both CPU and communication resources. Three different allocation algorithms based on Genetic
Algorithm (GA), Particle Swarm Optimization (PSO) and Best-fit heuristic
algorithm are applied in this paper. We evaluate the three algorithms in terms of
cost/objective function and calculation time. In addition, we explore how tuning
different parameters (including population size, probability of mutation and
probability of crossover) can affect the cost/objective function in GA. Depending on the evaluation, it is concluded that algorithm performance is dependent on the
circumstances i.e. available resource, number of VMs etc.
Keywords. Genetic Algorithm, Particle Swarm Optimization, Cloud computing, Load Balancing
1. Introduction
Cloud computing provides high-performance computing power by sharing computing
resources. It provides an infrastructure, platform, and software as services [1].
Consumers use these services in a pay-as-you-go model. Unfortunately, data centers
hosting Cloud applications cannot use their processing capacity properly. In [6, 2], a
survey has been conducted with 6 datacenters shows that they have been utilizing their
10-30% of the available processing capacity. A typical project requires about 500 local
workstations. However, it shows that this task (a typical project) can be handled by
only one single data center [3] [5]. Today, researches have been conducted to
investigate effective methods to maximize CPU utilization in cloud computing. The
term ‘Green Cloud computing’ has been established to focus on the efficient processing
and utilization of a computing infrastructure. The need of Green Cloud networks that
can maximize usage of available processing capacity is growing. Therefore, computing
applications and data are growing so quickly that larger servers and disks are needed to
process them. Load balancing is an efficient way of using all the resources. It helps in
effective resource distribution and as a result, response time of tasks can be minimized
[17]. In addition, load balancing improves the speed of the processes running in the
data center and increases the productivity.
The rest of the paper is organized as follows: section 2 presents the related
work, section 3 explains the methods and algorithms. The Result and evaluation are
provided in section 4 and section 5, presents the summary and conclusion.
2. Related Work
Different artificial intelligence algorithms have been implemented in various studies
across the cloud computing domain. A study in [4] has shown that a customer
satisfaction aware algorithm using Ant-Colony Optimization (ACO) provides effective
ways in its objective. The ACO maximizes service providers’ profit by allocating the
resource to correct data center and spawning correct number of VMs.
Grouping genetic algorithm is used in a study to optimize energy consumption in
both system level and component level [7] [9] [13]. In [8], the authors have proposed
an algorithm based on Particle Swarm Optimization algorithm, which adjusts the price
based on better resource allocations. A cloud-computing example of GA used in [10],
here the authors have applied NSGA-II (Non-dominated Sorting Genetic Algorithm)
algorithm to solve a variety of cloud computing evolved problems. VM allocation is a
multi-objective problem. It takes immense processing power and time for GA to arrive
at Pareto optimal solutions. NSGA-II has been built as a solution to the time consumed
by the regular genetic approach.
In [12] a PSO based algorithm is proposed in cloud computing domain to model
the parameters and allocate the VM requests on the server that is most optimal. The
authors have looked at the wastage perspective of resources in the servers. In this work,
the study is separated into three strategies, first-fit, best fit and worst fit. A combination
study has been done in [14], involving GA’s output as the initial pheromone for Ant
Colony Optimization (ACO) algorithm. The timeliness of the ACO algorithm depends
on this initial pheromone. This study takes advantage of the global search ability of the
Genetic Algorithm and arrives at the initial guess. The authors compare the results in
terms of time consumption of ACO-GA with that of the ACO and GA and prove that
the combination works good.
Yet another similar combination study has been done in [15]. Here the authors
have tested the performance of Ant Colony Optimization and Artificial Bee Colony
(ABC) algorithm. CloudSim environment is used to test the combined performance of
these two algorithms. This work uses the basic ideas of ACO and ABC algorithms.
The authors in [16] have developed an improved model of the Differential Algorithm,
which they call it CLOUD MODEL-BASED DIFFERENTIAL EVOLUTION
ALGORITHM (CMDE). This new model uses the pheromone and sensitivity of the
free search algorithm and implemented the Opposition-Based learning too. In DE
algorithm, the parameter setting is the main factor that influences its performance. To
improve the reliability of the DE algorithm, a new cross over operation strategy is
established in this paper. Due to DE’s stochastic nature, it exhibits premature and very
slow convergence rates.
3. Methods
3.1. Problem formulation
The problem can be formulated as; n VMs want to be assigned/migrated to m
available candidate physical hosts (each has p cores) in a balanced way. ‘Balanced way’
means, the load in one VM will be as much as same as other ones. A 2n dimensional
vector is utilized to represent the solution of the proposed problem. Every odd indexed
element in the vector is index of core of the preceding host. The problem can be stated
as follows. Search out placement selections to maximize balancing by minimizing
objective function values while fulfilling the resource requirements of every VM.
Therefore, the constraint to the solution of this problem is resource requirements of
every VM should be fulfilled. Two variables y1 and y2 indicating resource fulfillment
is defined as follows.
1
1
, 0,1,2......n
i
i
y i n
(1)
2
0
, 0,1,2....n
i
i
y i n
(2)
Where,
1, , 0,1,2...... , 0,1,2....
0, , 0,1,2..... , 0,1,2.......
i j
i
i j
ifBWrVM BWahost i n j n
ifBWrVM BWahost i n j n
(3)
1, , 0,1...
0, , 0,1... , 0,1...
i jk
i
i jk
ifCPUrVM CPUahost i n
ifCPUrVM CPUahost j m k p
(4)
In Eq. (3) ′𝐵𝑊𝑟𝑉𝑀𝑖′ means bandwidth required in ith VM and ′𝐵𝑊𝑎 ℎ𝑜𝑠𝑡𝑗 ′ means
bandwidth available in ‘j’ th host. In Eq. (4) ′𝐶𝑃𝑈𝑟𝑉𝑀𝑖 ′ means, CPU capacity
required in ith VM and ′𝐶𝑃𝑈𝑎 ℎ𝑜𝑠𝑡𝑗𝑘′ means CPU capacity available in ‘j’ th hosts ‘k’
th core.
1y n (5)
1y n (6)
Eq. (5) and (6) describes the constraints to the solutions. The absolute value of 𝑦1
and 𝑦2 will be equal to n (number of VMs), if resource requirement of all the VMs are
fulfilled. Objective function is defined as follows
max min max mincpu cpu BW BWobj (7)
In Eq. (7) ‘obj’ stands for objective function. ′𝑚𝑎𝑥𝐶𝑃𝑈′ and ′𝑚𝑖𝑛𝐶𝑃𝑈′ are the
maximum and minimum of remaining CPU capacity in the hosts after assigning the
VMs. ′𝑚𝑎𝑥𝐵𝑊′ and ′𝑚𝑖𝑛𝐵𝑊′ are the maximum and minimum of the remaining BW
capacity in the hosts after assigning the VMs. Our goal is to minimize the value of
objective function ‘obj’ in equation (7) without violating the constraints described in
equations (5) and (6) using genetic algorithm.
3.2. Genetic algorithm
The defined problem is executed in each generation of GA for each individual
(solution). Depending on the value of objective function and constraints obtained from
the problem, best individuals are chosen. Depending on the crossover and mutation
probability, some of the chosen individuals go under the process of crossover and
mutation. These individuals create a new population. After iterating the process in all
the generations, all the obtained feasible solutions will be shown in the output.
3.3. Best fit heuristic algorithm
In this work, best fit heuristic for bin packing is used. The host machines are sorted
according to their available BW capacity in descending order. After which the cores
inside these hosts are arranged in descending order. The resources required by the VMs
are considered as objects and sorted in descending order depending on required BW.
Now the objects will be placed in the bins following first come first serve. First object
will go to first bin, second to second and so on. Once the BW bins are selected, the
objects indicating CPU resource are also allocated in the same way to the core bins.
3.4. Particle Swarm Optimization
In this project, the virtual machine as such is a whole entity and needs to be placed in
one server, and that it cannot be split apart, and be placed in multiple machines as will
be the output of such continuous functions. Now that we need a discrete model, it
should be noted that there would be an imbalance in the allocated virtual machines over
the range of servers. The modified equations are [11] [12] [55]:
1
2 1 3( ( ) ) ( ( ) )t t t t
i i i best i gbest iV PV P X t X P X t X (8)
1 1t t t
i i iX X V (9)
Where, i stands for server number, P1, P2 and P3 are inertia weight co-efficients. ⊕
represents velocity update of particles, ⊖ represents subtraction of two different VM
placement solutions, ⊗ represents particle positions update, and Particle position Xt
represents an n- bit vector.
4. Result and Evaluation
The implemented Genetic Algorithm1, Best fit heuristic Algorithm and Particle swarm
optimization Algorithm are evaluated in 17 test cases. The values of CPU and
Bandwidth resources are generated using C language built in function rand(). No
solution is depicted by ‘-10’. In addition to these, GA parameters are also tuned. Along
with these 3 algorithms, outcome calculated by human (authors) is also given. The
objective function values resulted from these algorithms and time taken (average value
for each population size) to calculate objective function values are compared. The 17
test cases can be divided into 3 categories, which are given below (section 4.1, 4.2 and
4.3). In these 17 same test cases, GA parameters (population size, probability of
mutation, probability of crossover) are tuned and result is discussed in section 4.4.
4.1. Increasing number of VM with constant number of host
In figure 1, objective function values (a) and time (b) resulted from AI algorithms
for first 7 test cases are plotted. These cases have constant number of hosts (2 hosts and
2 cores/host). The hosts’ available CPU capacity and Bandwidth are very high (80%-
100%). The VMs’ required CPU capacity and Bandwidth are very low (random
percentages between 1-20%). As it can be seen, (figure 1), objective function values
obtained from GA are most of the time smaller than heuristic and human calculated
values. However, in some case greater than PSO. Now consider figure 1b, as it can be
observed GA takes higher (almost 20 times) amount of time than heuristic and PSO in
all cases.
(a) (b)
Figure 1. Comparison of objective function values (a) and time (b) resulted from AI algorithms
1 http://www.iitk.ac.in/kangal/codes.shtml
4.2. Decreasing number of hosts with constant number of VMs
In the test cases 8 to 12, the virtual machine number is fixed (50) while the host
number is decreased from 10 to 6. The values of hosts’ available CPU and Bandwidth
resources are between 1 and 100. VMs’ required CPU and Bandwidth resources are
between 1 and 10. In figure 2, a comparison of objective function values and
calculation time obtained from AI algorithms (in the test cases 8 to 12) is presented. No
solution is depicted by ‘-10’. As it can be observed, GA and PSO gives solution in 4
out of 5 cases while heuristic does not give any solution. The reason of heuristic’s
failure is low resource.
Heuristic loops only once to find possible solution but GA loops many times. These
many iterations increase the probability of finding a solution. If a comparison of
objective function values and calculation time (obtained from GA and PSO) is made
than, it will be observed that PSO performs better than GA.
(a) (b)
Figure 2. Comparison of objective function values (a) and time (b) resulted from AI algorithms
4.3. Changing percentage of available resource
In test cases 13 to 17 the number of virtual machines and hosts, required resource
by VM were kept fixed (1-10%) while percentage of available resource were
decreased from 90-100% to 50-40% ( figure 3).
(a) (b)
Figure 3. Comparison of objective function values (a) and time (b) resulted from AI algorithms
The number of VM is 100, number of host is 10, and number of cores/host is 2. In
figure 3, No solution is depicted by ‘-10’. As it can be observed, both GA and PSO do
not give a good solution while heuristic is very efficient in these cases (figure 3a and
figure 3b).
The reason of GA’s failure is increased number of VMs, which made the
constraints complex. In the case of PSO, as stated earlier the success depends on how
well the particles are initialized. The higher time consumption, can be attributed to the
first fit strategy that takes longer time to place the VMs in the given servers, this has to
be done as many times as the particles.
4.4. Effect of tuning parameters in GA
In the test cases usually three values (0, 0.5, 1) of probability of mutation, three values
of probability of crossover (0, 0.6, 1) and four values (4, 40, 80, 400) of population size
is used. In complex constraints, sometimes population size is increased to 2000 to get a
solution.
From figure 4 (a), it can be observed that when probability of mutation is 1, GA gives a
solution otherwise not. It does not mean 1 will always give a good result (observed
from other data).
(a) (b)
(c)
Figure 4: Comparison of objective function values (tuning GA parameters)
In figure 4 (b), it can be observed that with increase in probability of crossover
objective function value increases. However, this is not always true (observed from
other data). In figure 4 (c) it can be observed that with increase in population size
objective function value decreases. However, with increase in population size
calculation time increases. Therefore, if good balancing is required than appropriate
population size, probability of crossover and mutation should be used.
5. Summary and Conclusion
The main objective of this project was to balance the load in cloud environment by
migrating Virtual machines (VMs) during runtime (as resource requirements can be
changing during runtime). This balancing will make the processes faster in the cloud
environment. The considered resources are CPU utilization and communication
bandwidth. The resource manager, which is responsible of migrating VMs, is
implemented using Genetic Algorithm (GA), particle swarm optimization (PSO) and
best-fit heuristic algorithm.
The algorithms were tested in different situations. In implementing GA and PSO an
iterative approach has been applied to find a better solution of a problem. The
evaluation shows when the resource is low and cloud network is small, GA and PSO
algorithms outperforms the best fit heuristic algorithm. On the other hand, when
available resource is enough compared to require resource and cloud network is large,
best-fit heuristic performs better than the GA and PSO algorithms due to the complex
constraint. Therefore, it can be concluded that performance of an algorithm is situation
(i.e. number of VM, number of host, amount of available resource etc.) dependent. In
future, a hybrid approach combining GA and improved heuristic algorithm could be
applied to overcome the problem and to find a solution that works in all situations.
Acknowledgement
This work is supported by the Swedish Knowledge Foundation (KKStiftelsen), via the
research programs RV-RED and research project SafeDriver.
References
[1] Hassan Rajaei and Jeffrey Wappelhorst. 2011. Clouds & grids: a network and simulation perspective.
In Proceedings of the 14th Communications and Networking Symposium (CNS '11). Society for
Computer Simulation International, San Diego, CA, USA, 143-150.A.N. Author, Article title, Journal Title 66 (1993), 856–890.
[2] Alves Ferreira, A.V.; Albanez Bastos Filho, C.J., "Cloud services," Cloud Computing and
Communications ( LatinCloud ), 2nd IEEE Latin American Conference on , vol., no., pp.59,64, 9-10 Dec. 2013
[3] Power of the Cloud, Katzel, Jeanine. Control Engineering (Dec 2011)
[4] Chao Jing; Yanmin Zhu; Minglu Li, "Customer Satisfaction-Aware Scheduling for Utility
Maximization on Geo-distributed Cloud Data Centers," High Performance Computing and
Communications & 2013 IEEE International Conference on Embedded and Ubiquitous Computing
(HPCC_EUC), 2013 IEEE 10th International Conference on, vol., no., pp.218,225, 13-15 Nov. 2013 [5] Beloglazov A, Abawjy J, Buyya R. Energy-aware resource allocation heuristics for efficient
management of data centers for Cloud computing. Futur generation computer systems [serial online]
May 1, 2012; 28: 755-768.Available from: ScienceDirect, Ipswich, MA. Accessed May 1, 2015. [6] J. Kaplan, W. Forrest, N. Kindler, Revolutionizing Data Center Energy Efficiency, McKinsey &
Company, Tech. Rep
[7] Hai Zhu; Xiaoli Wang; Hongfeng Wang, "A New Model for Energy Consumption Optimization under Cloud Computing and its Genetic Algorithm," Computational Intelligence and Security (CIS), 2014
Tenth International Conference on, vol., no., pp.7,11, 15-16 Nov. 2014
[8] Fu Xie; Yunyun Du; Hongwei Tian, "A Resource Allocation Strategy Based on Particle Swarm Algorithm in Cloud Computing Environment," Digital Manufacturing and Automation (ICDMA), 2013
Fourth International Conference on, vol., no., pp.69,72, 29-30 June 2013
[9] KOZA, JR. Genetic Programming: On the Programming of Computers by Means of Natural Selection. Cambridge, Mass : MIT Press, 1992. (Complex adaptive systems). ISBN: 9780262111706
[10] Joseph, C.T.; Chandrasekaran, K.; Cyriac, R., "Improving the efficiency of genetic algorithm approach
to virtual machine allocation," Computer and Communication Technology (ICCCT), 2014 International Conference on, vol., no., pp.111,116, 26-28 Sept. 2014
[11] J. Kennedy and R. Eberhart, “ Particle Swarm Optimization,” Proceedings of IEEE International
Conference on Neural Networks, Vol. IV, pp. 1942-1948, Perth, Australia, 1995 [12] Kumar, Dinesh; Raza, Zahid, "A PSO Based VM Resource Scheduling Model for Cloud Computing,"
Computational Intelligence & Communication Technology (CICT), 2015 IEEE International
Conference on, vol., no., pp.213,219, 13-14 Feb. 2015 [13] Srinivas, M.; Patnaik, L.M., "Genetic algorithms: a survey," Computer, vol.27, no.6, pp.17, 26, June
1994
[14] Chun-Yan Liu; Cheng-Ming Zou; Pei Wu, "A Task Scheduling Algorithm Based on Genetic Algorithm and Ant Colony Optimization in Cloud Computing," Distributed Computing and Applications to
Business, Engineering and Science (DCABES), 2014 13th International Symposium on, vol., no., pp.68,72, 24-27 Nov. 2014
[15] Madivi, Rakesh; Kamath, S Sowmya, "An hybrid bio-inspired task scheduling algorithm in cloud
environment," Computing, Communication and Networking Technologies (ICCCNT), 2014 International Conference on, vol., no., pp.1,7, 11-13 July 2014
[16] Changming Zhu; Jun Ni, "Cloud Model-Based Differential Evolution Algorithm for Optimization
Problems," Internet Computing for Science and Engineering (ICICSE), 2012 Sixth International Conference on, vol., no., pp.55,59, 21-23 April 2012
[17] Zeng Ying; Jiang Kang-ming; Chen Yuan-yuan; Tang Liang-rui, "A novel load balancing algorithm
based on binary particle swarm optimization for heterogeneous integrated networks," Natural
Computation (ICNC), 2013 Ninth International Conference on , vol., no., pp.476,480, 23-25 July 2013
[18] Shangguang Wang; Zhipiao Liu; Zibin Zheng; Qibo Sun; Fangchun Yang, "Particle Swarm
Optimization for Energy-Aware Virtual Machine Placement Optimization in Virtualized Data Centers," Parallel and Distributed Systems (ICPADS), 2013 International Conference on , vol., no., pp.102,109,
15-18 Dec. 2013