Load Balancing in CC
Load Balancing in CC
Load Balancing
In
Cloud Computing
Done by
Guide
Vinod Pathari
(Asst. Professor)
Monsoon Semester
Department Of Computer Science And Engineering
National Institute of Technology Calicut
Certificate
Guide Date
Vinod Pathari
(Asst. Professor)
Abstract
1 Introduction 1
1.1 Problem Statement . . . . . . . . . . . . . . . . . . . . . . . . 1
1.2 Report Organization . . . . . . . . . . . . . . . . . . . . . . . 2
2 Literature Survey 3
3 Work Done 6
3.1 Theory . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6
3.1.1 Biased Random Sampling . . . . . . . . . . . . . . . . 6
3.1.2 Honeybee Foraging . . . . . . . . . . . . . . . . . . . . 7
3.1.3 Proposed Hybrid Algorithm . . . . . . . . . . . . . . . 8
3.2 Implementation . . . . . . . . . . . . . . . . . . . . . . . . . . 8
3.2.1 Biased Random Sampling . . . . . . . . . . . . . . . . 9
3.2.2 Honeybee Foraging . . . . . . . . . . . . . . . . . . . . 9
3.2.3 Proposed Hybrid Algorithm . . . . . . . . . . . . . . . 10
3.3 Analysis . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10
3.3.1 Biased Random Sampling . . . . . . . . . . . . . . . . 10
3.3.2 Honeybee Foraging . . . . . . . . . . . . . . . . . . . . 11
3.3.3 Proposed Hybrid Algorithm . . . . . . . . . . . . . . . 12
4 Future Work 14
References 16
i
Chapter 1
Introduction
1
1.2 Report Organization
At the outset, the report contains a brief review on the existing works done
in the field of Cloud computing focussing on the area of load balancing.
A detailed study on two of the popular load balancing algorithms and the
design of a new algorithm which is a combination of the above follows. A
comparative analysis of the implenmentation of these algorithms has been
explained. The report concludes with a plan on the future action to be done
in the following semester.
2
Chapter 2
Literature Survey
Service Models
• Cloud Software as a Service (SaaS): The capability provided to
the consumer is to use the providers applications running on a Cloud
infrastructure.
• Cloud Platform as a Service (PaaS): The capability provided to
the consumer is to deploy onto the Cloud infrastructure consumer-
created or acquired applications created using programming languages
and tools supported by the provider.
• Cloud Infrastructure as a Service (IaaS): The capability provided
to the consumer is to provision processing, storage, networks, and other
fundamental computing resources where the consumer is able to deploy
and run arbitrary software, which can include operating systems and
applications.
Load Balancing is a method to distribute workload across one or more
servers, network interfaces, hard drives, or other computing resources. Load
balancing is used to make sure that none of the existing resources are idle
while others are being utilized. To balance load distribution, migration of
the load from the source nodes (which have surplus workload) to the com-
paratively lightly loaded destination nodes can be done [3].
3
Goals Of Load Balancing
4
harvest it. This approach has been used for various applications in comput-
ing [2].
5
Chapter 3
Work Done
The algorithms that have been considered for the project are stated below :
• Hybrid Algorithm
3.1 Theory
3.1.1 Biased Random Sampling
In this type of approach we need to construct a network comprising of virtual
nodes which represent all the resources present on the server to represent the
total load. The indegree of the node corresponds to the free resources of the
server such that :
6
The working of the algorithm can be understood by the following pseudo
code :
7
The working of the algorithm can be understood by the following pseudo
code :
3.2 Implementation
An array of 100 jobs with random jobsize and execution time and an adja-
cency matrix of a fixed network of servers are given as inputs. The server
network being created by the adjacency matrix forms a directed graph which
allows for easy traversal between the servers.
• Nodequeue: This is a list of all the jobs being executed by the partic-
ular server including the job size, execution time and the time at which
the job was allocated to the server.
8
• NodeArrayList: The list of all the servers in the network and their
accompanying node queue are contained here.
The increaseindegree(), common to all the algorithms, traverses the array
list associated with each job and checks if any job that was being executed
by each server has been completed. This is done by comparing the current
time with the sum of the execution time required for the job and the time
at which it was allocated to the server. On completion of the jobs, the array
list is updated accordingly and the resources available with the server are
incremented.
The timer functions are as follows: jobs are sent every one second and if
the job cannot be allocated presently to any server due to lack of resources
then it waits for two seconds before trying again.
9
of the server network is done whereby for each server we calculate
the difference in the resources currently available and the resources
requested. The job is then allocated to the server for which the dif-
ference is small. The resource available for that server is decremented
accordingly and it finally returns the best fit server.
The set of 100 jobs is executed by the algorithm and its total execution
time is recorded. This process is repeated for 100 times and an average
execution time is obtained for each algorithm.
3.3 Analysis
3.3.1 Biased Random Sampling
In the biased random sampling algorithm, for every batch of hundred jobs,
small changes in the range of seconds were obtained. The change which oc-
curred is because of the delay being caused due to unavailability of resources.
A random node is selected only initially and the walk is taken based on the
10
probabilistic function and hence the walk only goes up to the value of hop-
count (which is the same) for every allocation of job. The time taken for load
balancing of every job varies by seconds because the algorithm looks for a
server with maximum resources available and then tries to allocate the job.
So, overheads are obtained because of finding the path for every job followed
by comparing it; even though only finally the job size is checked.
11
case since the job size does not vary drastically.
12
All the three algorithms show changes only in the range of milliseconds
to seconds for a batch of hundred jobs being run hundred times. While
biased takes 10870 ms, honey bee runs in 10140 ms and hybrid in 17617ms
for a batch of 100 jobs on an average. This clearly shows that the honey
bee algorithm is the best approach of all the algorithms considered. Though
honey bee has a more consistent run time (the inconsistency occurs due to
reaching a deadlock state where no resources are available) as compared to
biased (the inconsistency being caused by the delays due to the checking of
job size only finally), the hybrid algorithm has a highly inconsistent run time
graph because of entering the deadlock state more due to the contradiction
in server selection between the two algorithms.
13
Chapter 4
Future Work
A complete study and implementation of the algorithms has been carried out
over the past three months. In the following semester, the area of load bal-
ancing in Cloud computing will be approached from a whole new perspective
of game theory. The problem, till now, has been addressed by scheduling
one job at a time to the best server and thus following the same strategy
for a group of jobs. The problem can also be viewed as scheduling a group
of jobs to the best servers at one instant of time. This approach has been
taken because it may not be necessary that the best allocation for each job
is the best for the given group of jobs i.e., it is possible to have a collec-
tive best outcome which may be better than a collection of individual best
outcomes. Hence this problem can be looked at from the technique of game
theory which fundamentally states the same.
Job/Server A B C
A 5 2 5
B 9 1 3
C 4 1 8
14
Cloud computing, being a new concept, has a lot of scope for research.
So, one of the ways to tackle load balancing in Cloud computing is through a
game theoretic approach with proper strategies, payoffs and payoff matrices.
In the coming months, the objective will be to study game theory and to use
it to obtain optimal solution for load balancing in Cloud computing.
15
References
[3] Ratan Mishra and Anant Jaiswal; International Journal of Web & Se-
mantic Technology (IJWesT) Vol.3, No.2, April 2012; Ant Colony Op-
timization: A Solution of Load Balancing in Cloud, http://airccse.
org/journal/ijwest/papers/3212ijwest03.pdf
16