Dynamic Load Balancing 
on Linux 
Based Private Cloud 
Md Kamran Kausar 
Final Year 
Computer Engg. Dept. 
Fac of Engg. & Tech 
JAMIA MILLIA ISLAMIA 
New Delhi
Contents 
• Cloud Computing. 
• Virtualization. 
• Live Migration. 
• Load Balancing. 
• Proposed Algorithm For Load Balancing. 
• Conclusions and Future Work. 
• Programming Languages Use.
Cloud Computing 
• Came into Existence around 1950, The underlying concept of cloud 
computing dates back to the 1950s, when large-scale mainframe 
computers became available in academia and corporations, accessible 
via thin clients/terminal computers, often referred to as "static 
terminals", because they were used for communications but had no 
internal processing capacities. To make more efficient use of costly 
mainframes, a practice evolved that allowed multiple users to share 
both the physical access to the computer from multiple terminals as 
well as the CPU time. This eliminated periods of inactivity on the 
mainframe and allowed for a greater return on the investment. 
• Basically virtual servers available over the Internet. 
• Anything we consume outside the firewall is "in the cloud," 
• Private cloud is the phrase used to describe a cloud computing 
platform that is implemented within the corporate firewall.
Cloud Services
Cloud Rules Every Where
Virtualization 
• The term "virtualization" traces its roots to 1960s mainframes, during 
which it was a method of logically dividing the mainframes' resources 
for different applications. Since then, the meaning of the term has 
evolved to the aforementioned. 
• Virtualization is commonly defined as a technology act as a software 
abstraction layer between the hardware and the operating system 
and applications running on top of it. Main advantages include 
isolation,consolidation and multiplexing of resources. Other benefits 
of virtualization include saving on power by consolidation of different 
virtual machines on a single physical machine, migration of virtual 
machine for load balancing etc. 
• Core of any virtualization is Hypervisory or VMM.It is software which 
allows each VMs to access and schedule the task 
• Types:-1.Full Virtualization-Hypervisor controls the hardware 
resources and emulates it to guest OS.Guest Not require any 
modification. KVM is the best example of it
Virtualization Contd.. 
• Type 2- Paravirtualization: Here Hyperviosor controls the hardware 
resources and provides API to guest OS to access hardware. Guest OS 
requires modification to access the hardware resources. Xen is the 
example of paravirtualization technology. 
• Top Virtualization Technologies:- 
1.KVM Kernel-based Virtual Machine 
 Implemented as loadable kernel module that converts the Linux 
Kernel into a bare metal hypervisor. 
 Implemented as regular Linux Process running by standard Linux 
scheduler infact each virtual CPU appears as a regular Linux process. 
 This allows KVM to benifit from all features of Linux kernel 
2.QEMU:-process emulator and virtualizer, run many OS and 
programs,uses binary translation to achieve high performance
Live Migration 
Moving the running VM on a physical machine 
(source host) to another 
physical machine (target host) without 
disrupting any active network connections, 
while the VM is running on the source host, 
even after the VM is moved to the target host. 
It is considered live, since the original VM is 
running, while the migration is in progress. 
Very small downtime order of millisec, is the 
benefit of doing live migration.
Live Migration Steps 
 Pre-Migration:- Select VM to be migrated 
and destination host where resources 
required are guaranteed to be present. 
 Reservation:- Confirmation of necessary 
resources 
 Iterative Pre-Copy:- The guests memory is 
copied to the destination.
Live Migration Steps.. 
 Stop and Copy:- VM at source is suspended 
and network traffic is redirected to 
destination host. 
 Commitment:- Destination host indicates 
source host that it has successfully 
received a consistent VM image. 
 Activation:- The migrated VM on 
destination host is now activated.
Load Balancing 
 Process of reallocating VMs on another host in 
the network in order to improve resource and 
network utilization. 
 Common goals are:- Maximizing throughput, 
minimizing response time, and/or minimizing 
communication time and avoiding the scenario 
in network that, some hosts are under-utilized 
and some over-utilized.
Goals of Load Balancing 
 To improve the performance substantially. 
 Fault tolerance in case of system failure. 
 To maintain the system stability. 
 To accommodate future modification in the 
system
Load Balancing Algorithms 
 Sender initiated : Algorithm initiated by 
Sender 
 Receiver initiated : Algorithm initiated by 
Receiver. 
 Symmetric : Combination of above two
Five phases of load balancing 
I. Load Evaluation-It define Bands. Lightly 
loaded, moderately loaded and heavily 
loaded 
II. Profitability Determination-If there exists 
one virtual machine in the heavily loaded 
band and one in lightly loaded band. 
III.Work Transfer Vector Calculation 
IV.Task Selection 
V. Task Migration
Policy Engine 
 Heart of load 
balancing 
algorithm. 
 Decides when to 
migrate virtual 
machines between 
hosts and runs as 
normal virtual 
machine.
ALGORITHM for Load Evaluation 
 All the hosts send 
load information to 
policy engine: which 
is responsible for 
load balancing 
decisions, after a 
predefined time 
interval which can 
be changed as per 
requirements.
Load Balancing Algorithms Flow chart
Conclusions and Future Work. 
 The work has proposed a policy engine to dynamically balance 
the load over the network. Originally the network was 
imbalanced. There were hosts in heavily as well as lightly 
loaded bands. After some iterations on the VM of the load 
balancing algorithm, all the hosts were balanced over the 
network i.e. all the hosts were balanced. 
 Cloud Computing is a vast area and load balancing plays a very 
important role in case of Cloud. The work has focused on CPU 
usage as load parameter that is applied to the Cloud Computing 
Technology. 
 There are still other parameters and approaches that can be 
applied to balance the load. The performance of the given 
algorithm can be increased by varying different parameters like 
memory usage, disk I/O, network load etc.
References 
• KVM Kernel Based Virtual Machine Red Hat, Inc. 2014. 
• Ali M. Alakeel, A Guide to Dynamic Load Balancing in Distributed Computer 
• Terry C. Wilcox Jr, Dynamic Load Balancing Of Virtual Machines Hosted On 
Xen, Department of Computer. 
• Jyotiprakash Sahoo, Subasish Mohapatra, Radha Lath,Virtualization: A Survey 
On Concepts, Taxonomy And Associated Security Issues, Second International 
Conference on Computer and Network Technology, 2010. 
• Youran Lan, Ting Yu, A Dynamic Central Scheduler Load Balancing 
Mechanism, Computers and Communications, pp 734-740, May 1995. 
• Yi Zhao, Wenlong Huang, Adaptive Distributed Load Balancing Algorithm 
based on Live Migration of Virtual Machines in Cloud, Fifth International Joint 
Conference INC. 
• WWW.PYTHON.ORG 
• WWW.RIVERBANKCOMPUTING.COM
Dynamic Load balancing Linux private Cloud (DRS)

Dynamic Load balancing Linux private Cloud (DRS)

  • 1.
    Dynamic Load Balancing on Linux Based Private Cloud Md Kamran Kausar Final Year Computer Engg. Dept. Fac of Engg. & Tech JAMIA MILLIA ISLAMIA New Delhi
  • 2.
    Contents • CloudComputing. • Virtualization. • Live Migration. • Load Balancing. • Proposed Algorithm For Load Balancing. • Conclusions and Future Work. • Programming Languages Use.
  • 3.
    Cloud Computing •Came into Existence around 1950, The underlying concept of cloud computing dates back to the 1950s, when large-scale mainframe computers became available in academia and corporations, accessible via thin clients/terminal computers, often referred to as "static terminals", because they were used for communications but had no internal processing capacities. To make more efficient use of costly mainframes, a practice evolved that allowed multiple users to share both the physical access to the computer from multiple terminals as well as the CPU time. This eliminated periods of inactivity on the mainframe and allowed for a greater return on the investment. • Basically virtual servers available over the Internet. • Anything we consume outside the firewall is "in the cloud," • Private cloud is the phrase used to describe a cloud computing platform that is implemented within the corporate firewall.
  • 4.
  • 5.
  • 6.
    Virtualization • Theterm "virtualization" traces its roots to 1960s mainframes, during which it was a method of logically dividing the mainframes' resources for different applications. Since then, the meaning of the term has evolved to the aforementioned. • Virtualization is commonly defined as a technology act as a software abstraction layer between the hardware and the operating system and applications running on top of it. Main advantages include isolation,consolidation and multiplexing of resources. Other benefits of virtualization include saving on power by consolidation of different virtual machines on a single physical machine, migration of virtual machine for load balancing etc. • Core of any virtualization is Hypervisory or VMM.It is software which allows each VMs to access and schedule the task • Types:-1.Full Virtualization-Hypervisor controls the hardware resources and emulates it to guest OS.Guest Not require any modification. KVM is the best example of it
  • 7.
    Virtualization Contd.. •Type 2- Paravirtualization: Here Hyperviosor controls the hardware resources and provides API to guest OS to access hardware. Guest OS requires modification to access the hardware resources. Xen is the example of paravirtualization technology. • Top Virtualization Technologies:- 1.KVM Kernel-based Virtual Machine  Implemented as loadable kernel module that converts the Linux Kernel into a bare metal hypervisor.  Implemented as regular Linux Process running by standard Linux scheduler infact each virtual CPU appears as a regular Linux process.  This allows KVM to benifit from all features of Linux kernel 2.QEMU:-process emulator and virtualizer, run many OS and programs,uses binary translation to achieve high performance
  • 8.
    Live Migration Movingthe running VM on a physical machine (source host) to another physical machine (target host) without disrupting any active network connections, while the VM is running on the source host, even after the VM is moved to the target host. It is considered live, since the original VM is running, while the migration is in progress. Very small downtime order of millisec, is the benefit of doing live migration.
  • 9.
    Live Migration Steps  Pre-Migration:- Select VM to be migrated and destination host where resources required are guaranteed to be present.  Reservation:- Confirmation of necessary resources  Iterative Pre-Copy:- The guests memory is copied to the destination.
  • 10.
    Live Migration Steps..  Stop and Copy:- VM at source is suspended and network traffic is redirected to destination host.  Commitment:- Destination host indicates source host that it has successfully received a consistent VM image.  Activation:- The migrated VM on destination host is now activated.
  • 11.
    Load Balancing Process of reallocating VMs on another host in the network in order to improve resource and network utilization.  Common goals are:- Maximizing throughput, minimizing response time, and/or minimizing communication time and avoiding the scenario in network that, some hosts are under-utilized and some over-utilized.
  • 12.
    Goals of LoadBalancing  To improve the performance substantially.  Fault tolerance in case of system failure.  To maintain the system stability.  To accommodate future modification in the system
  • 13.
    Load Balancing Algorithms  Sender initiated : Algorithm initiated by Sender  Receiver initiated : Algorithm initiated by Receiver.  Symmetric : Combination of above two
  • 14.
    Five phases ofload balancing I. Load Evaluation-It define Bands. Lightly loaded, moderately loaded and heavily loaded II. Profitability Determination-If there exists one virtual machine in the heavily loaded band and one in lightly loaded band. III.Work Transfer Vector Calculation IV.Task Selection V. Task Migration
  • 15.
    Policy Engine Heart of load balancing algorithm.  Decides when to migrate virtual machines between hosts and runs as normal virtual machine.
  • 16.
    ALGORITHM for LoadEvaluation  All the hosts send load information to policy engine: which is responsible for load balancing decisions, after a predefined time interval which can be changed as per requirements.
  • 17.
  • 18.
    Conclusions and FutureWork.  The work has proposed a policy engine to dynamically balance the load over the network. Originally the network was imbalanced. There were hosts in heavily as well as lightly loaded bands. After some iterations on the VM of the load balancing algorithm, all the hosts were balanced over the network i.e. all the hosts were balanced.  Cloud Computing is a vast area and load balancing plays a very important role in case of Cloud. The work has focused on CPU usage as load parameter that is applied to the Cloud Computing Technology.  There are still other parameters and approaches that can be applied to balance the load. The performance of the given algorithm can be increased by varying different parameters like memory usage, disk I/O, network load etc.
  • 19.
    References • KVMKernel Based Virtual Machine Red Hat, Inc. 2014. • Ali M. Alakeel, A Guide to Dynamic Load Balancing in Distributed Computer • Terry C. Wilcox Jr, Dynamic Load Balancing Of Virtual Machines Hosted On Xen, Department of Computer. • Jyotiprakash Sahoo, Subasish Mohapatra, Radha Lath,Virtualization: A Survey On Concepts, Taxonomy And Associated Security Issues, Second International Conference on Computer and Network Technology, 2010. • Youran Lan, Ting Yu, A Dynamic Central Scheduler Load Balancing Mechanism, Computers and Communications, pp 734-740, May 1995. • Yi Zhao, Wenlong Huang, Adaptive Distributed Load Balancing Algorithm based on Live Migration of Virtual Machines in Cloud, Fifth International Joint Conference INC. • WWW.PYTHON.ORG • WWW.RIVERBANKCOMPUTING.COM