Pso PPT F
Pso PPT F
Balancing
in Cloud Environment
• Genetic Algorithm was proposed by Holand , who was inspired from the biological
evolution in 1975. GA is based on the biological concept of population generation. PSO is
simpler and has a more effective memory capability than GA.
• PSO is more efficient in maintaining the diversity of the swarm, since all the particles use
the information related to the most successful particle in order to improve themselves.
• In Genetic algorithm, the worse solutions are discarded and only the new ones are
saved.
• Rana et al., had compared the optimization algorithms for resource scheduling in the
clouds, the most growing and used algorithms are: ABC, ACO,PSO, and GA, because of
the fact that they are easier to implement and because of their performance in finding a
solution.
• Wen et al. have combined ACO with PSO so that the algorithm should
not give early incomplete result into local optimal solution .
• Mathiyalagan et al. proposed a hybrid technique using ACO and IWD
algorithm, a recent population-based metaheuristic to upgrade
performance in terms of execution speed and quality of solution.
• Raju et al. combined ACO with Cuckoo Search to get the advantages
of both the algorithms.
• Min-min is a popular heuristic based scheduling algorithm that
assigns tasks to resources that executes them in the fastest possible
time.
PARTICLE SWARM OPTIMIZATION MODEL
Introduction
o Problem Formulation:
• The application is represented as a Directed Acyclic Graph (DAG).
• For each node in the DAG, a weight is assigned.
• A Directed Acyclic Graph (DAG) is represented by G= (V, E).
• The ‘average’ computation time of a task Tk on a compute resource for a certain size
of input is considered known.
• The cost of unit data access from a resource i to a resource j is also considered as
known .
• These costs are non-negative, symmetric, and satisfy the triangle inequality.
• The problem can be stated as: “Finding a task-resource mapping instance M, such that
estimating the total cost and the total time for each compute resource , the highest
cost and also highest time among all the compute resources is minimized and load
balance is achieved.”.
T1
f12 f14
f13
T2 T3 T4
f35
f25 f45
T5
f5.out
• Overall, in the particle swarm model, the particle searches the solutions in the problem space
• In order to keep the particles from flying out of the problem space, each component of must be kept within range.
Encoding Mechanism
• The first step of applying PSO to scheduling problem in the cloud is to encode the
problem.
• In the PSO-based job scheduling scenario presented here, the dimension of the
particles is the number of jobs that need to be allocated and each position of a
particle indicates a mapping between the virtual machines and submitted jobs.
• In particular, each particle is encoded as a vector of integers and the vector length
is set to (number of jobs). In addition, each element in particle delegates a job.
• This element is an integer value between 1 and (number of VMs), which
represents the number of a computing resource (VM index).
• Moreover, the real values (if any) in the particles’ positions resulting from
updating particles velocities and positions are rounded off to the nearest integer.
Fitness Evaluation
• The objective of this study is to minimize the makespan encountered by the job
scheduling, subject to the resource constraints.
• As mentioned before, each particle corresponds to a candidate solution of the
underlying problem.
• In other words, each particle represents a mapping of VM to a job.
• The evaluation of each particle is performed by a fitness function, which allows the
comparison of the efficiency of one schedule to another, based on the objective,
makespan.
• Thus, the fitness value of each schedule solution can be estimated using the time
minimization equation.
• The particle with minimum fitness value is considered as the best solution among
the others.
Algorithm 1 Scheduling Heuristics
1. Calculate average computation cost of all tasks to all resources
2. Calculate average access cost (communication cost/ data size)
3. Compute PSO algorithm
4. For all ready tasks do
5. Assign tasks to resources according to PSO
6. If resource(processor) exceed limit determined for number of tasks
7. Map task to next resource with minimum cost
8. End if
9. End for
10. Update ready tasks list
11. Update communication cost between resources according to current network load
12. Compute PSO
13. Until there are unscheduled tasks
Algorithm 2 PSO Algorithm
1. Set particle dimension as equal to the size of ready tasksin {ti} # T
2. Initialize particles position randomly from PC =1, ..., j and velocity vi randomly.
3. For each particle, calculate its fitness value with respect to Time Minimization
equation presented .
4. If the fitness value is better than the previous best pbest,set the current fitness
value as the new pbest.
5. After Steps 3 and 4 for all particles, select the best particle as gbest.
6. For all particles, calculate velocity and update their positions using the
equations.
7. If the stopping criteria or maximum iteration is not satisfied, repeat from
Step3.
Setting parameters w,c1,c2
Randomly generated
particles x (tasks)
YES
Update
Pbest = x
velocity
NO
Fitness pbest <
gbest
YES
Gbest=pbest
Untill max iteration reached
Cloudlet VM VM Cloud
Scheduler Scheduler Allocation DC Broker Information
Service
Cloudlet
VM Host Datacenter
BLOCK DIAGRAM 1
Experimental set up:
• The Proposed model is simulated using CloudSim 3.0.3.
• It can run on Linux or windows system.
• CloudSim provides the necessary classes that are needed for scheduling
and provisioning.
• Different parameters such as datacenters, cloudlets, VMs are used in
the Experiment.
• The performance analysis of the proposed model is discussed.
• The experiment setup and the result as Screenshots are presented.
Some heuristic algorithms are implemented such as FCFS, RR .
• PSO is better to both FCFS and Round Robin algorithm.
Results
• Experiment 1
• Experiment 2
• Experiment 3
• Visualization result window with cloud Analyst
Userbase hourly average Userbase hourly average
response time (RR) response time (PSO)
VM Allocation and DC Loading
Summary
o In the proposed methodology the Scheduling and load balancing algorithm is better
compared to other heuristic and meta heuristic approaches.
o As its simple to implement and it does not have complex computation, has few
parameters to adjust.
o Ability to perform parallelly with faster convergence with no overlapping, mutation.
o Efficient with short computational time.
o Additionally, it also balanced the load on compute resources.
o Despite it has certain drawbacks such as can converge prematurely and get trapped with
complex problems.
o In Future Pre-emptive Virtual Machine scheduler can be designed and PSO based
heuristic and its hybrid model can be integrated with workflows of different
applications.
References
• Rajwinder Kaur, and Pawan Luthra, "Load Balancing in cloud computing ", Association of Computer
electronics and electrical engineer, 2014
• Chaczko,zenon and Mahadevan, Vanktesh and AslanZadeh,Sharzad and Mcdermid,christoper,
"Availability and load balancing in cloud computing ", International conference onncomputer and
software modeling,singapore
• http://www.swarmintelligence.org/tutorials.php
• Jigna Acharya and Chirag patel, "Artificial Bee colony-based load balancing in cloud computing ",
National conference In-novative and Emerging Technologies, June 2016.
• J. Kennedy and R. Eberhart, "Particle Swarm Optimization in IEEE conference on Neural Networks",
1995.
• R.N.calheiros , R.Ranjan, A.Beloglazov, C.A.De Rose and R.Buyya, " CloudSim: toolkit for modeling and
simulation of cloud computing environments and evaluation of resource provisioning algorithms"
• Jigan Acharya and Chirag Patel "A Review on Load balancing Technique in cloud
computing,"International Journal of Engineering development and research, december 2015
Thankyou!