Download as pdf or txt
Download as pdf or txt
You are on page 1of 4

PERFORMANCE EVALUATION OF LOAD BALANCING

ALGORITHMS IN A DISTRIBUTED COMPUTING SYSTEM BY


MONTE CARLO SIMULATION
Dr. Ramanand Jha, Department of Physics, Faculty of Science , Arat Kilo, Addis Ababa University, P.O. Box - 34 510 ,
Addis Ababa, ETHIOPIA, Email: ramanand_jha@yahoo.com

Dr. Debasish Ghose, Department of Aerospace Engineering, Indian Institute of Science, Bangalore-560 02, INDIA
Email: dghose@aero.iisc.ernet.in

science. It has both the features theory & experiment and


ABSTRACT it bridges the gap between them. Now, Computer
Simulation is an integral part of contemporary science.
The objective of the work is to describe an experiment of What is simulation? Simulation is the process
stable system consisting of many processors connected of representing (mimicking) the dynamic behavior of a
by a communication network. This experiment requires real system as close as possible by the behavior of
developing of a simulation program for a fairly large another system through some model. The model is
Distributed Computing System where jobs arrive implemented by the use of computation power of
randomly at various computers and demand random computer. The purpose of simulation is usually to make
service time. The performance and efficiency of the experimental measurements or predict behavior, thus
system is measured in terms of response time, wait time, moving the laboratory into the computer environment.
percentage busy period, system response time, and Simulation thus provides a prototype system with which
system wait time. A comparative study of the to answer questions of a “what if?” nature, or to use for
performance of the various scheduling policies has been teaching about the system being stimulated.
examined. Load distribution for improving the overall
performance of a DCS has been extensively discussed in
1. INTRODUCTION the literature and many theoretical models and algorithms
have been proposed [1-11]. It has been shown that
The confluence of low-cost microprocessors and high- performance improvement can be achieved by relocating
speed communication technologies has stimulated jobs in a DCS.
considerable interest in Distributed Computing System Two important components of a load
(DCS). It is characterized by several large and/or small scheduling/sharing policy are the transfer policy, which
computers and workstations, located at geographically determines whether to process a job locally or remotely,
distant points and connected via a communication and the location policy, which determines to which
network backbone. These computers are more or less computer a job selected for transfer should be sent. Load
autonomous in the sense that they have their own local distribution improves performance by transferring jobs
memory and peripherals. Since these computers are from heavily loaded computers, where service is poor, to
autonomous, they process jobs submitted to them locally. lightly loaded computers, where the jobs can take
Quite often some computers in the DCS are overloaded advantage of computing capacity that would otherwise
with jobs while others are free. This is a situation where go unused.
the DCS architecture helps in speeding up the processing Although load balancing does generally assist
of jobs. The overloaded computers in the DCS transfer in performance, if it is poorly incorporated into the
jobs from their own local queues to those computers system it can also lead to deterioration of performance.
which are under loaded. Once those jobs are processed at The chief causes responsible for deterioration in
the under loaded computers, they are sent back to the performance is large algorithm overhead, Job thrashing
computer where they originated. (needless movement of jobs from site to site), subnet
The primary advantages of these systems are delay, and traffic intensity: The system traffic intensity
high performance, availability, and extensibility at low has been shown to strongly influence the performance of
cost. To realize these benefits to its fullest advantage load balancing algorithms [12].
various parameters has to be considered in detail. For
small computer systems, it is possible to obtain fairly 2. THEORY OF QUEUES
representative analytical expressions in closed form for
the overall performance of a DCS. In large DCS system In order to describe any queue-system one must provide
with different arrival and service rates for jobs either the the following:
analytical techniques are very difficult to apply or the 1. Arrival pattern: This covers both the average
result of analytical technique do not yield meaningful rate of arrival of customers and the statistical
results. For such cases one needs to perform extensive pattern of the arrivals. The most appropriate
simulation study. arrival pattern for our system would be a
“Computer Simulation” has started revolution in science completely random arrival pattern. It is
and technology over past three decades. It has become a described by a Poisson
third branch complementary to the basic and applied
exp(− λt )(λt )
r i=n

2. distribution, P (r , t ) = whole is stable (i.e. (λi / µ i ) < n ). The mean


r! i =1
where λ is the mean arrival per unit of time response time and mean wail time increases without limit
(mean inter-arrival time between jobs is for both the unstable processing node under no loading
sharing, and the unstable system.
1 / λ ), r is the number of arrival in a period Conservation Law :For a given arrival and
t , and P(r , t ) is the probability of r arrival service time patterns, a particular weighted sum of
in time period t . It leads to probability of waiting times for all jobs is invariant to the scheduling
algorithm used [13]. This means that scheduling can only
arrival in time period t to be improve the response time of some users at the expense
(
1 − exp − λt . ) of other users.
3. Service mechanism: This covers the issues of
when service is available, how many customers 4. SYSTEM PARAMETERS AND NETWORKS
can be served at a time, and how long each
service takes. Usually this is specified by a The parameters of the system are shown in the Table-
statistical distribution of service-time. A great 1,2,3 and 4. In Table-1 all the nodes are stable and hence
mathematical simplification results if we can the system is also stable. In Table-2 Node-1 is
reasonably represent the cumulative intentionally made unstable to show the effectiveness of
distribution function of service-time by load balancing; the system as a whole is still kept
S (t ) = 1 − exp(− µt )
balanced. Again in Table-3 all the nodes are stable but in
where µ is the Table-4 Node-1 and Node-8 are made unstable while
mean service rate (mean service time is keeping the system stable.
1 / µ ). The queuing system is called stable
Table-1/2
if λ
< µ , critical if λ = µ and unstable if Node Arriva Service Sched Stability
λ>µ. Numb l Rate, Rate, uling of
4. Queue-discipline: This means the method by
er λ µ Period, Node
Job/s Job/s sec
which a customer is selected for service out of
those awaiting service. There are many way of 1 0.50 1.00/0.40 5 Stable/
selecting out of those awaiting services e.g., Unstable
FIFO (First In First Out), LIFO (Last In First 2 0.60 0.80 5 Stable
Out), RS (Random Selection), PS (Priority 3 0.20 0.50 5 Stable
Selection) etc. For our purpose FIFO is more
appropriate. Table-3/4
5. Queuing Statistics: In many stochastic Node Arrival Service Sched Stability
simulations the most commonly used factors to Numb Rate, Rate, uling of
describe queue behavior includes the average er λ µ Period, Node
response time, and average wait time. We Job/s sec
Job/s
define the average response time as a sum of
1 0.50 1.00/0.04 5 Stable/
total amount of time a process spends waiting
for resources and its servicing time and the Unstable
average wait time is defined as a total amount 2 0.60 0.80 5 Stable
of time a process spends waiting for resources. 3 0.20 0.50 5 Stable
4 0.30 0.70 5 Stable
3. SYSTEM MODEL 5 0.40 0.60 5 Stable
6 0.10 0.90 5 Stable
The queuing system is assumed to have queue of infinite 7 0.10 0.70 5 Stable
capacity buffer to store jobs that arrive at the nodes, the 8 0.30 0.90/0.20 5 Stable/
processor at a node is constantly available and busy as Unstable
long as there are jobs in the queue, all jobs remain in the
system of the queues until their service has been The difference between Table-1 and Table-2
completed and the arrival and service pattern both are occurs just at Node-1 where the Service Rate changes
Poisson processes. The imbalance in the load, caused by from 1.00 to 0.40 to make the node unstable. Similarly
the difference in the rates of arrivals and departures at the the difference between Table-3 and Table-4 occur just at
nodes, is the motivation for load balancing. Node-1 and 8 where the Service Rate changes from 1.00
We have considered two systems. The first to 0.40 and 0.90 to 0.02 respectively to make these two
system consists of completely connected network of nodes unstable.
three processors and another system is a hypercube in We have considered two network systems for our
three dimensions. We have investigated three different investigation:
methods of load sharing in these systems. 1) Completely Connected 3 Nodes System: It is a
Advantages of load sharing are best felt when, three nodes system and each node is directly
in the no load sharing case, some of the processors are connected to the remaining nodes.
2) Hypercube: Various cube-type multiprocessor
rendered unstable (i.e. µ i < λi ), but the system as a
topology address the scalability (it refers to the
ability of a given architecture to expand in
order to support a large number of processors) Method_1: Queue length dependent load balancing
and cost issues by providing interconnections strategy where load is transferred to connected nodes to
whose complexity grows logarithmically with balance their queue length disparity. Method_2: Service
the increasing number of nodes. But hypercube rate dependent load balancing strategy where load is
is one of the most common architectures transferred to connected nodes to balance their queue
extensively considered in the literature. Each n
processor in a hypercube has is directly linked length disparity in proportion to µi / µi .
( )
to lg N other nodes in an N-node system, i =1

the maximum distance between any two nodes Method_3: Arrival rate dependent load balancing
( )
is lg N links. Hypercubes provide a good
strategy where load is transferred to connected nodes to
balance their queue length disparity in proportion
basis for scalable systems, since their n
complexity grows logarithmically with the to λi / λi .
number of nodes. We have considered i =1
Hypercube in 3-dimension (containing 8
nodes). 7. DISCUSSION OF RESULTS
5. SYSTEM’S ALGORITHM a) Simulation in a Completely Connected Network
We run the simulation without load balancing with the
The algorithm for the simulation can be summarized in parameters of Table-1 and Table-2 and then again we
the following steps written in near C-language pseudo repeat the same simulation with load balancing.
code. At each node the following algorithm is performed:
The results using method-1are tabulated below.
// Initializations
Processor_Status = Idle ; Queue_Length = Empty ; S Input No Load Resp Wait Percen
Whether_Next_Job_Ready = No N Data de Bal onse Time tage
o. Table ance Time Busy
do Time
{ 1 1 1 I 1.41 0.40 42.87
If (Whether_Next_Job_Ready == No) 2 1 1 A 1.48 0.44 48.12
{ Creat_Next_Job() ;
3 1 2 I 3.52 2.21 64.01
Whether_Next_Job_Ready = Yes ;}
4 1 2 A 2.33 1.05 58.02
If(Whether_Arrival_Of_Next_Next_Job_Matures
== Yes) 5 1 3 I 3.54 1.40 42.21
{Add_To_Queue() ; 6 1 3 A 2.90 0.78 41.30
Whether_Next_Job_Ready = No} 7 1 Sys I 2.72 1.37
If( Processor_Status == Idle ) tem
{ 8 1 Sys A 2.01 0.68
If (Queue_Length == Empty) Do nothing tem
Else 9 2 1 I Keeps Keeps 100
Select_From_Queue_For_Processing() Increa Increa
} sing sing
Else 1 2 1 A 5.57 2.99 80
{ 0
If(Whether_Servicing_Time_Mature == Yes) Where I and A stands for inactive and active.
{
If(Queue_Length == Empty) The rows1, 2 (which is nothing but the serial
Processor_Status = Idle number written in the left most column) show the results
Else of Method-1 using input data from Table-1 at Node-1,
Select_From_Queue_For_Processing() where the average response (wait) time without load
} balancing stabilizes to about 1.41 (0.40) and with load
} balancing it stabilizes to about 1.48 (0.44) which is
If (Scheduling_Period_Mature == Yes ) slightly more than the values obtained without load
BalanceQueue () ; balancing. Similarly the rows 3, 4 show at Node-2, where
} while (Whether_Simulation_Period_Matures ==No ); the average response (wait) time without load balancing
stabilizes to about 3.52 (2.21) and with load balancing it
6. LOAD BALANCING ALGORITHMS stabilizes at the smaller value of about 2.33 (1.05); and
the rows 5, 6 show at Node-3, where the average
Load balancing algorithms have several variants. The response (wait) time without load balancing stabilizes to
simplest variant sends jobs from sites with two or more about 3.54 (1.40) and with load balancing it stabilizes at
jobs to the site with no job, i.e., idle sites. Another the smaller value of about 2.90 (0.78). Finally the rows 7,
variant sends jobs to sites with less than a fixed number 8 show the average system response (wait) time without
of jobs. Yet another variant removes jobs from sites only load balancing stabilizes to about 2.72 (1.37) and with
if the number of jobs exceeds some threshold number. To load balancing it stabilizes at about 2.01 (0.68).
balance the load, first of all we calculate the average load At individual nodes the performance may
of the connected nodes then try to balance the load in one improve or degrade in terms of response time, wait time,
of the following three ways: and percentage busy time. It depends on whether jobs are
transferred from or to the node. For example, at Node-1 [4] P.E.Krueger, Distributed Scheduling for a Changing
the performance degrades because jobs are transferred to Environment, PhD thesis, University of Winconsin –
the Node-1 from Node-2 and 3. For the same reason Madison, 1988.
performance in Nodes-2 and 3 improves. However, the
overall performance of the DCS improves when load [5] P.E.Krueger, and R.A. Finkel, An Adaptive Load
balancing is done. It is worth mentioning that the load Balancing Algorithm for a Multicomputer, Technical
balancing only improves the response (wait) time of the Report 539, University of Winconsin – Madison, Apr
user at the expense of others (conservation law). 1984.
The rows 9, 10 show the result of Method-1
using input data from Table-2 at unstable Node-1, where [6] Y.A. Wang, and R.J.T. Morris, Load Sharing in
the average response (wait) time never stabilizes and Distributed Systems, IEEE Transactions on Computers,
increases without bound but due to load balancing it C-34(3), pp. 204, Mar 1985.
stabilizes to about 5.57 (2.99) which is a significant
improvement. It should also be noted that the average [7] L.M. Ni, C.W. Xu, and T.B. Gendreau, “A
percentage busy time of a processor at Node-1 remains at Distributed Drafting Algorithm for Load Balancing “,
100% (always busy), but due to load balancing its IEEE Transaction on Software Engineering, SE-11 (10),
average percentage busy time decreases. pp. 1153, Oct 1995.
If one compares the system responses and wait
times of various methods then we find that Method-2 and [8] D. Ghose, and V. Mani “Distributed Computation
3 are better than Method-1. This is quite expected with Communication Delays: Asymptotic Performance
because in Method-1 only the queue length is taken into Analysis”, J. of Parallel and Distributed Computing, Vol.
account irrespective of service duration of the jobs in the 23, pp. 293, 1994
queue or the rate of arrival of local jobs. One can also
seen that methods-2 and 3 give almost identical results. [9] V. Bharadwaj, D. Ghose, and V. Mani, “Optimal
Sequencing and Arrangement in Distributed Single-Level
b) Simulation in a Hypercube Network Networks with Communication Delays”, IEEE Trans.
We run the simulation without load balancing Parallel and Distributed Systems, Vol.-5, pp. 968, 1994
with the parameters of Table-3 and Table-4 and then
again we repeat the same simulation with load balancing. [10] V. Mani, and D. Ghose, “Distributed Computation
The data (but not included here due to lack of space) in Linear Networks: Closed-Form Solution”, IEEE
shows that the average system response and wait time Trans. Aerospace and Electronic Systems, Vol. 30, pp.
improves due to load balancing. 471, 1994

8. CONCLUSION [11] V. Bharadwaj, D. Ghose, and V. Mani, “An


Efficient Load Distribution Strategy for a Distributed
In this work, we have presented the simulation studies on Linear Network of Processors with Communication
the performance of no load sharing and load sharing Delays”, Computers and Math. With Applications, Vol.
networks of processors. We have shown that load sharing 29, pp. 95, 1995
improves performance over no load sharing if the DCS
system is a stable system. The effect of load balancing is [12] M. Livny, and M. Melman, “Load Balancing in
most effective if the system as a whole remains stable but Homogeneous Broadcast Distributed Systems”, Proc.
a few of its nodes are unstable. ACM Computer Network Performance Symposium, pp.
In any DCS, load balancing is done by 47, Apr 1982
averaging of some parameter(s) only within the buddy set
– directly connected neighbor nodes – of a node. In case [13] L. Kleinrock, “A Conservation Law for a Wide
of a completely connected DCS, averaging within buddy Class of Queuing Disciplines”, Naval Research Logistics
set implies averaging over the entire DCS. If the DCS is Quarterly12, pp. 181, Jan 19
not completely connected then the averaging of
parameter(s) in buddy set is very much local and the
effect of load balancing spreads over the entire DCS after
only a few loads balancing. Hence, in due course of time
the effect of load balancing is felt in the entire DCS.

9. REFERENCES

[1] R.K. Arora, and S.P.Rana, “Heuristic Algorithms for


Process Assignment in Distributed Computing Systems”,
11 (4-5), pp. 199, Dec 1980.

[2] Harold H. Stone, and S.H. Bokhari, “Control of


Distributed Processes”, IEEE Computer Magazine,
10(7), pp. 97, Jul 1978.

[3] Y.C. Chow, and W.H.Kohler, “Models for Dynamic


Load Balancing on a Heterogeneous Multiprocessor
System”, C-28(5), pp. 354, May 1979.

You might also like