PRESENTATION BY,
VETRI DEEPIKA . K(13L249), III ECE ‘B’;
SAJITHA.S(13N125),III EIE ‘A’,
KARPAGAM COLLEGE OF ENGINEERING,CBE.
Contents…
 What is load balancing?
 Why do we go for load balancing?
 Goals of load balancing
 General approaches for load balancing
push migration
pull migration
 Types of load balancing
static load balancing
dynamic load balancing
 Round Robin DLB-Pseudocode
 Load balancing in life
What is load balancing ?
A computer methodology
to distribute workload across multiple computers
or a computer cluster , network links, central
processing units ,disk drives or other resources
networking
Why do we go for load balancing ?
 High Availability
 High Reliability
 High Scalability
 Ease of maintainance
 Resource sharing
Load Balancing attempts to keep the workload evenly distributed across all
processors in an SMP(symmetric multi-procesor system) system
It is necessary where each processor has its own private queue
Goals Of Load Balancing…
 Achieve optimal resource utilization
 Maximize throughput
 Minimize response time
 Avoid overload
 Avoid Crashing
Symmetric Multiprocessor System
 A symmetric multiprocessor system (SMP) is
a multiprocessor system with centralized shared
memory called main memory (MM) operating
under a single operating system with two or more
homogeneous processors executing different
programs and working on different data, with the
capability to share resources (memory, I/O device
etc.), and connected using a system bus.
 Usually each processor has an associated private
high-speed memory known as cache memory to
speed-up the MM data access and to reduce the
system bus traffic.
General Approaches to Load Balancing…
 Push migration
overloaded process in one CPU(processor) is PUSHED to another processor
for processing.
 Pull migration
the process which is overloaded is PULLED from a processor and its put
under another processor for processing.
General Approaches to Load Balancing…
Technically …
Push Migration
 A specific task periodically checks the load on each processor.
 If it finds an imbalance – it evenly distributes the load by moving (or pushing) processes from
overloaded to idle or less-busy processors.
Pull Migration
 It occurs when an idle processor pulls a waiting task from a busy processor.
Types of load balancing
 Static load balancing
 Dynamic load balancing
Types of load balancing:
STATIC LOAD BALANCING
It is the type of Load Balancing which is often referred to as the mapping
problem, the task is to map a static process graph onto a fixed hardware topology
in order to minimise dilation and process load differences.
DYNAMIC LOAD BALANCING
It is desirable in a distributed system to have the system load balanced
evenly among the nodes so that the mean job response time is minimized.
Algorithms for load balancing:
Sender-Initiated Algorithm
In sender-initiated algorithm, sender having high load tries to transfer task to
another processor (receiver) which have low load. So the node which is
congested tries to move some workload to the node which is not congested.
Receiver-Initiated Algorithm
An underloaded node (sender) tries to get a task to an overloaded node
(receiver)
ROUND ROBIN DYNAMIC LOAD BALANCING:
Pseudocode:
The weighted round-robin scheduling is designed to better handle servers with
different processing capacities. Each server can be assigned a weight, an integer value that
indicates the processing capacity. Servers with higher weights receive new connections first
than those with less weights, and servers with higher weights get more connections than those
with less weights and servers with equal weights get equal connections.
Suppose that there is a server set ''S'' = {S0, S1, …, Sn-1};
W(Si) indicates the weight of Si;
''i'' indicates the server selected last time, and ''i'' is initialized with -1;
''cw'' is the current weight in scheduling, and cw is initialized with zero;
max(S) is the maximum weight of all the servers in S;
gcd(S) is the greatest common divisor of all server weights in S;
while (true)
{
i = (i + 1) mod n;
if (i == 0) {
cw = cw - gcd(S);
if (cw <= 0) {
cw = max(S);
if (cw == 0)
return NULL;
}
}
if (W(Si) >= cw)
return Si;
}
Expected output:
For example, the real servers, A, B and C, have the weights, 4, 3, 2 respectively, a scheduling
sequence will be AABABCABC in a scheduling period (mod sum(Wi)).
Enter the no of processes : 3
Enter weight of P1 : 4
Enter weight of P2 : 3
Enter weight of P3 : 2
Scheduling sequence will be as follow
P1  P1  P2  P1  P2  P3  P1  P2  P3
Time slice will be allotted to each process and hence the processes will be processed with
respect to this time slice.
Unbalanced Life…
Life with load balancing…
A load balancer balances the workload among a multiprocessor system and increases
the efficiency of the system and network.
Likewise , when we balance the regular work in our life , we will be able to manage
everything and make our life an effective one
“IF YOU BALANCE YOUR CHORES , LIFE WILL BE CINCH”
Load Balancing In Life..!
Queries???

Load balancing

  • 1.
    PRESENTATION BY, VETRI DEEPIKA. K(13L249), III ECE ‘B’; SAJITHA.S(13N125),III EIE ‘A’, KARPAGAM COLLEGE OF ENGINEERING,CBE.
  • 3.
    Contents…  What isload balancing?  Why do we go for load balancing?  Goals of load balancing  General approaches for load balancing push migration pull migration  Types of load balancing static load balancing dynamic load balancing  Round Robin DLB-Pseudocode  Load balancing in life
  • 4.
    What is loadbalancing ? A computer methodology to distribute workload across multiple computers or a computer cluster , network links, central processing units ,disk drives or other resources networking
  • 5.
    Why do wego for load balancing ?  High Availability  High Reliability  High Scalability  Ease of maintainance  Resource sharing Load Balancing attempts to keep the workload evenly distributed across all processors in an SMP(symmetric multi-procesor system) system It is necessary where each processor has its own private queue
  • 6.
    Goals Of LoadBalancing…  Achieve optimal resource utilization  Maximize throughput  Minimize response time  Avoid overload  Avoid Crashing
  • 7.
    Symmetric Multiprocessor System A symmetric multiprocessor system (SMP) is a multiprocessor system with centralized shared memory called main memory (MM) operating under a single operating system with two or more homogeneous processors executing different programs and working on different data, with the capability to share resources (memory, I/O device etc.), and connected using a system bus.  Usually each processor has an associated private high-speed memory known as cache memory to speed-up the MM data access and to reduce the system bus traffic.
  • 8.
    General Approaches toLoad Balancing…  Push migration overloaded process in one CPU(processor) is PUSHED to another processor for processing.  Pull migration the process which is overloaded is PULLED from a processor and its put under another processor for processing.
  • 9.
    General Approaches toLoad Balancing… Technically … Push Migration  A specific task periodically checks the load on each processor.  If it finds an imbalance – it evenly distributes the load by moving (or pushing) processes from overloaded to idle or less-busy processors. Pull Migration  It occurs when an idle processor pulls a waiting task from a busy processor.
  • 10.
    Types of loadbalancing  Static load balancing  Dynamic load balancing
  • 11.
    Types of loadbalancing: STATIC LOAD BALANCING It is the type of Load Balancing which is often referred to as the mapping problem, the task is to map a static process graph onto a fixed hardware topology in order to minimise dilation and process load differences. DYNAMIC LOAD BALANCING It is desirable in a distributed system to have the system load balanced evenly among the nodes so that the mean job response time is minimized.
  • 12.
    Algorithms for loadbalancing: Sender-Initiated Algorithm In sender-initiated algorithm, sender having high load tries to transfer task to another processor (receiver) which have low load. So the node which is congested tries to move some workload to the node which is not congested. Receiver-Initiated Algorithm An underloaded node (sender) tries to get a task to an overloaded node (receiver)
  • 13.
    ROUND ROBIN DYNAMICLOAD BALANCING: Pseudocode: The weighted round-robin scheduling is designed to better handle servers with different processing capacities. Each server can be assigned a weight, an integer value that indicates the processing capacity. Servers with higher weights receive new connections first than those with less weights, and servers with higher weights get more connections than those with less weights and servers with equal weights get equal connections. Suppose that there is a server set ''S'' = {S0, S1, …, Sn-1}; W(Si) indicates the weight of Si; ''i'' indicates the server selected last time, and ''i'' is initialized with -1; ''cw'' is the current weight in scheduling, and cw is initialized with zero; max(S) is the maximum weight of all the servers in S; gcd(S) is the greatest common divisor of all server weights in S;
  • 14.
    while (true) { i =(i + 1) mod n; if (i == 0) { cw = cw - gcd(S); if (cw <= 0) { cw = max(S); if (cw == 0) return NULL; } } if (W(Si) >= cw) return Si; }
  • 15.
    Expected output: For example,the real servers, A, B and C, have the weights, 4, 3, 2 respectively, a scheduling sequence will be AABABCABC in a scheduling period (mod sum(Wi)). Enter the no of processes : 3 Enter weight of P1 : 4 Enter weight of P2 : 3 Enter weight of P3 : 2 Scheduling sequence will be as follow P1  P1  P2  P1  P2  P3  P1  P2  P3 Time slice will be allotted to each process and hence the processes will be processed with respect to this time slice.
  • 17.
  • 18.
    Life with loadbalancing… A load balancer balances the workload among a multiprocessor system and increases the efficiency of the system and network. Likewise , when we balance the regular work in our life , we will be able to manage everything and make our life an effective one “IF YOU BALANCE YOUR CHORES , LIFE WILL BE CINCH”
  • 19.
  • 21.

Editor's Notes

  • #7 THROUGHPUT: It is the measure of how many units of information/data a system can process in a given amount of time.