You are on page 1of 6

2012 International Symposium on Cloud and Services Computing

HTV Dynamic Load Balancing Algorithm for Virtual Machine Instances in Cloud

Jitendra Bhatia Tirth Patel


Department of Computer Science and engineering Department of Information Technology
Nirma University Charusat University
Ahmedabad, India Ahmedabad, India
jitendra.bhatia@nirmauni.ac.in tirthking@gmail.com

Harshal Trivedi Vishrut Majmudar


Department of Computer Engineering Department of Computer Engineering
Venus International Collage of Technology Gandhinagar Institute of Technology
Ahmedabad, India Ahmedabad, India
harshal2008@gmail.com v.h.majmudar@gmail.com

Abstract— Cloud computing is defined as a structured model cloud provider are Amazon EC2, Google App Engine,
that defines computing services, in which resources as well as Google apps etc. Developers, on a whole, can obtain the
data are retrieved from cloud service provider via internet advantages of a managed computing platform, without
through some well formed web-based tool and application. It having to commit resources to design, build and maintain
provides the on demand services for various applications and the network. On profound studies, some of the important
infrastructure to the user. Cloud service providers are
required to provide the service efficiently and effectively. For
problems of cloud were examined, like data security, data
that, a cloud provider utilizes all the resource from the node. loss, load balancing etc. In cloud platforms, resource
Thus, the node that are meant for creating a task in the cloud allocation (or load balancing) takes place majority at two
computing must be considered for efficient usage of the levels.
available resources. Resources have to be properly selected At first level: When an application is uploaded to the cloud,
according to the properties of the task. By analyzing the the load balancer assigns the requested instances to physical
present research on cloud computing, we have come to the computers, attempting to balance the computational load of
most common and important issue of load balancing. Load multiple applications across physical computers.
balancing has always been a research subject whose objective At second level: When an application receives multiple
is to ensure that all computing resources are distributed
efficiently and fairly. As the numbers of users are increasing
incoming requests, each of these requests must be assigned
on the cloud, the load balancing has become the challenge for to a specific application instance to balance the
the cloud provider. Load balancing being subject of research, computational load across a set of instances of the same
we have proposed an algorithm for load balancing which will application [1].
work dynamically for optimal usage of resource utilization. We To understand it in a better way, we would conclude it
have compared our algorithm with various existing static load with an example: Eucalyptus cloud provider uses the Round
balancers as well as conventional dynamic load balancer also. Robin (RR) algorithm for the load balancing. Therefore,
virtualization technology is being comprehensively used in
Keywords-cloud computing;load Balancing;Scheduling; cloud computing. However, due to the highly dynamic
Resourece Allocation heterogeneity of resources on cloud computing platform,
I. INTRODUCTION virtual machines must adapt the cloud computing
environment dynamically so as to achieve its best
Cloud computing now a day has became quite popular performance by efficiently using its service and resources.
among a community cloud of cloud user by offering the But in order to improve resource utility, resources must be
various types of resources. properly allocated and load balancing must be guaranteed
“Cloud computing defined as such structured model that [2]. Therefore, Load balancing has always been a research
defines computing services where resources as well as data subject whose objective is to ensure that all computing
are retrieved from cloud service provider via internet resource are distributed efficiently and fairly and at a good
through some well-formed web-based tool and application”. end can improves resource utility.
In generalized way, it describes how organization take their In cloud computing, if more load will be consigned on
existing IT infrastructure and hand over to skilled person nodes of cloud then the increase in the number of users will
who can precisely build or manage it so that organization lead to poor performance in terms of resource usage, if the
can achieved their goal by focusing on new ways and cloud provider is not configured with any good mechanism
techniques that help the business at hand rather than for load balancing and also the capacity of cloud servers
becoming expert in building servers, managing storage or would not be utilized properly. This will confiscate or seize
protecting data. Some of the most prominent examples of

978-0-7695-4931-6/12 $26.00 © 2012 IEEE 15


DOI 10.1109/ISCOS.2012.25
the performance of heavy loaded node. If some good load queue, eventually distributing connections evenly across the
balancing technique is implemented, it will equally divide array of machines being load balanced. Round Robin works
the load (here term equally defines low load on heavy well in most configurations, but could be more effective if
loaded node and more load on node with less load now) and the equipment that we are load balancing is roughly equal in
thereby we can maximize resource utilization. processing speed, connection speed, and/or memory. The
basic purpose of working behind the algorithm is the system
II. RELEATED WORK builds a standard circular queue and walks through it,
Now a day’s every organization are propagating towards sending one request to each machine before getting to the
the use of cloud computing. With no doubt we can put it as start of the queue and repeating it again. The problem with
within few years, there will be lots of user for cloud this strategy is that it will not check whether the server is
computing. During that period of time, cloud provider will heavy loaded or not, it will directly assign the request
need to maintain more effective load balancing and an whenever its turn comes so that is the reason, some server
efficient resource management than the current scenario. are heavy loaded while some are lightly loaded [8]. In
And it is of no worth to buy new hardware just to balance Dynamic Round Robin, strategy, weights assignments is
the load instead of fully utilizing current resources. Thus, an based on continuous monitoring of the servers and is
efficient load balancing system is needed to handle much therefore constantly changing. In this dynamic load
load and to maximize utilization of current resources. balancing strategy, distributions of connections is done on
There are several static and dynamic type of load the basis of server performance analysis such as the current
balancing algorithms on which various researches have been number of instances i.e. connection per node or the response
made. Static scheduling algorithm like ISH [3], MCP [4] time of a fastest node. This type of an application level
and ETF [5] which are based on BNP are suitable for small connection distribution controlling method is rarely
distributed environments with high Internet speed ignoring available in a conventional load balancer. In Weighted
the communication delay. While MH[6] and DSL[7] Round Robin, the circular queue is rebuilt with new
algorithm which are based on APN takes communication (dynamic) weights whenever it has been fully traversed [8].
delay and execution time into consideration and are suitable ARA(Adaptive Resource Allocation):In ARA algorithm
for larger distributed environments. In dynamic scheduling for adaptive resource allocation in cloud systems, which
algorithm, some algorithms guarantee the load balancing attempts to counteract the deleterious effect of burrstones by
and load sharing through self-adapting and intelligent allowing some randomness in the decision making process
distribution. In mixed scheduling algorithm, it mainly and thus improve overall system performance and
emphasizes on equal distribution of assigned computing availability [1]. The problem with this strategy is that it only
task by reducing the communication cost of distributed considers the Poisson arrival streams as well as the
computing nodes and at the same time it realizes balanced exponentially distributed service time and the fixed number
scheduling according to the computing volume of every of choice.
node. Researchers have also conducted studies on Equally spread current execution: In this algorithm,
algorithms of autonomic scheduling, central scheduling, processes are handled with priorities. It distribute the load
intelligent scheduling and agent negotiated scheduling. randomly by checking the size and transfer the load to that
There are many similarities as well as differences between virtual machine which is lightly loaded or handle that task
traditional scheduling algorithms and the scheduling of VM easily and take less time by giving maximum throughput. It
resources in cloud computing environment. First of all the is spread spectrum technique in which the load balancer
major difference between cloud computing environment and spread the load of the job in hand into multiple virtual
traditional computing environment is the target of machines.
scheduling. In traditional computing environment, it mainly Throttled: This algorithm is completely based on virtual
schedules process or task so the granularity and the machine in which, the client first requests the load balancer
transferred data is small; whereas in cloud computing to find a suitable Virtual Machine (VM) which access that
environment, the scheduling target is VM resources so the loads easily and perform the required operation. The major
granularity is large and the transferred data is large as well. issue in this allocation is that, it does not consider the
Secondly, in cloud computing environment, compared with advanced load balancing requirements such as processing
the deployment time of VMs, the time of scheduling times for each individual requests.
algorithm can almost be neglected. The other load balancing
algorithm like random scheduling method randomly
distributes load across the available servers, picking up one
via random number generation and sending the current
connection to it. While it is available on many load
balancing products, its utility is questionable except where
uptime is concerned – and then only we can detect down
machines. The problem with this strategy is the load that is
distributed among the nodes but there is no guaranties that
load will be distributed equally. In Round Robin (RR), it
passes each new connection request to the next server in

16
TABLE I. COMPARATIVE CHART FOR EXISTING AND PROPOSED ALGORITHM therefore it will degrade the performance and efficiency of
that heavy loaded nodes.
Parameter Round Throttled Active HTV In cloud computing, the load is transferred to the number
robin Vmload
Balancer of nodes using Round Robin Algorithm. The load balancer
always submits the burst arrivals to the top-ranked site
Dynamic/static Static Dynamic Dynamic Dynamic within the delay period. Consequently, significant load is
incurred on that particular site, resulting in the performance
Resource Less Less More More
degradation under burst workloads.
Utilization TABLE II. RESPONSE TIME OF VARIOUS ALGORITHMS

Fault tolerance No Yes No yes Parameter Round Robin Equally Spread Throttled
Current
Overload rejection No No Yes yes Execution
Number Of Request 35 35 35
Per 3 Hour
Response Time(s) 142.25s 142.16s 124.62s
III. PROBLEM UNRAVELING
Data Center 35.78s 35.69s 18.26s
There are various algorithms available for load balancing Processing Time
in cloud computing but looking at various issues in the
different algorithm still some research is to be done to The simulation of various algorithms is shown in the
improve the performance and efficiency of the algorithms. Table II. We have used the number of requests as shown in
As far as our work is considered, we have analyzed the above table for each load balancing policy one by one and
current algorithm used for load balancing in private cloud depending on that the result calculated for the metrics like
scenario. The results for the same areas under: response time, request processing time has been shown. It
can be seen from the table that the overall response time of
Round Robin policy and ESCE policy is almost same while
that of Throttled policy is low as compared to other two
policies.
No doubt the throttled response time is good compare to
other but the problem in this policy is that, it doesn't
measure the performance of data center and the load on the
data center. The random arrival of load in cloud
environment can cause some nodes to be heavily loaded
while other nodes are idle or only lightly loaded. Equally
load sharing improves performance by distributing load to
the nodes according to the available resources on that node.
Performance estimation of any system is based on efficient
resource allocation characteristics. The considered
characteristics have an impact on cost optimization, which
can be obtained by improved response time and processing
Figure 1. Analysis of Resource allocation in cloud
time.
As shown in Fig.1, the current load balancing mechanism IV. PROPOSED SOLUTION
in cloud computing distributes load to all nodes in round
robin fashion i.e. it simply takes one request and assign it to In our proposed algorithm, there would be continuous
the first node and then it moves to the next node in queue monitoring of the resources to know the status of an
which is shown in the figure 1. Similarly, second request available resource on each of the node and there would be a
will be allocated to second node if enough resources are queue in which the weight factor of node will be stored and
available on that node else it will move to the very next update whenever continuous monitoring is done. Once a
node after that node in a queue and when end of the queue is request comes from client, the resources would be allocated
reached it will start assigning request again from the first from the information present in the queue dynamically to
node. Here, we use resources in terms of memory and space. balance the load on nodes to gain high performance and
There is no concept of resource monitoring hence it doesn't efficiency.
have any idea that the node whom it assigns the request is As per the research we took into consideration, the
heavy loaded or lightly loaded etc. It may be possible that at dynamic Round Robin strategy is more advisable for cloud
the same time some of the nodes of the cloud are heavily environment, because in cloud it may happen that nodes
loaded while others are free (still round robin will assign the have different number of resources or a single resource may
request to that heavy loaded node if it is next in queue) have two different requests, that is one request may be of

17
1GB of memory while other one, just ask for 500MB. Even Load Balancer: It is a new load balancer algorithm
the time to serve that particular client, for the node, is not fix implemented within cloud controller which would balance
(it depends on the logging out time of the client from cloud). the load as per the user request.
Hence the best and manifesting way to describe node’s load
is to monitor it continuously and to assign load accordingly VI. PROPOSED ALGORITHM
Below is the scenario of how the algorithm is implemented.
V. IMPLEMENTATION ARCHITECTURE Depending upon the entire research, the concept can be
Fig.2 depicts the proposed working model on which the implemented through the following algorithm.
research is to be carried out. This model provides us the
platform to implement the research on load balancing within
cloud computing. The basic components involved in this
architecture are Cloud Controller, Node Controller, Virtual
machines, User and Load Balancer.

CloudControler CloudControler
Load Balancer Load Balancer

Node Controller Node Controller Node Controller Node Controller

VM VM VM VM VM VM VM VM VM VM VM VM
Figure 3.Working Model

Figure 2. Architecture[9] There are various steps in the algorithm:


Node information queue will contain the information
Cloud Controller (CL): The first phase of cloud about all nodes considering the parameter namely basic
infrastructure is cloud controller. It is the root of overall node information, free space (in terms of memory and
structure. The request sent by a user is authentically processor) and performance details about that node. The
accepted by the cloud controller and passed to next phase of information would be gathered by sending a request on the
this structure. This phase provides a web interface to user cloud node and the information about the resources would
and also interacts with the rest components of cloud be communicated as a response from the node and the queue
infrastructure. Load balancer algorithm would be would be updated dynamically from the available response.
implemented on cloud controller. HTV performance algorithm will measure the
Node Controller (NC): The next phase is Node Controller. information like performance, load on the particular node,
The request accepted by cloud controller is passed to node total space available and it will store these information in
controller. It is a Virtual extension (VT) enabled server the queue and using these information, the load balancer
capable of running KVM (Kernel Virtual Machine) as the would work dynamically for load balancing of resources
hypervisor. The entire process is controlled by cloud server. which in turn will help in proper allocation and distribution
The VMs running on the NC are called instances. Node of resources among the node and will increase the
Control Server runs on each node and controls the life span performance and efficiency of resources allocation among
of instances running on the node. The NC interacts with the nodes.
OS and the hypervisor running on the node along with the There are two basic parameter which are used namely
Cloud Control. load on nodes and response time of node. Based on these
Virtual Machines (VMs): VMs can be considered as parameters, our algorithm will output some information
instances of the cloud. Different types of instances are dynamically in a temporary queue for the further resource
created for every user depending upon the demand of allocation.
services. The request of the user is fulfilled through Temporary dynamic queue stores the information given
instances. Instances are stored within Node Controller. The by the HTV algorithm dynamically. It the store the
Load balancing of these instances are done as the request for information about the nodes list which would be further
service is received from the client. used for the allocation in the next round of allocation.
User: Users are generally the cloud users who demands for Permanent Dynamic queue once the queue is generated
services and have access to those services of the cloud. using HTV performance algorithm the permanent queue will

18
be replaced by temporary queue for next revolution of HTV Here the performance factor calculates the increase or
performance algorithm every time when it is updated after decrease in performance on the server and the calculated
monitoring. So if a new client request arrives it will be value is stored y. Now for calculating y a request is send to
assigned to the current node pointer in permanent queue and all the nodes at regular interval of time and the response
the pointer moves to the next node in queue and the same time(total of both request time + response time ) is
allocation procedure will work. calculated. So every hour sever would have various values
Working of HTV performance algorithm: For better of y and averaging all the value of y1 would be calculated to
performance of our algorithms two parameters are taken in generate a queue. Now, the previously calculated y1 will be
to consideration. deducted from current values y1 which was currently used
1. Load on the server. to calculate the performance (i.e. Response time increases or
2. Current performance of server. decreases). The same way the increased or decreased
Load on the server: We are more interested in free performance is calculated and the value of y is calculated as
resources available on node. The node having more free the percentage of previously counted y1. That is y/(previous
resources will able to handle more requests easily without y1)*100.
degrading its performance. Step 3:
Current performance of Sever: A request is send to the Counting z = x - y; Here Y value is subtracted from x value
node at regular interval and in response, the performance to count the z value
parameter is measured. It may be the case that the response Here we are interested in the node with the lowest response
time of node may change every time depending on the client time hence we subtract the y value from x. i.e. nodes having
usage of its resources. So, the above two parameters are more response time will contain less z value and they will
used to built a new queue for future allocation. This get less number of requests to handle.
information of the entire node is calculated by a Now suppose in the worst case node have very less memory
mathematical function to count z-parameter value for each available and very large response time than z = x – y may
node. get negative value so we need to remove that node from
The pseudo code of the algorithm is as under queue (think that it is temporary unavailable) and it will not
Pseudo Code consider in any step of the algorithm and in this iteration of
Step 1: [Calculate Load Factor x] algorithm it will not get any request to handle.
x  (Total _Resources If any node is temporarily unavailable the response time will
– Used _Resources) be infinite (or very large) of that specific node. So the y
// where x is free memory in terms of percentage. value also becomes too much large for that node which will
Step 2: [Calculate Performance Factor y]: leads to minus z value.
y1  average (current _response _time) And in step 4 of algorithm that node will discarded for
y  y1 - (previously calculated y1) future process in this irritation of algorithm.
y  y/(previous y1)*100 //counting y in terms of So with this step we can also detect the unavailable node
previously counted y1. (with value of y as infinite or to large).
Step 3: [finding z] Step 4:
z  x - y; Once the z is calculated then the minimum of all z which we
If (z < 0) calculated are stored in min _z.
z = 0; Here we will not consider node with 0 z value so, this
Step 4: [Find minimum of all z except the nodes with z node will be remove from any further process and for this
value 0] iteration of the algorithm.
Min _z= min (all z’s) In the next iteration of the algorithm the z value of node
Step 5: [Find min _factor and divide all z by that factor] will count again so it will get the next chance to join cloud
Min _factor  min _z environment if it is ready for it i.e. available.
Z  z / min _factor Step 5:
Step 6: [Generate Dynamic Queue on base of z] Here minimum factor is calculated and divided by all the
factors of z.
In the above algorithm x is considered as a free load on Suppose z values for node 1 to 5 are given below:
server, y for the performance on the server and y1 is the Node z-value
current response time. N1 22.30
Explanation N2 12.23
Step-1: N3 43.00
The value of x is calculated by considering the total N4 14.36
available resources and allocated resources on the server. N5 28.29
The available resources would be calculated using the Now N2 has a list z value and so every nodes z value are
equation x = (Total _Resources – Used _Resources). Once x divided by N2’s z value and stores a float or cell value of it
value is calculated for all nodes servers we get the available to make it easy and less complex. So now the z values are 2,
free load on the servers. 1, 4, 1, and 2.
Step 2:

19
Node with z value 0 will get 0 as z / min_fact so they can’t
get any request to handle.
Step 6:
From the above value N1 has the capacity to handle two
requests, node N2 can handle only one while N3 will handle
4 to keep load balanced on each node. So the temporary
queue will look be prepared as follows:
N3 N3 N3 N3 N1 N1 N5 N5 N4 N2
Figure 4.Dynamic Queue

So, once the temporary queue and permanent queue will be


changed and accordingly, first 4 requests will go to node 3
than 2 will go to n1 and so on until the end of queue. Once
the queue is over it will assign next 4 to N3 and so on.
In this way the whole algorithm will work and would help
in increasing the performance and improve load balancing.
VII. CONCLUSION
As such cloud computing being wide area of research and
one of the major topics of research is dynamic load
balancing, so the following research will be focusing on
algorithm considering mainly two parameters firstly, load
on the server and secondly, current performance of server.
By considering these parameters, our algorithm outperforms
the existing load balancing schemes.
VIII. FUTURE WORK
In future, we are going to incorporate this into existing
cloud computing architecture for better performance and
effective utilization of resources. We would consider
parameters like types of load on specific server and user
base priority.
REFERENCES
[1] JianzheTai,JueminZhang,JunLi,WaleedMeleis and NingfangMi “A R
A: Adaptive Resource Allocation for Cloud Computing Environments
under Bursty Workloads” 978-1-4673-0012-4/11 ©2011 IEEE.
[2] L. Cherkasova, D. Gupta, and A. Vahdat, “When virtual is harder than
real: Resource allocation challenges in virtual machine based on
environments,” Technical Report HPL-2007-25, February 2007.
[3] Rewinin H E, Lewis T G, Ali H H, “Task Scheduling in parallel and
Distributed System Englewood Cliffs,” New Jersey: Prentice Hall,1994,
pp. 401-403.
[4] Wu M, Gajski D, Hypertool, “A programming aid for message passing
system,” IEEE Trans Parallel DistribSyst, 1990, pp. 330-343.
[5] Hwang J J, Chow Y C, Anger F D, “Scheduling precedence graphics in
systems with inter-processor communication times,” SIAM J Comput,
1989, pp. 244-257.
[6] Rewinin H E, Lewis T G, “Scheduling parallel programs onto arbitrary
target machines,” J Parallel DistribComput, 1990, pp. 138-53.
[7] Sih G C, Lee E A, “A compile-time scheduling heuristic for
Interconnection-constraint heterogeneous processor architectures” IEEE
Trans Parallel DistribSyst, 1993, pp. 175-187.
[8]https://devcentral.f5.com/weblogs/dmacvittie/archive/2009/03/31/intro-
to-load-balancing-for-developers-ndash-the-algorithms.aspx
[9] KrimitShukla, Harshal Trivedi, Parth Shah “Architecture for Securing
Virtual Instance in Cloud” (IJCSIT) International Journal of Computer
Science and Information Technologies, Vol. 3 (3), 2012, 4279– 4282.
[10] Jitendra Bhatia, Ankit Patel, ZunnunNarmawala, “Review on variants
of network coding in wireless ad-hoc networks” IEEE, Engineering
(NUiCONE), 2011 Nirma University International Conference on8-10 Dec.
2011, 1 - 6

20

You might also like