A DYNAMIC LOAD BALANCING
METHOD USING WORKSTATION
PRIORITY
RAJKUMAR SHARMA
Computer Centre, Vikram University Ujjain, MP, India
PRIYESH KANUNGO
Patel College of Science & Technology Indore, MP, India
MANOHAR CHANDWANI
Institute of Engg. & Tech., Devi Ahilya University Indore, MP, India
Abstract
Load balancing is the task of distribution of application tasks to different processors in an efficient manner to minimize program execution time. It involves assigning work to each processor proportional to its computing power, hence minimizing the idle time and at the same time overload of work to the processor. In the Network of Workstations (NOWs) based system, heterogeneity exists in processors, memory and networks parameters. In this paper, we introduce a workstation priority mechanism, which allots priority and an assignment factor to each workstation based on its computing power. The basic idea is to use this priority and assignment factor in allocating processors the tasks proportional to their performance. The major advantage of this technique is that all processors finish their tasks almost at same time, so as to minimize the occurrence of rebalancing state. This technique proves to be cost-effective as the communication overheads are substantially reduced.
Keywords: Load Balancing, Assignment Factor, Response Time, Rebalancing, Job Migration.
1. INTRODUCTION
With the advances in high speed network technologies and development of cheap personal computers, Network of Workstations (NOWs) can be used to create high performance computing environment. NOWs have become alternate to expensive dedicated parallel machines. Cost-effectiveness is the major advantage of such systems. However, due to heterogeneity in processors, memory and network parameters [8] [9], NOWs are more complicated to program than dedicated parallel machines. Distribution and scheduling of tasks among the processors are also complex in NOWs. Various studies show that upto 80% of the workstations are idle depending on time of day [3], therefore these are advantageous to use. The idle time and computing power of processors can be used to make the processing cost-effective.
In parallel processing environment, an application is decomposed into a number of tasks to distribute them among processors and then computed outputs of all iterations are gathered to produce final results. In NOWs, if we equally distribute tasks to heterogeneous processors, some high speed processors finish their work earlier than slow speed processors. In this case, the response time is not efficient as some processors are idle and some processors suffer from overload of work [10], as shown in Fig.1. Load balancing plays an important role in minimizing the response time of application. A process is migrated from highly loaded node to a lightly loaded remote node. The communication overhead should be within permissible limits for migration of the load.
algorithms, the assignment of tasks to processors is done at run time. The current load information of processors is used while assigning tasks. However, in this case the overhead of collecting and maintaining of load information is additional [7].
Various algorithms for load balancing have been proposed in the literature. In almost all algorithms, the load monitoring is performed for workstation performance. This information is exchanged between workstations. If load in a system is not balanced, tasks are migrated from one node to another after satisfying the rebalancing criterion. In this paper, we propose a simple but effective workstation priority mechanism, which allots a priority and an assignment factor to each workstation based on its computing power.
The rest of the paper is organized as follows: Section 2 reviews for related work. In first part of Section 3, we informally describe proposed load balancing method. Second part of Section 3 presents formal description of the algorithm. Section 4 provides the experimental results and performance of the proposed method. Finally, the conclusion is given in Section 5.
2. RELATED WORK
In various load balancing algorithms, a load balancer is considered either as centralized or distributed, which defines where the load balancing decisions are to be made. When load information is gathered from all workstations and considered for rebalancing, then it is called a global strategy for load balancing. On the other side if workstations are partitioned in groups and rebalancing is considered only among the member workstations of the group then it is called a local load balancing strategy. Zaki [1] shows experimental results of matrix multiplication using all combination of above strategies, i.e., global centralized, global distributed, local centralized and local distributed. But it is not viable to say which strategy is the most efficient. Dandamundi [3] compares different load sharing strategies on Network of Workstations. Experimental results are shown with and without including background load. Buyya [4] presents a load balancing method for data parallel application based on dynamic data assignment. The method is based on modified manager-worker model. The nodes of the system are divided by Hong [2] into mutually overlapping subsets. A node does not communicate explicitly with all nodes for making a migrating decision, but queries only to member nodes of its subset. The technique involves overhead of maintaining subsets and member lists. By using both static and dynamic load balancing by Nishikawa & Streenkiste [5], experimental results are shown by taking poisson equation and matrix multiplication problem. Local Cluster First (LCF) policy proposed by Wang [6] improves the performance of various load sharing algorithms on heterogeneous cluster system. However, this technique gives best performance only if idle nodes are present in local cluster. Preemptive and non-preemptive process migration techniques are described by Kanungo and Chandwani [12]. Process migration takes place efficiently by considering memory usage and load on central processing unit.
3. PROPOSED METHOD
3.1. Informal Description of Algorithm
To maximize the performance of a parallel application in a heterogeneous environment, it is necessary to minimize the idle time of processors and suffering of processors from overload of work. Distribution of tasks should be such that nearly all processors finish their work at the same time. Though this is an ideal situation, but with some mechanism, the variation in end time of processors can be minimized. In the proposed method, an
Different Processor Speeds
0 20 40 60 80 100 120 140 160
1 2 3 4 5 6 7 8
Nodes
P
ro
c
e
s
s
in
g
T
im
e
(
m
s
)
Fast Processor Slow Processor
assignment factor and a priority is given to each node based on its computing power. The assignment factor of each node is pre-decided by running a sequential program on all nodes and estimating time taken by the processors. This value of assignment factor ranging between 0 and 1, such that for N number of total nodes
1
1
=
=
∑
=N
i
F
iF
(1)where Fi is assignment factor of ith node. With the help of this assignment factor we distribute tasks to
processors in the ratio of their computing power. A sample of assignment factor and priority for total N nodes is shown in Table 1.
Table 1: Assignment Factor and Priority of Nodes (N = 10)
Node No. Assignment Factor Priority
1 0.11 4
2 0.12 3
3 0.09 6
4 0.08 7
5 0.15 1
6 0.11 4
7 0.07 8
8 0.10 5
9 0.14 2
10 0.06 9
Faster nodes get high priority for higher assignment factor. Nodes with equal assignment factor get same priority and therefore receive equal amount of work to process. If we equally distribute tasks to nodes, some high speed nodes finish their work earlier than slow nodes. If Ti is maximum time taken by the slowest node in
the ith iteration and ti is the average time to finish the i th
iteration by the proposed method, then the theoretically total time gain Tgain from the nodes, which can be utilized for other tasks, is given by –
|
|
1 k
N
k k
gain
T
t
T
=
∑
−
= (2)
However, in a NOW environment, an incoming local load of a node is unpredictable. Hence we assume time loss lk on k
th
node due to local interventions then yet the total time gain is given by –
k k N
k k
gain
T
t
l
T
=
∑
−
−
=1
|
|
(3)The proposed method reduces the occurrence of rebalancing state, therefore minimizing communication overhead incurred in migrating tasks. However, whenever the system is imbalance and a task is to be migrated, we look first for a node having higher priority. If this node is not idle or heavily loaded then we keep on searching an idle or lightly loaded node in decreasing order of their priority. With this technique, faster nodes make system balanced as early as possible.
3.2.Formal Description of Algorithm
The distribution of the workload among N nodes of NOW is given in the form of an algorithm described in JAVA like pseudo code as under:
Algorithm: Load_Equalize Class SLB
{
void Load_Equalize ( float TotalLoad ) {
int k ; int N = 8 ;
float AF [ ] = { 0.24, 0.11, 0.10, 0.14, 0.06, 0.08, 0.07, 0.20 } /* AF[k] - Assignment Factor of node k */
float Load [ ];
for ( k = 1 ; k <= N ; k++ )
Load[k] = TotalLoad * AF[k] /* Load[k] - Workload to be executed by node k */ }
}
We monitor load at regular time interval for all nodes and store it in a load vector. We decide lower and higher threshold values for lightly loaded and heavily loaded nodes respectively. Whenever the load on a node is above threshold value, arriving new task is to be migrated to a idle or lightly loaded node. In the proposed algorithm, though the frequency of system to become imbalanced is minimum due to load distribution of load using assignment factor, however whenever load is to be migrated, we look first the status of highest priority node in load vector. If the load of this node is below the lower threshold value, the task is migrated here, otherwise we keep on searching a idle or lightly loaded node in decreasing order of their priority. If no node found suitable for task migration, the task is to be processed locally, i.e., on node where task is initially arrived. Algorithm: Load_Rebalance
Class DLB {
void Rebalance ( int overloaded_node)
/* overloaded_node is node detected heavily loaded */ {
int k ; int N = 8 ;
int lower_threshold = 3 ; /* Queue Length */ for ( k = 1 ; k <= N ; k++ )
/* Array is previously arranged in decreasing order of priority */ if queue_length(k) < lower_threshold
migrate_load(overloaded_node, k)
/* Migrating load if load on node k found less than lower threshold value */ }
}
End of Algorithm
4. EXPERIMENTAL RESULTS AND PERFORMANCE
In this section, we present our experimental results. We simulated our proposed method in JAVA, using multithreading features of the language. In our experiment, we allot assignment factor and priority to eight nodes depending on processing speed of nodes. We take mathematical expression evaluation task to test execution time. Table 2 shows comparison of response time for all nodes with equal distribution of work and compare it with response time by our proposed method.
Table 2: Comparison of Response Time (N=8)
Node No.
Assignment
Factor Priority
Response Time (ms) Proposed
Method
Eq. Dist. Method
1 0.24 1 92 55
2 0.11 4 109 114
3 0.10 5 95 120
4 0.14 3 78 95
5 0.06 8 94 160
6 0.08 6 88 132
7 0.07 7 115 155
8 0.20 2 78 67
Maximum Time (ms) 115 160
The above results are based on static assignment of tasks to nodes. We further experimented by monitoring load at intermediate steps and then migrating load from highly loaded node to lightly loaded node having high priority. The results obtained are shown in Table 3 and Fig. 3, after implementation of rebalancing algorithm.
Table 3: Comparative Response Time after Rebalance (N=8)
Node No.
Assignment
Factor Priority
Response Time (ms) Proposed
Method
Eq. Dist. Method
1 0.24 1 92 55
2 0.11 4 101 114
3 0.10 5 95 120
4 0.14 3 90 95
5 0.06 8 94 160
6 0.08 6 88 132
7 0.07 7 103 155
8 0.20 2 90 67
Maximum Time (ms) 103 160
Fig. 3. Comparative Response Time of Nodes using Dynamic Allocation of Tasks
The comparison of results between static load balancing (SLB) and dynamic load balancing (DLB) are shown in Table 4 and Fig. 4. We observed about seven percent further decrease in response time with DLB.
Fig. 2 Comparative Response Time of Nodes using Static Allocation of Tasks.
Comparative Response Time
0 50 100 150 200
1 2 3 4 5 6 7 8
Nodes
R
e
s
p
o
n
s
e
T
im
e
(
m
s
)
Prop. Method Eq.Dist. Method Comparative Response Time
0 50 100 150 200
1 2 3 4 5 6 7 8
Nodes
R
e
sp
o
n
s
e
T
im
e
(m
s)
Table 4: Comparison of SLB and DLB
5. CONCLUSION
In this paper, we have devised a mechanism which allocates an assignment factor and priority to workstations to maximize performance of a parallel application in heterogeneous environment. We observed a substantial gain in response time by the method. However, we considered static and minimum external load on nodes. In further research work, the dynamic behavior of external load on nodes shall be studied and incorporated with the proposed method.
References
[1] M.J. Zaki, Wei Li and S. Parthasarathy, “Customized Dynamic Load Balancing for a Network of Workstations,” Fifh IEEE
International Symposium on High Performance Distributed Computing (HPDC-5 '96), 1996.
[2] Md. Abdur Razzaque, Choong Seon Hong, “Dynamic Load Balancing in Distributed System: An Efficient Approach,” Joint
Conference on Communications and Information (JCCI), Phoenix Park, Korea, May 2007.
[3] S. Dandamudi, A Piotrowski A., “A Comparative Study of Load Sharing on Networks of Workstations,” Proceedings of the
International Conference on Parallel and Distributed Computing Systems, New Orleans, 1997.
[4] Rajkumar Buyya , Marcin Paprzycki, “A Dynamic Load Balancing Method on a Heterogeneous Cluster of Workstations,” Retrieved
from www.bo.infn.it/calma /publications/ Informatica, February 1999.
[5] Hiroshi Nishikawa, Peter Steenkiste, “A General Architecture for Load Balancing in a Distributed-Memory Environment,”
International Conference on Distributed Computing Systems (ICDCS) 1993, pp.47-54.
[6] Yi-Min Wang, “Local Cluster First Load Sharing Policy for Heterogeneous Clusters,” Journal of Inf. Sc. & Engg. 23, 2007,
pp..497-510.
[7] Shahzad Malik, “Dynamic Load Balancing in a Network of Workstations,” Retrieved from http:// www.cs.toronto.edu/95.515F
Research Report, November 2000.
[8] Michele Colajanni, Valeria Cardellini, Philip S. Yu, “Dynamic Load Balancing in Geographically Distributed Heterogeneous Web
Servers,” 18th IEEE International Conference on Distributed Computing Systems (ICDCS'98), 1998, pp. 295-301.
[9] Armando E. De Giusti, Marcelo R. Naiouf and Laura C. De Giusti, “Dynamic Load Balancing in Parallel Processing on
Non-Homogeneous Clusters,” Journal of Computer Science and Technology ( JCS&T), Vol.5, No.5, December 2005.
[10] Linda F. Wilson and Wei Shen, “Experiments in Load Migration and Dynamic Load Balancing in SPEEDS,” Proceedings of the
Winter Simulation Conference, 1998.
Node No.
Assignment
Factor Priority
Load Balancing Response Time (ms)
Static Dynamic
1 0.24 1 92 92
2 0.11 4 109 101
3 0.10 5 95 95
4 0.14 3 78 90
5 0.06 8 94 94
6 0.08 6 88 88
7 0.07 7 115 103
8 0.20 2 78 90
Maximum Time (ms) 115 103
Coparative Response Time
0 50 100 150
1 2 3 4 5 6 7 8
Nodes
R
e
s
p
o
n
s
e
T
im
e
(m
s
)
SLB DLB
[11] P. Kanungo, “Contributions in Dynamic Load Balancing Methodologies in Distributed Computing Environment,” Ph. D. Thesis, Department of Computer Engineering, IET-Devi Ahilya University, Indore, INDIA, May 2007.
[12] P. Kanungo, M. Chandwani, “A Process Migration Methodology for Distributed Computing Environment,” Indian Journal of