SlideShare a Scribd company logo
An Energy Efficient Load Balancing Algorithm for Cloud
Computing Using Ant Colony Optimization
Submitted in Partial Fulfillment of the Requirements of the Degree of
Master of Technology
In
COMPUTER SCIENCE AND ENGINEERING
By
MOUSTAFA MOHAMAD NAJM
(Roll no. 147509)
Under the supervision of
Dr. S. RAVI CHANDRA
Assistant Professor
Computer Science and Engineering
Department Of Computer Science and Engineering
NATIONAL INSTITUTE OF TECHNOLOGY, WARANGAL
June 2016
2015-2016 Page i
Approval
This dissertation entitled
“An Energy Efficient Load Balancing Algorithm for Cloud Computing
Using Ant Colony Optimization”
by “MOUSTAFA MOHAMAD NAJM” is approved for the degree of
Master of Technology
Examiners
_________________
_________________
_________________
Supervisor
________________
_______________
_______________
Head of Department
________________
Date: ________________
Place: _______________
2015-2016 Page ii
Declaration
I declare that this written submission represents my ideas in my own words and where
others’ ideas or words have been included, I have adequately cited and referenced the original
sources. I also declare that I have adhered to all principles of academic honesty and integrity
and have not misrepresented or fabricated or falsified any ideas/data/fact/source in my
submission. I understand that any violation of the above sill be cause for disciplinary action
by the institute and can also evoke penal action from the sources which have thus not been
properly cited or from whom proper permission has not been taken when needed.
______________________
(Signature)
____MOUSTAFA MOHAMAD NAJM________
(Name of the student)
. 147509 .
(Roll No.)
Date: __________________
2015-2016 Page iii
NATIONAL INSTITUET OF TECHNOLOGY
(An Institution of National Importance)
DEPARTMENT OF COMPUTER SCIENCE & ENGINEERING
WARANGAL – 506004
TELANGANA – INDIA
June - 2016
Certificate
This is to certify that the dissertation work entitled “An Energy Efficient Load
Balancing Algorithm for Cloud Computing Using Ant Colony Optimization” is a
bonafide record of work carried out by “Mr. MOUSTAFA MOHAMAD NAJM (Roll No.
147509)”, submitted to the Department of Computer Science & Engineering, in partial
fulfillment of the requirements for the award of the degree of Master of Technology in
“Computer Science & Engineering” at National Institute of Technology, Warangal during
the academic year 2014-2016.
Dr. S.Ravichandra
Asst. Professor & Project Guide
Department of Computer Science &
Engineering
NIT Warangal
Dr. Ch. Sudhakar
Head of the Department
Department of Computer Science &
Engineering
NIT Warangal
2015-2016 Page I
ACKNOWLEDGEMENT
First and the foremost, I thank my creator (SWT) who has bestowed me health, and
knowledge to complete this study. Peace and blessing of Allah be upon His Prophet
(SAW).
I acknowledge and express deep sense of sincere gratitude to my supervisor, Dr. S.
Ravi Chandra, Department of Computer Science & Engineering, NIT Warangal, for his
patience, motivation, enthusiasm, and continuous support of my study and research. His
guidance helped me in all the time of research and writing of this thesis. It was great
experience working under his supervision. I am extremely grateful for what he has
offered me. I would also like to thank him for his friendship and empathy.
I sincerely thank Dr. Chapram Sudhakar, Head of Department of Computer
Science & Engineering for all his enormous support and insightful comments during my
M.Tech.
Special thanks also go to Prof. B. B. Amberkar who gave me invaluable
recommendation and warm encouragements.
It is my privilege to express my sincere thanks to all the faculty members of
Department of Computer Science & Engineering, NIT Warangal for their valuable
support and timely advice which helped me during my M.Tech in NIT Warangal.
Last but not the least I would like to express my wholehearted thanks to my beloved
parents for having faith in me and all my family members for their love, moral support,
prayers and encouragement throughout my life and thanks all my classmates and friends
who helped me directly or indirectly.
MOUSTAFA MOHAMAD NAJM
2015-2016 Page II
ABSTRACT
Improvement of energy efficiency in cloud computing is an important research
topic nowadays. The reduction of operational costs, generated heat and environment
impact are some of the reasons for this. A 2011 report by Greenpeace found that if global
cloud computing was a country; it would use the fifth most electricity in the world. It is
possible to improve energy efficiency in data centers by running various virtual machines
in a single physical machine. Then load balancing is needed to allocate VM’s to physical
machines. Proper load balancing can help in utilizing the available resources optimally,
thereby minimizing the resource utilization and power consumption as well. Moreover,
modern cloud computing environments have to provide high QoS for their customers
resulting in the necessity to deal with power-performance trade-off.
The objective of this research is to develop an Energy efficient load balancing
algorithm for VM allocation problem using ant colony optimization technique to
minimize energy consumption while providing required QoS for customers in
heterogeneous Environment. The proposed algorithm considers the trade-off between
energy consumption and performance and use current resource information and CPU
capacity factor to achieve the objectives. The proposed algorithm has been implemented
and evaluated by using CloudSim simulator which has been used in most researches
related to resource scheduling in cloud computing.
Keywords: Cloud Computing; Load Balancing; Energy Efficiency; Energy Consumption;
QoS; Resource Management; Virtualization; Virtual Machines Allocation; Ant Colony
Optimization.
2015-2016 Page III
Table of ContentsI
ABSTRACT...................................................................................................................II
Table Of Figures........................................................................................................ VI
Table of Tables......................................................................................................... VII
Table of Abbreviations............................................................................................ VIII
1. CHAPTER 1...........................................................................................................2
INTRODUCTION .....................................................................................................2
1.1. Introduction..................................................................................................................... 2
1.2. Definition of the problem................................................................................................ 4
1.3. Motivation....................................................................................................................... 4
1.4. Objectives........................................................................................................................ 6
1.4.1 Main objective......................................................................................................... 6
1.4.2 Specific objectives ................................................................................................... 6
1.5. Organization of Thesis..................................................................................................... 6
1.6. Conclusion ....................................................................................................................... 7
2. CHAPTER 2...........................................................................................................9
CLOUD COMPUTING.............................................................................................9
2.1 Introduction..................................................................................................................... 9
2.2 Cloud computing features............................................................................................... 9
2.3 Cloud Components........................................................................................................ 10
2.3.1 Clients........................................................................................................................... 10
2.3.2 Datacenter.................................................................................................................... 11
2.3.3 Distributed Servers....................................................................................................... 11
2.4 Essential Characteristics of cloud computing................................................................ 12
2.5 Cloud Service Model...................................................................................................... 13
2.6 Cloud Deployment Model ............................................................................................. 14
2.7 Virtualization ................................................................................................................. 15
2.8 Conclusion ..................................................................................................................... 16
2015-2016 Page IV
3. CHAPTER 3.........................................................................................................18
LITERATURE REVIEW........................................................................................18
3.1 Introduction................................................................................................................... 18
3.2 Load Balancing in cloud computing environment......................................................... 18
3.2.1 Goals of Load Balancing in cloud computing......................................................... 18
3.2.2 Related work to Load Balancing algorithms.......................................................... 19
3.3 Literature Review .......................................................................................................... 22
3.4 Conclusion ..................................................................................................................... 35
4. CHAPTER 4.........................................................................................................37
METHODOLOGY AND PROPOSED ALGORITHM ...........................................37
4.1 Introduction................................................................................................................... 37
4.2 Ant Colony Optimization algorithm............................................................................... 37
4.2.1 Ant In Nature......................................................................................................... 38
4.2.2 Ant Colony Optimization ....................................................................................... 39
4.2.3 Basic Steps for ACO ............................................................................................... 39
4.2.4 Advantages and disadvantages of ACO................................................................. 40
4.3 The Bin Packing Problem............................................................................................... 41
4.4 Proposed Energy Efficiency VM allocation based on ACO ............................................ 43
4.4.1 Problem Representation ....................................................................................... 43
4.4.2 System models and problem formulation............................................................. 45
4.4.3 The description of the proposed ant colony algorithm......................................... 47
4.4.4 Interquartile Range (IQR) method for finding dynamic threshold........................ 51
4.4.5 The complete proposed algorithm........................................................................ 52
4.5 Conclusion ..................................................................................................................... 58
5. CHAPTER 5.........................................................................................................60
SIMULATION AND EXPERIMENTAL RESULTS...............................................60
5.1 Introduction................................................................................................................... 60
5.2 Simulation Environment - CloudSim.............................................................................. 61
5.2.1 CloudSim Characteristics....................................................................................... 61
5.2.2 The CloudSim Platform.......................................................................................... 61
2015-2016 Page V
5.2.3 CloudSim Data Flow............................................................................................... 63
5.3 Simulation steps ............................................................................................................ 64
5.4 Simulation Classes ......................................................................................................... 64
5.5 Simulation Settings........................................................................................................ 65
5.3.1 System Mode......................................................................................................... 66
5.3.2 Workload Data....................................................................................................... 66
5.3.3 Simulation parameters.......................................................................................... 67
5.3 Evaluation and experimental results............................................................................. 68
5.3.1 Number of Active Hosts......................................................................................... 68
5.3.2 Energy Consumption ............................................................................................. 69
5.3.3 Quality of Service................................................................................................... 71
5.3.4 Energy and SLA Violations (ESV)............................................................................ 73
5.3.5 Execution Time ...................................................................................................... 75
5.4 Conclusion ..................................................................................................................... 76
6. CHAPTER 6.........................................................................................................78
CONCLUSION AND FUTURE WORK .................................................................78
6.1 Conclusion ..................................................................................................................... 78
6.2 Future Work .................................................................................................................. 79
REFERENCES .............................................................................................................80
2015-2016 Page VI
Table Of Figures
Figure ‎1-1 an example of VM placement in a virtualized environment.......................................... 5
Figure ‎2-1 three components make up a cloud computing solution............................................ 11
Figure ‎2-2 Cloud Computing Architecture..................................................................................... 13
Figure ‎2-3 Types of Clouds ............................................................................................................ 14
Figure ‎4-1 Adaptive behavior of ants............................................................................................ 39
Figure ‎4-2 Flowchart of ant colony optimization .......................................................................... 40
Figure ‎4-3 Packing under Next Fit ................................................................................................. 41
Figure ‎4-4 Packing under First Fit.................................................................................................. 42
Figure ‎4-5 Packing under Best Fit.................................................................................................. 42
Figure ‎4-6 Packing under Worst Fit............................................................................................... 42
Figure ‎4-7 Problem representation of VM Allocation................................................................... 44
Figure ‎4-8 Interquartile Range Threshold ..................................................................................... 52
Figure ‎4-9 Data Flow Diagram for proposed algorithm ................................................................ 57
Figure ‎5-1 Main Entities of CloudSim............................................................................................ 62
Figure ‎5-2 CloudSim Work Style.................................................................................................... 63
Figure ‎5-3 CloudSim data flow ...................................................................................................... 63
Figure ‎5-4 Number of Active Hosts ............................................................................................... 68
Figure ‎5-5 Energy Consumption.................................................................................................... 70
Figure ‎5-6 Average SLA Violation * 100 ........................................................................................ 72
Figure ‎5-7 Overall SLA Violation * 100 .......................................................................................... 73
Figure ‎5-8 Energy and SLA Violations............................................................................................ 74
Figure ‎5-9 Excution Time............................................................................................................... 75
2015-2016 Page VII
Table of Tables
Table ‎3-1 Load Balancing scenarios comparison........................................................................... 22
Table ‎5-1 configuration of servers................................................................................................. 66
Table ‎5-2 Power consumption of server at different load levels in watts .................................... 66
Table ‎5-3 Simulation parameters.................................................................................................. 67
Table ‎5-4 Number of Active Hosts................................................................................................. 68
Table ‎5-5 Energy Consumption ..................................................................................................... 70
Table ‎5-6 Average SLA Violation * 100.......................................................................................... 72
Table ‎5-7 Overall SLA Violation * 100 ........................................................................................... 73
Table ‎5-8 Energy and SLA Violations ............................................................................................. 74
Table ‎5-9 Excution Time ................................................................................................................ 75
2015-2016 Page VIII
Table of Abbreviations
ACO Ant Colony Optimization
CIS Cloud Information Service
COP Combinatorial Optimization Problem
CPU Central Processing Unit
HaaS Hardware as a Service
IQR Inter Quartile Range
IaaS Infrastructure as a Service
MIPS Million Instructions Per Second
PaaS Platform as a Service
PM Physical Machine
QoS Quality of Service
RAM Random Access Memory
SaaS Software as a Service
SI Swarm Intelligence
SLA Service Level Agreement
SOA Service-Oriented Architecture
VM Virtual Machine
VMP Virtual Machine Placement
2015-2016 Page 1
Chapter 1
INTRODUCTION
2015-2016 Page 2
1. CHAPTER 1
INTRODUCTION
1.1. Introduction
In recent years, cloud computing become a new computing model emerged from
the rapidly development of internet. It leads the new IT revolution. It saves businesses the
initial setup, updates and maintenance cost. cloud computing is a heterogeneous
environment which means different hardware characteristics including CPU, memory,
storage and other hardware that offers a rapidly and on-demand wide range of services in
which shared resources, information, software and other devices are provided according
to the clients requirement [1]. It has moved computing and data away from desktop and
portable PCs into large data centers [2]. It has the capability to harness the power of
Internet and wide area network (WAN) to use resources that are available remotely,
thereby providing cost effective solution to most of the real life requirements [2]. This
technology also enables on-demand or utility computing just-in-time resource
provisioning model in which computing resources such as CPU, memory, and disk space
are made available to applications only as needed and not allocated statically based on the
peak workload demand [3].
Energy optimization was identified as one of the major concern to adopt it in full-
fledged manner. Cloud computing infrastructure consumes enormous amount of electrical
energy due to a huge-scale infrastructure involved and AC cooling cost that causes very
high metered bills. For example, in 2006, the cost of electricity consumed by IT
infrastructures in US was estimated as $4.5 billion and tends to double by 2011 [3].
Moreover, studies have shown that data centers around the world consumed 201.8
terawatt hours (TWh) in 2010. This is enough energy to power 19 million average U.S.
households and results in approximately $23.3 billion spent for energy costs. Another
problem is significant CO2 emissions that contribute to the greenhouse effect.
One of the ways to reduce power consumption by a data center is to apply
virtualization technology. This technology provides a promising approach through which
2015-2016 Page 3
hardware resources on one or more machines can be divided through partial or complete
machine simulation, time-sharing, hardware and software partitioning into multiple
execution environments, each of which can act as a complete system. Virtualization
enables dynamic sharing of physical resources in cloud computing environments,
allowing multiple applications to run in different performance-isolated platforms called
VMs in a single physical server. On the other hand, it is essential for cloud providers to
offer reliable QoS for the customers that are negotiated in terms of Service Level
Agreements (SLA), such as minimal throughput and maximal response time or latency of
the system. Therefore, the main challenge is to reduce energy consumption of data
centers while satisfying QoS requirements.
While there are many VMs should be assigned to one physical node, VM
allocation and Load Balancing is needed. Load balancing is considered as one of the
challenges in cloud computing, it is the major factor to improve the performance of the
cloud computing and energy efficiency which is highly considered recently. The current
load balancing algorithms in cloud computing environment is not highly efficient,
because prediction of user request arrivals on the server is not possible. Each VM has
different specification, so it becomes a very difficult to schedule job and balance the load
among nodes and a distributed solution is required [6]. Load management in cloud data
centers must take into account the hardware diversity of hosts, heterogeneous user
requirements and energy consumption.
In this work, we propose a fully distributed VM allocation algorithm based on Ant
Colony Optimization (ACO) technique for dynamic allocation of VMs according to
current resources requirements, while ensuring reliable QoS. The objective of the
allocation is to minimize the number of physical nodes serving current workload,
whereas idle nodes are switched off in order to decrease power consumption. Recently,
we can find many research works that have been done on load balancing in cloud
computing using ACO, but most of these researches concentrated on improving
performance and QoS, some authors worked on power consumption and less works
considered heterogeneous environment. In contrast to previous studies, the proposed
2015-2016 Page 4
approach can effectively reduce the power consumption and handle strict QoS
requirements and heterogeneous infrastructure and heterogeneous VMs.
1.2. Definition of the problem
In cloud, virtualization technology is used for efficient management of resources.
This project focuses on the Infrastructure as a Service (IaaS) model in private cloud
where physical resources are exposed as services. Under this model, users request VM to
the cloud, which are then associated to physical resources. Number of VMs more than
physical resources. To achieve the best performance and reduce the consumed energy,
VMs have to fully utilize the physical resources by adapting to the cloud environment
dynamically, so our problem in this research is how to develop efficient Load Balancing
strategy to appropriately allocate the VMs in physical resources in heterogeneous cloud
computing.
The energy-efficient VM placement problem can be divided in two sub-problems.
The first one is the placement of a requested VM on a host, while the second one is the
optimization of the current VM placement. The focus of this work is the first one.
1.3. Motivation
In practice, powering-up a physical server without any CPU load, consumes more
than 50% of the energy consumed by a server with a fully loaded CPU. Therefore, an
energy efficient VM placement aims to reduce the number of active physical machines,
by increasing the workload in the current active machines. The idea is simple: if the
machine already has a work to do, increasing the amount of work will not increase the
power consumption of the data center significantly. However, waking up a new machine
will impact the power consumption of the data center more significantly, since a machine
in suspended state consumes a little fraction of the power of an active one. The strategy
used to place the VMs must be careful to not overload a host, since it is important to not
violate any Service-Level Agreements (SLAs) between the cloud provider and the client.
2015-2016 Page 5
Figure ‎1-1 an example of VM placement in a virtualized environment
For example, let us consider the situation depicted in Figure 1-1. We have seven
servers, each of which has a quad-core processor which is capable of executing four
VMs. The system is currently hosting seven virtual machines labeled VM1 to VM7.
Figure 1-1 (a) shows VM allocation in existing algorithm [8] where VM allocated to less
loaded server. Figure 1-1 (b) shows VM allocation in our proposed algorithm where VM
allocated to higest loaded server with considering threshold; a simple process for VM
placement is as follows: Place the first VM on the first server. Place the second virtual
VM on the same server if it can satisfy the resource requirements. If not, add a new
server and place the VM on this new server. Continue this procedure until each of the
VMs has been placed on a server, adding a new server when required. To consider QoS
and avoid overload the server, we can consider upper utilization threshold (e.g 90%). The
set of resulting servers at the end comprises the consolidated server farm. Finally the
number of servers required reduced from 7 down to 3.
For simplicity, we consider fixed threshold in this example. Anyway, the threshold in
our proposal will be calculated dynamically according to utilization information.
2015-2016 Page 6
1.4. Objectives
1.4.1 Main objective
The main objective of this research is to propose an energy efficient distributed
algorithm for VM allocation problem based on ACO technique to achieve power-
performance trade-off in heterogeneous private cloud computing environment.
1.4.2 Specific objectives
The specific objectives of this research are:
1. Study and analyze existing works for load balancing in cloud computing.
2. Study ACO technique, and related works that have been done by using this
technique to solve VM allocation problem.
3. Formulate VM allocation problem as optimization problem.
4. Propose an energy efficient load balancing algorithm based on ACO.
5. Propose an adaptive threshold method for QoS.
6. Implement the proposed algorithm using CloudSim simulator.
7. Evaluate the proposed algorithm using some metrics (e.g. energy consumption,
number of active hosts, QoS and execution time).
8. Compare the results of proposed algorithm with existing algorithm.
1.5. Organization of Thesis
The thesis is organized as follows:
 Chapter 1: This chapter describes the research problem and defines the research
objectives. Furthermore, it gives motivation toward the proposed solution.
 Chapter 2: This chapter gives an overview of cloud computing, which includes
the terminologies and technologies used in cloud computing.
 Chapter 3: This chapter studies and compares different load balancing techniques
in cloud computing. It also reviews recently works that have been done to solve
resource allocation problem in cloud computing based on ACO and discuses the
2015-2016 Page 7
advantages and disadvantages of each work. Furthermore, it focuses on some
works related to energy consumption and QoS in cloud computing.
 Chapter 4: This chapter describes proposed algorithm in details. First, it
describes ACO technique and models resources utilization and power
consumption in cloud computing. After that, it formulates VM allocation problem
as combinatorial problem and presents ACO based algorithm to solve this
problem. It describes also IQR method to calculate upper threshold dynamically
using utilization history. Finally, it shows the complete algorithm including
pseudo code and data flow diagram.
 Chapter 5: this chapter focuses on the simulation details and experimental results
using CloudSim.
 Chapter 6: This chapter describes the conclusion derived from the proposed
work and directions for future research work.
1.6. Conclusion
This chapter gives a brief idea about cloud computing and load balancing. It also
gives an overall idea about the research problem, main and specific objectives and
motivation for proposed solution.
2015-2016 Page 8
Chapter 2
CLOUD COMPUTING
2015-2016 Page 9
2. CHAPTER 2
CLOUD COMPUTING
2.1 Introduction
In case of cloud computing, services can be used from diverse and widespread
resources rather than remote servers or local machines. There is no standard definition of
cloud computing. Generally it consists of a bunch of distributed servers known as
masters, providing demanded services and resources to different clients known as clients
in a network with scalability and reliability of datacenter. The distributed computers
provide on-demand services. Services may be of software resources (e.g. SaaS) or
physical resources (e.g. PaaS) or hardware/infrastructure (e.g. HaaS or IaaS). Amazon
EC2 (Amazon Elastic Compute Cloud) is an example of cloud computing services [10].
The National Institute of Standards and Technology's (NIST) define a Cloud
computing as "cloud computing is a model for enabling ubiquitous, convenient, on-
demand network access to a shared pool of configurable computing resources (e.g.,
networks, servers, storage, applications and services) that can be rapidly provisioned and
released with minimal management effort or service provider interaction. "[4]
The cloud is a virtualization of resources that maintains and manages itself [11]. It
builds on a wide range of different computing technologies such as high-performance
computing, distributed systems, virtualization, storage, networking, security,
management and automation, SOA, SLA and QoS [12].
2.2 Cloud computing features
Cloud computing provides several features that make it attractive to IT industry,
such as: [4] [15].
 No up-front investment: The pricing model in cloud computing is based on a pay-
per-use principle. This model gives the client the ability to rent services and resources
from cloud as he needs.
2015-2016 Page 10
 Lowering operating cost: Cloud environment resources are allocated and de-
allocated on demand and this can provide a considerable saving in operating costs
since resources can be released when service demand is low.
 Scalability and Elasticity: The infrastructure providers have a large amount of
resources and infrastructure. So they can easily expand its service to handle the
growing service according to client demand. On the other hand, elasticity is the
ability to scale resources both up and down when required. Allowing the dynamic
integration and extraction of physical resources to the infrastructure. That’s mean
elasticity enables scalability.
 Easy access: The cloud services provided to users as a web-based services. So, they
can access the services through any devices supported with Internet connections.
 Reducing business risks and maintenance expenses: Shifts the business risks such
as hardware failures to infrastructure providers, because providers have better
expertise and resources to manage these risks.
 Virtualization: Virtualization hides a computing platform’s physical characteristics
from users; it allows abstraction and isolation of lower level functionalities and
underlying hardware.
 Mobility: Cloud Computing means mobility because users can access applications
through internet easily at any point of time.
2.3 Cloud Components
A Cloud system consists of 3 major components such as clients, datacenter, and
distributed servers. Each element has a definite purpose and plays a specific role.
2.3.1 Clients
End users interact with the clients to manage information related to the cloud. Clients
generally fall into three categories as given in [13]:
2015-2016 Page 11
 Mobile: Windows Mobile Smartphone, smartphones, like a Blackberry, or an iPhone.
 Thin: They don’t do any computation work. They only display the information.
Servers do all the works for them. Thin clients don’t have any internal memory.
 Thick: These use different browsers like IE or Mozilla Firefox or Google Chrome to
connect to the Internet cloud.
Now-a-days thin clients are more popular as compared to other clients because of
their low price, security, low consumption of power, less noise, easily replaceable and
repairable etc.
2.3.2 Datacenter
Datacenter is nothing but a collection of servers hosting different applications. An
end user connects to the datacenter to subscribe different applications. A datacenter may
exist at a large distance from the clients. Now-a-days a concept called virtualization is
used to install software that allows multiple instances of virtual server applications.
2.3.3 Distributed Servers
Distributed servers are the parts of a cloud which are present throughout the Internet
hosting different applications. But while using the application from the cloud, the user
will feel that he is using this application from its own machine.
Figure ‎2-1 three components make up a cloud computing solution
2015-2016 Page 12
2.4 Essential Characteristics of cloud computing
The Essential Characteristics of cloud computing are: [NIST Def]
 On-demand self-service: A consumer can unilaterally provision computing
capabilities, such as server time and network storage, as needed automatically without
requiring human interaction with each service provider.
 Broad network access: Capabilities are available over the network and accessed
through standard mechanisms that promote use by heterogeneous thin or thick client
platforms (e.g., mobile phones, tablets, laptops, and workstations).
 Resource pooling: The provider’s computing resources are pooled to serve multiple
consumers using a multi-tenant model, with different physical and virtual resources
dynamically assigned and reassigned according to consumer demand. There is a sense
of location independence in that the customer generally has no control or knowledge
over the exact location of the provided resources but may be able to specify location
at a higher level of abstraction (e.g., country, state, or datacenter). Examples of
resources include storage, processing, memory, and network bandwidth.
 Rapid elasticity: Capabilities can be elastically provisioned and released, in some
cases automatically, to scale rapidly outward and inward commensurate with demand.
To the consumer, the capabilities available for provisioning often appear to be
unlimited and can be appropriated in any quantity at any time.
 Measured service. Cloud systems automatically control and optimize resource use
by leveraging a metering capability at some level of abstraction appropriate to the
type of service (e.g., storage, processing, bandwidth, and active user accounts).
Resource usage can be monitored, controlled, and reported.
2015-2016 Page 13
2.5 Cloud Service Model
Cloud Computing can be delivered through such delivery models as follow:
 Infrastructure as a Service (IaaS):
This model of Cloud computing provide Hardware as a Service via Internet such as
storage, CPU and other. There are many IaaS providers such as Amazon Elastic Cloud
Compute (EC2), Rackspace [14] [15].
 Platform as a Service (PaaS):
Cloud computing provide a platform as a services that required for building
application, where user using tools and libraries for Cloud service providers, and also
consumers deployed their applications without costing of hardware where providers of
services provide the network, storage. There are many PaaS providers such as Google
App Engine, Windows Azure [14] [15].
 Software as a Service (SaaS):
Focus on providing different software hosted on the Cloud and usually referred to as
on-demand-software, where in this type of service, consumer will have to pay for usage
of software. Usually consumer access to the software via the Internet, therefore, user uses
the software don’t need any integration with other system [14] [15]. There are many SaaS
provider such as Google Apps, SalesForce.com as shown in Figure2.2 [4].
Figure ‎2-2 Cloud Computing Architecture
2015-2016 Page 14
2.6 Cloud Deployment Model
Based on the domain or environment in which clouds are used, clouds can be divided
into three types [4] [16]:
Figure ‎2-3 Types of Clouds
 Public clouds:
It’s a cloud in which service providers offer their resources as services to the
general public. Public clouds offer several key benefits to service providers, including
no initial capital investment on infrastructure and shifting of risks to infrastructure
providers. However, public clouds lack fine-grained control over data, network and
security settings, which hampers their effectiveness in many business scenarios.
 Private clouds:
Also known as internal clouds, private clouds are designed for exclusive use by a
single organization. A private cloud may be built and managed by the organization or
by external providers. A private cloud offers the highest degree of control over
performance, reliability and security. However, they are often criticized for being
similar to traditional proprietary server farms and do not provide benefits such as no
up-front capital costs.
2015-2016 Page 15
 Community clouds:
A community cloud is a collaborative effort in which infrastructure is shared
between several organizations from a specific community with common concerns
(security, compliance, jurisdiction, etc.), whether managed internally or by a third-
party and hosted internally or externally. The costs are spread over fewer users than a
public cloud (but more than a private cloud), so only some of the cost savings
potential of cloud computing are realized.
 Hybrid clouds:
A hybrid cloud is a combination of public and private cloud models that tries to
address the limitations of each approach. In a hybrid cloud, part of the service
infrastructure runs in private clouds while the remaining part runs in public clouds.
2.7 Virtualization
Virtualization separates resources and services from the underlying physical
delivery environment [15]. Virtualization is considered as a core of cloud computing
technologies and one of the most important technologies that enabled this paradigm
[16] [17]. Virtualization hides a computing platform’s physical characteristics from
users [16] [17]. It allows abstraction and isolation of lower level functionalities and
underlying hardware. This enables portability of higher level functions and sharing
and/or aggregation of the physical resources [18]. Virtualization means “something
which isn’t real”, but gives all the facilities of a real [6]. It is the software
implementation of a computer which will execute different programs like a real
machine [19]. Virtualization has three characteristics that make it very related with
cloud computing which are [15].
1- Partitioning:
By partitioning the available resources, many applications and operating systems
can run in a single physical system.
2- Isolation:
By isolation, each virtual machine can run in its host with others virtual machine
without effect on others. So, if one virtual instance failed, it doesn’t affect the other
virtual machines.
2015-2016 Page 16
3- Encapsulation:
A virtual machine encapsulated and stored as a single file, so a virtual machine
can be presented to an application as a complete entity without interfere with another
application.
2.8 Conclusion
In this chapter we give an overview about cloud computing. It’s a service oriented
environment. This cloud model is composed of five essential characteristics, three
service models, and four deployment models. We defined the cloud computing and its
characteristics and models. We also defined the virtualization; the key technology in
cloud and presented the benefits of virtualization in cloud computing.
2015-2016 Page 17
Chapter 3
LITERATURE REVIEW
2015-2016 Page 18
3. CHAPTER 3
LITERATURE REVIEW
3.1 Introduction
Resource allocation and load balancing for clouds has been studied very
extensively in the literature. The problem of deciding on an optimal assignment of
requests to resources allocator is NP-hard problem. Several heuristic algorithms have
been proposed by researchers for optimal allocation of cloud resources. ACO is a
heuristic algorithm inspired by the behavior of real ants for solving such problems, which
can be reduced to find good paths through graphs.
This chapter will review different load balancing techniques in cloud computing,
study recent scheduling researches based on ACO and discuses the advantages and
disadvantages of each research.
3.2 Load Balancing in cloud computing environment
It is a process of reassigning the total load to the individual nodes of the
collective system to make resource utilization effective and to improve the response time
of the job, simultaneously removing a condition in which some of the nodes are over
loaded while some others are under loaded. A load balancing algorithm which is dynamic
in nature does not consider the previous state or behavior of the system, that is, it depends
on the present behavior of the system. The important things to consider while developing
such algorithm are : estimation of load, comparison of load, stability of different system,
performance of system, interaction between the nodes, nature of work to be transferred,
selecting of nodes and many other ones. This load considered can be in terms of CPU
load, amount of memory used, delay or Network load.
3.2.1 Goals of Load Balancing in cloud computing
Load balancing in cloud computing provides an efficient solution to various
issues residing in cloud computing environment set-up and usage. Load balancing must
2015-2016 Page 19
take into account two major tasks, one is the resource provisioning or resource allocation
and other is task scheduling in distributed environment. Efficient provisioning of
resources and scheduling of resources as well as tasks will ensure [9].
a. Resources are easily available on demand.
b. Resources are efficiently utilized under condition of high/low load.
c. Energy is saved in case of low load (i.e. when usage of cloud resources is
below certain threshold).
d. Cost of using resources is reduced.
3.2.2 Related work to Load Balancing algorithms
Cloud is made up of massive resources. Management of these resources
requires efficient planning and proper layout. While designing an algorithm for resource
provisioning on cloud the developer must take into consideration different cloud
scenarios and must be aware of the issues that are to be resolved by the proposed
algorithm. Therefore, resource provisioning algorithm can be categorized into different
classes based upon the environment, purpose and technique of proposed solution.
3.2.2.1 Load Balancing on the basis of cloud environment
Cloud computing can have either static or dynamic environment based upon how
developer configures the cloud demanded by the cloud provider.
 Static Environment
In static environment the cloud provider installs homogeneous resources. Also the
resources in the cloud are not flexible when environment is made static. In this scenario,
the cloud requires prior knowledge of nodes capacity, processing power, memory,
performance and statistics of user requirements. These user requirements are not
subjected to any change at run-time. Algorithms proposed to achieve load balancing in
static environment cannot adapt to the run time changes in load. Although static
environment is easier to simulate, it is not well suited for heterogeneous cloud
environment.
2015-2016 Page 20
 Dynamic Environment
In dynamic environment the cloud provider installs heterogeneous resources. The
resources are flexible in dynamic environment. In this scenario cloud cannot rely on the
prior knowledge whereas it takes into account run-time statistics. The requirements of the
users are granted flexibility (i.e. they may change at run-time). Algorithm proposed to
achieve load balancing in dynamic environment can easily adapt to run time changes in
load. Dynamic environment is difficult to be simulated but is highly adaptable with cloud
computing environment.
3.2.2.2 Load Balancing based on spatial distribution of nodes
Nodes in the cloud are highly distributed. Hence the node that makes the provisioning
decision also governs the category of algorithm to be used. There can be three types of
algorithms that specify which node is responsible for balancing of load in cloud
computing environment.
 Centralized Load Balancing
In centralized load balancing technique all the allocation and scheduling decision are
made by a single node. This node is responsible for storing knowledge base of entire
cloud network and can apply static or dynamic approach for load balancing. This
technique reduces the time required to analyze different cloud resources but creates a
great overhead on the centralized node. Also the network is no longer fault tolerant in this
scenario as failure intensity of the overloaded centralized node is high and recovery
might not be easy in case of node failure.
 Distributed Load Balancing
In distributed load balancing technique, no single node is responsible for making
resource provisioning or task scheduling decision. There is no single domain responsible
for monitoring the cloud network instead multiple domains monitor the network to make
accurate load balancing decision. Every node in the network maintains local knowledge
base to ensure efficient distribution of tasks in static environment and re-distribution in
dynamic environment.
2015-2016 Page 21
 Hierarchical Load Balancing
Hierarchical load balancing involves different levels of the cloud in load balancing
decision. Such load balancing techniques mostly operate in master slave mode. These can
be modeled using tree data structure wherein every node in the tree is balanced under the
supervision of its parent node. Master or manager can use light weight agent process to
get statistics of slave nodes or child nodes. Based upon the information gathered by the
parent node provisioning or scheduling decision is made.
Table 3-1 compares different types of load balancing scenarios in cloud computing
environment.
Type Knowledge Base Issues to be addressed Usage Drawbacks
Static
Prior knowledge base
is required about each
node statistics and
user requirements.
Response time
Resource utilization
Scalability
Power consumption
Makespan
Throughput/Performance
Used in
homogeneous
environment.
Not Flexible
Not scalable
Not compatible
with changing
user requirements
as well as load
Dynamic
Run time statistics of
each node are
monitored to adapt to
changing load
requirements.
Location of processor to
which load is transferred
by an overloaded
processor.
Transfer of task to a
remote machine.
Load estimation.
Limiting the number of
migrations.
Throughput
Used in
heterogeneous
environment.
Complex
Time Consuming
Centralized
Single node or server
is responsible for
maintaining the
statistics of entire
network and updating
it from time to time.
Threshold policies
Throughput
Failure Intensity
Communication between
central server and
processors in network.
Associated Overhead
Useful in small
networks with
low load.
Not fault tolerant
Overloaded
central decision
making node
2015-2016 Page 22
Distributed
All the processors in
the network
responsible
for load balancing
store their own local
database (e.g. MIB) to
make efficient
balancing decisions.
Selection of processor
that take part in load
balancing.
Migration time
Interprocessor
communication
Information exchange
Throughput
Fault tolerance
Useful in large
and
heterogeneous
environment.
Algorithm
complexity
Communication
overhead
Hierarchical
Nodes at different
levels of hierarchy
communicate with the
nodes below them to
get information about
the network
performance.
Threshold policies
Information exchange
criteria Selection of
nodes at different levels
of network Failure
intensity Performance
Migration time
Useful in
medium or
large size
network with
heterogeneous
environment.
Less fault tolerant
Complex
Table ‎3-1 Load Balancing scenarios comparison
3.3 Literature Review
Now we will study and analyze previous works which have been done for load
balancing in cloud computing using ACO. For each work we will describe the
propose solution, then analyze advantages and disadvantages of this solution.
 Ant colony Optimization a Solution of Load balancing in cloud 2012 [20]
Ratan Mishra et al. proposed heuristic algorithm based on ant colony
optimization “MACO” to initiate the service load distribution under cloud computing
architecture. The objective of this paper is to develop an effective load balancing
algorithm using Ant colony optimization technique to maximize or minimize different
performance parameters like CPU load, Memory capacity, Delay or network load for
the clouds of different sizes. Author has discussed how the mobile agents can balance
the load of a cloud using the concept of ACO and proposed an approach for updating
pheromone table. The limitation of this technique is that it will be more efficient if
it’s combined with clustering. Author proposed “Active clustering” technique works
on the principle of grouping similar nodes together and working on these groups.
2015-2016 Page 23
Advantages:
1- The advantage of using MACO is that it is more likely to establish connections
through multiple paths to help balance the load but does not increase the routing
overhead.
2- This modification supports to minimize the make span of the cloud computing
based services (makespan is the time difference between the start and finish of a
sequence of jobs or tasks).
3- Portability of servicing the request also has been converged using the ant colony
optimization technique.
Disadvantages:
1- This technique does not consider the fault tolerance issues.
2- This approach for updating pheromone is only appropriate for routing in
symmetric networks.
3- Less efficient due to the absence of cluster in cloud solution.
4- No simulation or comparison with other algorithms.
 Load Balancing of Nodes in Cloud Using Ant Colony Optimization 2012 [21]
Kumar Nishant et al. proposed an efficient algorithm for load balancing of
nodes in cloud environment. The standard ACO algorithm is modified in the way that
ants continue to update a single result set rather than updating their own result set. In
this algorithm a Regional Load Balancing Node (RLBN) is elected to act as a head
node. Other ants consider head node as the root; which means they will update the
single result set obtained from the head node. In this approach, once head node is
elected; doesn’t mean that now it is permanent. Selection can be reset if the past
selection stops functioning efficiently due to some inappropriate conditions.
Advantages:
1- Under loaded node is found at the beginning.
2- New head node can be elected if previous nodes stop functioning properly.
3- The ant updated the single result set rather than updating their own result set.
2015-2016 Page 24
Disadvantages:
1- Network over head due to large number of ants.
2- Points of initiation of ants and number of ants are not clear.
3- Choice of head node is crucial.
4- Nodes status change after ants visit to them is not considered.
5- Only availability of node is being considered, while there are other factors that
should be taken into consideration.
6- Full replication of data.
 Effective Scheduling Algorithm for Load balancing using Ant Colony
Optimization in Cloud Computing 2014 [22]
Shagufta Khan et al. proposed and implemented SALB algorithm, an
improvement version of the Ant Colony Optimization. They have modified the
concept of ACO in term of movement of the ant that is in both forward direction and
backward direction and the way in which ants create pheromone table that contains
the information about all nodes and its corresponding load. The goal of this study is to
balance the node with efficiency & maximum utilization of resources. This algorithm
is efficient in finding the overloaded node in minimum time. It also improves the
performance in terms of throughout, response time and energy consumption.
Advantages:
1- Efficient to finding the overloaded node in minimum time
2- Balance the node with efficiency and maximum utilization of resources.
3- Achieve good results in terms of throughout, response time, less energy
consumption.
Disadvantages:
1- better performance is the need of this algorithm by varying different parameters
2- Two types of pheromone.
2015-2016 Page 25
 Cloud Task scheduling based on Load Balancing Ant Colony Optimization
2011.[23]
Kun Li et al. proposed the LBACO algorithm (Load Balancing Ant Colony
Optimization) to find the optimal resource allocation for each task in the dynamic
cloud system. The main contribution of this work is to balance the entire system load
while trying to minimize the makespan of a given tasks set. The new scheduling
strategy was simulated using CloudSim toolkit package. Experiments results showed
that proposed LBACO algorithm outperformed FCFS (First Come First Serve) and
the basic ACO.
Advantages:
1- Nodes are balanced dynamically.
Disadvantages:
1- Authors assume that all Tasks are mutually independent, i.e., there is no
precedence constraint between tasks, that’s not general case.
2- They assume that tasks are computationally intensive, which is not realistic for
cloud systems.
3- It doesn’t consider heterogeneity of system
 A Load Balancing Mechanism Based on Ant Colony and Complex Network
Theory in Open Cloud Computing Federation 2010 [24]
Zehua Zhang et al. proposed a load balancing mechanism based on ant colony
and complex network theory in open cloud computing federation. An open cloud
computing federation (OCCF) consists of many cloud computing service provider’s
(CCSP) facilities. The proposal mechanism in this paper aims to cope with the
complex and dynamic load balancing problem in OCCF. This mechanism improves
many aspects of the related Ant Colony algorithms which proposed to realize load
balancing in distributed system. The characteristic (small-world and scale-free) of
Complex Network have been taken into consideration.
2015-2016 Page 26
Advantages:
1- Overcome heterogeneous of the cloud computing facilities.
2- Adaptive to the dynamic environments in the OCCF.
3- Excellent in fault tolerance.
4- Good scalability.
Disadvantages:
1- Overhead increases during run time environment.
2- Poor response time.
3- An Ant encounters dead state at the end due to lack of synchronization of
Ants.
 Intelligent Strategy of Task Scheduling in Cloud Computing for Load
Balancing- 2013 [25]
Arabi E. keshk et al. proposed MACOLB algorithm (Modified Ant Colony
Optimization for Load Balancing) for cloud task scheduling. They use MACOLB
algorithm to find the optimal resource allocation for tasks in the dynamic cloud
system to minimize the makespan of tasks on the entire system and increase the
performance by balancing the load of the system. The load balancing factor, related to
the job finishing rate, is proposed to make the job finishing rate at different resource
being similar and the ability of the load balancing improved. The proposed
scheduling strategy was simulated using CloudSim. Experimental results showed that
MACOLB algorithm decreases the degree of imbalancing between VMs and
increases the overall performance.
Advantages:
1- MACOLB decreases the degree of imbalancing between available VMs.
2- Increase the overall performance.
Disadvantages:
1- Tasks are mutually independent i.e., there is no precedence constraint between
tasks.
2015-2016 Page 27
 Cloud Task Scheduling Based on Ant Colony Optimization 2015 [26]
Medhat Tawfeek et al. proposed cloud task scheduling policy based on ACO for
allocation of incoming jobs to VMs. The main goal of this algorithm is minimizing
the makespan of a given tasks set to help in utilizing the available resources
optimally, minimize the resource consumption and achieve a high user satisfaction.
They compared the proposed approach with different scheduling algorithms; First
Come First Served (FCFS) and Round-Robin (RR). Algorithms have been simulated
using CloudSim toolkit package. Experimental results showed that cloud task
scheduling based on ACO outperformed FCFS and RR algorithms.
Advantages:
1- Considerable reduction in task completion time.
2- Dynamic task allocation.
Disadvantages:
1- Tasks are mutually independent.
2- Tasks are not preemptive and they cannot be interrupted or moved to another
processor during their execution.
3- The same resource and VM would be over utilized, since ants would converge to
first available position.
 ACO-LB Algorithm for Task Scheduling in the Cloud Environment 2014 [27]
Shengjun Xue et al. proposed a ACO-LB (Load balancing optimization algorithm
based on ACO) to solve the load imbalance of VMs in the process of task scheduling.
ACO-LB will not only shorten the makespan of task scheduling, but also maintain the
load balance of VMs in the data center. This work considered dependent tasks and
workflow model with priority constraints using DAG (Directed Acyclic Graph). This
algorithm can adapt to the dynamic cloud environment. ACO-LB has been simulated
in CloudSim and the results show that it can efficiently provide appropriate resources
for tasks and improve the utilization rate of resources.
2015-2016 Page 28
Advantages:
1- ACO-LB algorithm has better performance and load balancing ability.
2- ACO-LB considers the dependency between tasks.
Disadvantages:
1- This paper only presents one workflow model with single structure and
correlation to verify the advantages of the ACO-LB algorithm.
2- This paper only considers minimizing the execution time of tasks and ignores the
cost problem existing in reality.
 A New Approach to Ant Colony to Load Balancing in Cloud Computing
Environment 2015 [28]
Hamid Mehdi proposed a modification for ACO. The main aim of the proposed
algorithm is efficient in finding the overloaded node and load balancing in lowest
time. The proposed method associated with concept of ACO promotion in connection
with movement of the ant which is in both forward and backward direction. The ant
use two types of pheromone for its movement these are:
 Foraging Pheromone (FP) - Generally ACO uses foraging pheromones to
explore new food sources. In this algorithm the ant would lay down foraging
pheromone after encountering under loaded nodes to search overloaded nodes.
 Trailing Pheromone (TP) - In a typical ACO the ant uses trailing pheromone
to discover its path back to the nest. However, in this algorithm the ants would
use this to find its path to the under loaded node after encountering overloaded
Node.
The aim is to balance the node with efficiency & maximum utilization of
resource. The algorithm is simulated in CloudSim. The results show that the proposed
algorithm improves the performance in terms of throughout, response time.
Advantages:
1- Ant moves in both directions.
2- Achieve efficiency & maximum utilization of resources.
2015-2016 Page 29
Disadvantages:
1- More storage required for pheromone.
2- This algorithm didn’t consider the energy related issues.
 Balancing throughput and response time in online scientific Clouds via Ant
Colony Optimization 2015 [29]
Elina Pacini et al. described and evaluated a Cloud scheduler based on ACO.
The goal of this work is to study private Clouds to execute scientific experiments
coming from multiple users. This work focuses on IaaS model where custom VM are
launched in appropriate hosts available in a Cloud. In this scheduler, the load is
calculated on each host taking into account the CPU utilization made by all the VMs
that are executing on each host. The main performance metrics are the number of
serviced users by the cloud, the total number of created VMs in online (non-batch)
scheduling scenarios and the number of intra-cloud network messages sent. Simulated
experiments performed using CloudSim and job data from real scientific problems
show that proposed scheduler succeeds in balancing the studied metrics compared to
schedulers based on Random assignment and Genetic Algorithms.
Advantages:
1- Describe a two-level Cloud scheduler.
2- Address an online Cloud scenario.
3- Balancing the number of serviced users in a cloud and the total number of created
VMs.
4- Use an exponential back-off strategy to retry allocating failing VMs.
Disadvantages:
1- High network consumption.
2- This work didn’t consider heterogeneous physical resources.
3- The algorithm didn’t consider Energy consumption.
2015-2016 Page 30
 Energy Efficient Allocation of Virtual Machines in Cloud Data Centers 2010 [30]
Anton Beloglazov and Rajkumar Buyya proposed an efficient resource
management policy for virtualized Cloud data centers to minimize energy
consumption, while providing reliable QoS. The heuristic approach presented in this
paper use technique derived, from the Best Fit Decreasing algorithm. The goal is to
place each migrating VM on the server that minimizes the overall power consumption
of the data center. They also proposed and evaluated heuristics for dynamic
reallocation of VMs. The obtained results show that the technique of dynamic
reallocation of VMs and switching off the idle servers brings substantial energy
savings and is applicable to real-world Cloud data centers.
Advantages:
1- Reducing energy consumption.
2- Handling QoS requirements.
3- Considering heterogeneous infrastructure and heterogeneous VMs.
4- They do not depend on a particular type of workload and do not require any
knowledge about applications executing on VMs.
Disadvantages:
1- This is deterministic and centralized algorithm whose efficiency deteriorates as
the size of the data center grows and suffers from scalability and fault tolerance
issues.
2- mapping strategies may require the concurrent migration of many VMs, which
can cause considerable performance degradation during the reassignment process
3- Consider only CPU utilization as a resource for reallocation decisions.
 Energy-Aware Ant Colony Based Workload Placement in Clouds 2011 [31]
In this work Eugen Feller et al. modeled the VM allocation problem as an
instance of the multidimensional bin-packing (MDBP) problem considering many
resources (i.e., CPU cycles, CPU cores, RAM size, network bandwidth and disk size).
They presented workload resource demand estimation approach to minimize the
2015-2016 Page 31
amount of performance degradation and designed a novel, nature-inspired workload
consolidation algorithm based on ACO to compute the placement dynamically
according to the current load. In order to improve the performance a multithreaded
version of the ACO-based workload consolidation algorithm was developed. The
ultimate goal of this work is to minimize the amount of hosts, thus increasing the
average utilization of each host. The proposed algorithm was evaluated by comparing
it with one frequently applied greedy algorithm (i.e., FFD). Simulation results
demonstrated that ACO outperforms the evaluated greedy algorithm as it achieves
superior energy gains through better server utilization and requires fewer machines.
Moreover, it computes solutions which are nearly optimal.
Advantages:
1- This was the first work to apply ACO on the MDBP and consider many resources.
2- Minimize the number of machines.
Disadvantages:
1- They assume a homogeneous environment in which all physical machines have
the same capacity.
2- The algorithm requires the prior knowledge about all the workload.
3- This approach is also implemented in a centralized manner.
4- Maximum energy gain is 5.88%.
5- They didn’t consider QoS and risk of SLA violation.
 Energy Aware Virtual Machine Placement scheduling in Cloud Computing
Based on Ant Colony Optimization Approach 2014 [32]
Xiao-Fang Liu et al. proposed an approach based on ACO to solve the Virtual
Machine Placement Problem (VMP), named as ACO-VMP, so as to effectively use
the physical resources and to reduce the number of running physical servers. The
number of physical servers is the same as the number of the VMs at the beginning.
Then the ACO approach tries to reduce the physical server one by one. Experimental
results compared with the ones obtained by the first-fit decreasing (FFD) algorithm
2015-2016 Page 32
show that ACO-VMP can solve VMP more efficiently to reduce the number of
physical servers significantly, especially when the number of VMs is large.
Advantages:
1- Reduce Energy consumption by reducing the number of physical servers.
Disadvantages:
1- All servers are homogeneous.
2- They only consider CPU and memory resources.
3- They didn’t consider the QoS for customers.
 Energy-efficient virtual machine placement in data centers with heterogeneous
requirements 2014 [33]
Xiangming Dai et al. focused in this paper on reducing the power consumption
of data centers in public cloud environments by exploring two greedy approximation
algorithms: the minimum power VM placement algorithm (MinPow); that attempts to
decrease the power consumption by avoiding powering up unnecessarily additional
servers and the minimum communication virtual machine placement algorithm (Min
Com); that aims at packing one user's VMs as much as possible on the same server or
under the same rack to decrease the networking energy cost. The performance of
these two algorithms has been evaluated and compared to other alternatives in both
small scale and large scale clusters. Results showed that MinPow and MinCom yield
placements that are within 5% to 10% energy consumption of the optimal solution.
Advantages:
1- Heterogeneous Environment.
2- They consider power consumed by Network Devices in large scale Data Center.
3- The proposed Algorithms are near to optimal solution.
Disadvantages:
1- Central algorithm.
2- Proposed algorithms are designed only to reduce energy while they ignore the
effects on QoS for customers.
2015-2016 Page 33
 An Energy Efficient Virtual Machine Consolidation in Cloud Computing 2015
[34]
Jayshri Damodar Pagare et al. proposed a VMs consolidation approach to
consider the trade-off between energy consumption and performance. The most
important contributions of this paper are as follows: 1) Proposing an efficient
algorithm which finds and decides overloaded host with SLA violation 2) Proposing
an efficient algorithm for finding underutilized hosts. 3) Combine two proposed
algorithms as VM consolidation algorithm to get better results in both power
consumption and SLA violation. The overload detection finds overloaded host and
get the status of it whether it result in SLA Violation or not. If there is no SLA
violation then no migration required which saves power required to migrate VMs. But
if there is SLA violation then place all the VMs from this host to other hosts until the
host becomes under load. Proposed algorithms have been implemented and evaluated
using CloudSim simulator. Simulation results showed improvement in energy
consumption.
Advantages:
1- The algorithm reduces SLA violation and energy consumption.
2- It reduces number of migrations by trigger migration only if overload host
generates SLA violation host.
3- This work considers heterogeneous environment.
Disadvantages:
1- They concentrate on rebalancing the load but they didn’t mention the initial
allocation algorithm.
2- Long execution time.
 Power Efficient Resource Allocation for Clouds Using Ant Colony Framework
2011 [35]
Lskrao Chimakurthi et al. presented an energy efficient mechanism for adaptive
resource allocation in cloud computing environments for hosting the applications with
given QoS requirements as throughput and response time. This algorithm reduces the
2015-2016 Page 34
power consumption of data center resources by considering the dynamic loads of
servers using different ant agents.
Advantages:
1- It’s very flexible mechanism that can be extended with improvements
2- It considers dynamic loads of servers.
Disadvantages:
1- There are many types of agents.
2- They didn’t evaluate the proposed mechanism.
3- They didn’t include the load prediction and usage models so this mechanism can’t
be applied to real cloud environments.
 An ACO-based Scheduling Strategy on Load Balancing in Cloud Computing
Environment 2015 [36]
Wei-Tao Wen et al. proposed ACO-VMM; a novel distributed VM migration
strategy based on ACO. In ACO-VMM Strategy, local migration agent autonomously
monitors the resource utilization and launches the migration. At monitoring stage, it
takes both the previous and current system condition into account to avoid
unnecessary migrations. Besides, it adopts two different traversing strategies for ants,
Positive and Negative Traversing, in order to find the near-optimal mapping
relationship between VMs and PMs. The proposed strategy is evaluated by using
CloudSim. Experimental results showed that ACO-VMM achieves load balancing
and reasonable resource utilization, which outperforms the existing migration
strategies in terms of number of VM migrations and number of SLA violations.
Advantages:
1- This algorithm reduces number of migrations.
2- It takes the memory utilization and the bandwidth condition into account.
3- High reliability and scalability.
4- It considers heterogeneous Environment.
Disadvantages:
1- Threshold has a fixed value.
2015-2016 Page 35
3.4 Conclusion
After the literature review, we came to conclude that scheduling and load
balancing is challenging task in cloud computing and it’s very important research area
now-a-days. Many of the existing approaches nowadays still ignore the
multidimensional character of the problem. Also, many researches adopted VM
allocation strategy in centralized manner. However, one of the main limitations of all
current cloud management frameworks next to their high degree of centralization is
that they do not provide any advanced energy-aware workload consolidation policies.
Energy consumption has become substantial issues in cloud computing recently and it
should be considered in load balancing. Only some algorithms consider energy
consumption during solving the load balancing problem; the main idea of these
algorithms is to set upper and lower utilization thresholds and keep the total CPU
utilization of a node between them by using Live Migration. However, Most
researches set static threshold, which is not suitable for heterogeneous environment
and dynamic load.
2015-2016 Page 36
Chapter 4
METHODOLOGY AND PROPOSED ALGORITHM
2015-2016 Page 37
4. CHAPTER 4
METHODOLOGY AND PROPOSED ALGORITHM
4.1 Introduction
Swarm Intelligence techniques are increasingly used to solve optimization
problems, and thus they result good alternatives to achieve the goals proposed in this
work. SI is a discipline that deals with natural and artificial systems composed of many
individuals that coordinate themselves using decentralized control and self-organization.
Examples of systems that studied by SI are ants’ colonies. The advantage of these
techniques derives from their ability to explore solutions in large search spaces in a very
efficient way along with little initial information. Moreover, using SI techniques is an
interesting approach to cope in practice with the NP-completeness of job scheduling. In
this chapter we will explain briefly the methods used in this work; ACO then we will
apply this method to solve the VM allocation problem. Besides that, to ensure QoS for
customers, proposed adaptive threshold using IQR method which will be shown later on
in this chapter. Finally, the complete algorithm will be presented including pseudo code
and data flow diagram.
4.2 Ant Colony Optimization algorithm
Ant Colony Optimization “ACO” is one example of SI techniques. It is a meta-
heuristic algorithm with efficient local search for combinatorial problems. It’s a general
framework that can be used to create a specific algorithm to solve a specific graph path
problem. ACO imitates the behavior of real ant colonies in nature to search for food and
to connect to each other by pheromone laid on paths traveled. Many researches use ACO
to solve NP-hard problems such as traveling salesman problem, graph coloring problem,
vehicle routing problem, and so on. Although ACO was proposed in a 1992 doctoral
thesis by M. Dorigo, the first detailed description of the algorithm is generally attributed
to a 1996 follow-up paper by M. Dorigo, V. Maniezzo and A. Colorni. Since then, ACO
has been widely studied and modified.
2015-2016 Page 38
4.2.1 Ant In Nature
Ant Colony Optimization (ACO) [29, 30] is a meta-heuristic inspired by the
observation of real ant colonies and based upon their collective foraging behavior [26].
Ants are social insects and live in colonies. Their behavior is governed by the goal of
colony survival. When searching for food, ants frequently travel between their nest and
food sources. At the beginning, ants explore the area surrounding their nest in a random
manner. While moving, ants deposit special substances called pheromones along their
paths. Ants can smell pheromones. When choosing their way, they tend to choose, in
probability, paths marked by strong pheromone concentrations. As soon as an ant finds a
food source, it evaluates the quantity and the quality of the food and carries some of it
back to the nest. During the return trip, the quantity of pheromones that an ant leaves on
the ground may depend on the quantity and quality of the food. The pheromone trails will
guide other ants to the food source. However, if over time ants do not visit a certain path,
pheromone trails start to evaporate, thus reducing their attractive strength. The more the
time an ant needs to travel down the path and back again, the less the pheromone trails
are reinforced. The indirect communication between the ants via pheromone trails
enables them to find the shortest paths between their nest and food sources. From an
algorithmic point of view, the pheromone evaporation process is useful for avoiding the
convergence to a local optimum solution.
Fig. 4-1 shows two possible paths from the nest to the food source, but one of them is
longer than the other one. Fig. 4-1(a) shows how ants will start moving randomly at the
beginning to explore the ground and then choose one of two paths. The ants that follow
the shorter path will naturally reach the food source before the others ants, and in doing
so the former group of ants will leave behind them a pheromone trail. After reaching the
food, the ants will turn back and try to find the nest. Moreover, the ants that perform the
round trip faster strengthen more quickly the quantity of pheromone in the shorter path,
as shown in Fig. 4-1(b). The ants that reach the food source through the slower path will
find attractive to return to the nest using the shortest path. Eventually, most ants will
choose the left path as shown in Fig.4-1(c).
2015-2016 Page 39
Figure ‎4-1 Adaptive behavior of ants
4.2.2 Ant Colony Optimization
The above behavior of real ants has inspired ACO. One of its main ideas is exploiting
the indirect communication among the individuals of an ant colony. ACO employs
pheromone trails as a kind of distributed numerical information which is modified by ants
to reflect their accumulated experience while solving a particular problem. At each
execution step, ants compute a set of feasible moves and select the best one (according to
some probabilistic rules) to carry out all the tour. The transition probability for moving
from a place to another is based on the heuristic information and pheromone trail level of
the move. The higher the value of the pheromone and the heuristic information, the more
profitable it is to select this move and resume the search.
4.2.3 Basic Steps for ACO
Algorithm: Basic Steps for ACO
1. Initialize the pheromone
2. While criteria not satisfied, then repeat
3. Initially set locations of all ants on an entry state
4. Selection of next state
5. While not reached to the final state then repeat from step 4, if reached then Step 6.
6. Pheromone stages (deposit, daemon and evaporate pheromone)
7. Check whether criteria satisfied or not, if satisfied then end, if not then repeat from
step 2.
8. End.
2015-2016 Page 40
Figure ‎4-2 Flowchart of ant colony optimization
4.2.4 Advantages and disadvantages of ACO
4.2.4.1 ACO Advantages
1- Inherent Parallelism.
2- Used in dynamic application.
3- Positive feedback leads to rapid discovery of good solutions.
4- Distributed computation avoids premature convergence.
5- The greedy heuristic helps find acceptable solution in the early solution in the early
stages of the search process.
6- The collective interaction of a population of agents.
4.2.4.2 ACO Disadvantages
1- Theoretical analysis is difficult.
2- Sequence of random decision (not independent).
3- Probability distribution changes by iteration.
4- Research is experimental rather than theoretical.
5- Time of convergence uncertain.
2015-2016 Page 41
4.3 The Bin Packing Problem
Definition: Given a list of objects and their weights, and a collection of bins of
fixed size, find the smallest number of bins so that all of the objects are assigned to a bin.
Bin packing is an NP-hard combinatorial optimization problem, based on the partition
problem. Finding the optimal solution is known to be exponentially difficult. One
solution methodology is to formulate the problem as an integer programming problem.
The run-time performance of traditional exact methods, such as branch and bound,
degrade as the problem size increases, however. In order to handle larger problems,
heuristic methods have been developed. Some of the more popular algorithms are given
in the following discussion.
 Next Fit Heuristic (BP-NF). Place the items in the order in which they arrive. Place
the next item into the current bin if it fits. If it does not, close that bin and start a new
bin.
Example:
Given the set of items S = {4, 8, 5, 1, 7, 6, 1, 4, 2, 2} and bins of size 10, pack the
items into as few bins as possible using Next Fit. The results of using the Next fit
algorithm are shown in the figure below.
Figure ‎4-3 Packing under Next Fit
 First Fit Heuristic (BP-FF). Place the items in the order in which they arrive. Place
the next item into the lowest numbered bin in which it fits. If it does not fit into any
open bin, start a new bin.
Example:
Given the set of items S = {4, 8, 5, 7, 6, 1, 4, 2, 2, 1} and bins of size 10, pack the
items into as few bins as possible using First Fit. The solution is shown here.
2015-2016 Page 42
Figure ‎4-4 Packing under First Fit
 Best Fit Heuristic (BP-BF): The general idea is to obtain the best global packing by
getting the best local packing of individual bins. Place the items in the order in which
they arrive. Place the next item into that bin which will leave the least room left over
after the item is placed in the bin. If it does not fit in any bin, start a new bin.
Example:
Given the set of items S = {4, 8, 5, 1, 7, 6, 1, 4, 2, 2} and bins of size 10, pack the
items into as few bins as possible using Best Fit.
Figure ‎4-5 Packing under Best Fit
In this example, it turns out that the packings for BP-FF and BP-BF are the same.
 Worst Fit Heuristic (BP-WF): Place the items in the order in which they arrive.
Place the next item into that bin which will leave the most room left over after the
item is placed in the bin. If it does not fit in any bin, start a new bin.
Example:
Given the set of items S = {4, 8, 5, 1, 7, 6, 1, 4, 2, 2} and bins of size 10, pack the
items into as few bins as possible using Worst Fit.
Figure ‎4-6 Packing under Worst Fit
2015-2016 Page 43
4.4 Proposed Energy Efficiency VM allocation based on ACO
To find the optimal solution of a VM allocation problem is NP-hard [Jung et al.,
2010], therefore it is interesting to use heuristics instead of calculating the exact solution,
for efficiency reasons, since a slow algorithm would not be interesting in real data centers
receiving several requests to allocate new VMs at every second. To efficiently and
dynamically manage the VM resources, in this section, we first present VM allocation
problem. Then the problem is formulated as a combinatorial optimization problem
(COP). After that we come up with the solution for this problem using ACO based
approach to reduce Energy consumption while providing desirable QoS for customers.
The motivation of using ACO is that the VMP is formulated as a COP while ACO has
been widely accepted as a promising approach to solve various COPs.
ACO algorithm can be applied to any combinatorial problem as far as it is possible to
define:
1. Problem representation represents the problem as a graph which allows ants to
incrementally build/ modify solutions.
2. A constraint satisfaction method which forces the construction of feasible
solutions.
3. The heuristic desirability η of edges.
4. A pheromone updating rule which specifies how to modify pheromone trail τ
on the edges of the graph.
5. A probabilistic transition rule of the heuristic desirability and of pheromone
trail.
4.4.1 Problem Representation
A cloud data center consists of a large number of heterogeneous PMs with
different resource capacities. At any given time, a cloud data center usually serves many
simultaneous users and as a result, VMs with different resource capacities are created on
PMs. Several VMs may be deployed into a PM, and the number of the VMs in each PM
can be different from each other. However, an VM can be allocated to only one PM.
2015-2016 Page 44
Let:
P = {P1, P2, . . . , PM} be the set of all the PMs in a data center, where M is the
number of PMs and Pj, ∀j = 1, . . . , M represents the j-th PM.
V = {V1, V2, . . . , VN} be the set of all the virtual machines in a data center,
where N is the number of VMs and Vi, ∀i= 1, . . . , N represents the i-th VM.
The problem is represented as a graph G= (K, E) where the set of nodes K
represents the PMs and VMs and the set of edges E the connections between the host and
VM as shown in Figure 4-3. All ants are placed at the starting Hosts randomly. During an
iteration ants build solutions to the VM allocation problem by moving from one host to
another until they complete a tour (all VMs have been allocated). Each ant represents one
VM. Iterations are indexed by t, 1< t < tmax, where tmax is the maximum number of
iterations allowed.
Figure ‎4-7 Problem representation of VM Allocation
2015-2016 Page 45
4.4.2 System models and problem formulation
In a cloud environment, we have a pool of server nodes with applications running
on them. Suppose that the cluster is fully virtualized and all the applications are running
on VMs. The problem of VM placement across a pool of server nodes is related to the
multidimensional vector packing problems. Dimensions in the packing problem are
resource utilizations. For simplicity, we consider CPU and Memory resources. If two
VMs are running on the same server, the CPU and Memory utilization of the server is
estimated as the sum of the CPU and Memory utilizations of the two VMs For example,
let (25%, 30%) be a CPU and memory request of one VM, and (35%, 40%) be that of
another VM, the utilizations of a server accommodating the two VMs are estimated at
(60%, 70%). To prevent CPU usage of a server from reaching 100%, we have to impose
an upper bound on resource utilization of a single server with some threshold value. The
main idea behind this is that 100% utilization can cause severe performance degradation
and VM live migration technology consumes some amount of CPU processing capability
on the migrating node.
4.4.2.1 Resource utilization model
Resources of physical server are consumed by VMs which are allocated on this
server. So, we can represent the resource utilization as sum of the resource demand of all
VMs allocated to this server.
𝑈𝑐𝑗 = (𝑥𝑖𝑗
𝑛
𝑖=1
. 𝑉𝑐𝑖 ) 4.1
𝑈𝑚𝑗 = (𝑥𝑖𝑗
𝑛
𝑖=1
. 𝑉 𝑚𝑖 ) 4.2
When 𝑉𝑐𝑖 and 𝑉 𝑚𝑖 are CPU and memory demand of VMi (1≤i≤N). xij is binary variable
indicates if VMi is assigned to server j or not. 𝑈𝑐𝑗 and 𝑈𝑚𝑗 represent the current CPU
and Memory utilization of server j.
2015-2016 Page 46
4.4.2.2 Power consumption model
The power consumed by a physical server comes from CPU, memory and storage
systems. Recent studies show that the power consumption of servers can be accurately
described by a linear relationship between the power consumption and CPU utilization.
In order to save energy, servers are turned off when they are idle. Hence, their idle power
is not part of the total energy consumption. Finally, we defined the power consumption of
the jth
server as a function of the CPU utilization as shown in Eq. 4.3.
𝑝𝑗
𝑖𝑑𝑙𝑒
+ 𝑝𝑗
𝑏𝑢𝑠𝑦
− 𝑝𝑗
𝑖𝑑𝑙𝑒
× 𝑈𝐶𝑗 ,𝑈𝑐𝑗 >0 4.3
0 otherwise
Where Pidle is the power consumed by an idle server, Pbusy is the power consumed by
a fully loaded server. Ucj represent the CPU utilization of server j. Real data shows that
typically Pidle is around 0.6 x Pbusy, and is hardly lower than 0.5 x Pbusy.
4.4.2.3 Problem formulation
Next, we formalize the VM placement optimization problem, suppose that we are
given N VMs (applications) i ∈ I that are to be placed on M servers j ∈ J. For simplicity,
we consider only CPU and memory resources. Each physical server j (1≤j≤M) has CPU
capacity 𝑝𝑐𝑖 and memory capacity 𝑝 𝑚𝑖 . Let Tc j, Tm j be the threshold of CPU and
memory utilization associated with jth
server respectively. 𝑈𝑐𝑗 and 𝑈𝑚𝑗 represent the
CPU and memory that have been used by all the VMs deposited on server j. We use two
binary variables xij and yj. The binary variable xij indicates if VMi is assigned to server j
and the binary variable yj indicates whether server j is in use (yj=1) or not (yj=0). The goal
is to find the allocations of the VMs on physical servers such that the power consumed by
all the equipments is minimized and resources are highly utilized. We assume that none
of the VMs requires more resources than can be provided by a single server. The
placement problem can therefore be formulated as:
Pj =
2015-2016 Page 47
The objective function:
𝑀𝑖𝑛𝑖𝑚𝑖𝑧𝑒 𝑝 = 𝑝𝑗 = [𝑦𝑗
𝑚
𝑗=1
𝑀
𝑗=1 × 𝑝𝑗
𝑏𝑢𝑠𝑦
− 𝑝𝑗
𝑖𝑑𝑙𝑒
× 𝑈𝑐𝑗 + 𝑝𝑗
𝑖𝑑𝑙𝑒
] 4.4
Where p is the total power consumed by all servers included in the solution. Eq. 4.4
means the less power consumed, the solution is better.
Constraints:
Subject To:
𝑥𝑖𝑗
𝑚
𝑖=1
= 1 ∀ 𝑖 ∈ 𝐼 4.5
𝑥𝑖𝑗 ≤ 𝑦𝑗 ∀ 𝑖 ∈ 𝐼, 𝑗 ∈ 𝐽 4.6
𝑈𝑐𝑗 ≤ 𝑇𝑐𝑗 ∀ 𝑗 ∈ 𝐽 4.7
𝑈𝑚𝑗 ≤ 𝑇 𝑚𝑗 ∀ 𝑗 ∈ 𝐽 4.8
𝑦𝑗 , 𝑥𝑖𝑗 ∈ [0,1] ∀ 𝑖 ∈ 𝐼, 𝑗 ∈ 𝐽 4.9
Constraint (4.5) assigns a VMi to one and only one of the servers. Constraint (4.6) if any
VMi is allocated to a server j, then the status of the server j must be on. Constraints (4.7)
and (4.8) model the capacity constraint of the server. Constraint (4.9) defines the domain
of the variables of the problem.
Given a set of N VMs and a set of M PMs, there are a total of M N
possible VM
placement solutions. It is therefore typically impractical to make a complete enumeration
of all possible solutions to find the best solutions. The following shows how to apply an
ACO algorithm to efficiently search for good solutions in large solution spaces.
4.4.3 The description of the proposed ant colony algorithm
All ACO algorithms adapt the algorithm scheme explained next. After initializing the
pheromone trails and control parameters, a main loop is repeated until a stopping
criterion is met (e.g., a certain number of iterations to perform or a given time limit
without improving the result). In this loop, ants construct feasible solutions and update
the associated pheromone trails. Furthermore, partial problem solutions are seen as nodes
2015-2016 Page 48
(an abstraction for the location of an ant); each ant starts to travel from a random node
and moves from a node i to another node j of the partial solution. At each step, the ant k
computes a set of feasible solutions to its current node and moves according to a
probability distribution.
4.4.3.1 Probabilistic Decision Rule
For an ant k the probability pk
ij to move from a node i to a node j is:
Where:
Ƞij is the attractiveness of the move as computed by some heuristic information
indicating a prior desirability of that move.
Ʈij is the pheromone trail level of the move, indicating how profitable it has been in
the past to make that particular move (it represents therefore a posterior indication
of the desirability of that move).
𝛼 and 𝛽 are two parameters which determine the relative influence of the
pheromone trail and the heuristic information, The role of the parameters 𝛼 and 𝛽
is the following. If 𝛼 = 0, the heuristic is used for selection. If 𝛽 = 0, only
pheromone trial is at work.
allowed k is the set of active servers that still have sufficient resources to host VMi
𝑎𝑙𝑙𝑜𝑤𝑒𝑑 𝐾 =
𝑗 (( 𝑥𝑗𝑘 . 𝑉𝑐 𝑘 + 𝑉𝑐𝑖) ≤ 𝑇𝑐𝑗 ) ^𝑖−1
𝑘=1
(( 𝑥𝑗𝑘 . 𝑉𝑚 𝑘 + 𝑉𝑚𝑖) ≤ 𝑇𝑚𝑗 )𝑖−1
𝑘=1
𝑦𝑗 = 1, ∀ 𝑗
4.11
4.10
2015-2016 Page 49
The higher the pheromone value and the heuristic information, the more profitable it is to
include j in the partial solution.
The initial pheromone level is a positive integer Ʈ0. In nature, there is not any pheromone
on the ground at the beginning (i.e., Ʈ0 =0). However, the ACO algorithm requires Ʈ0 > 0,
otherwise the probability to chose the next state would be pk
ij = 0 and the search process
would stop from the beginning.
An ant selects a server according to the rule as follow:
𝑗 = arg 𝑚𝑎𝑥 𝑠 ∈𝑎𝑙𝑙𝑜𝑤𝑒𝑑𝐾
𝑝 𝑖𝑗
𝑘
𝑖𝑓𝑞 ≤ 𝑞0
𝐽, 𝑜𝑡ℎ𝑒𝑟𝑤𝑖𝑠𝑒
4.12
When q0 (0≤q0≤1) is a parameter, q (0≤q≤1) is a random number. 𝑎𝑙𝑙𝑜𝑤𝑒𝑑𝐾 is the set
of servers that still have sufficient resources to host VMi. J is a random number selected
according to probability distribution calculated by Eq. 4.10 above. This selection way can
increase the randomness to avoid local optimum.
4.4.3.2 Heuristic Information
The heuristic information is important in the solution construction. It represents
the desirability to assign VMi to server j. Good heuristic information guides the ants to
move targeted. It’s related to the improvement that VMi can contribute to improve the
objective function by selecting the server j that will be utilized the most by placing the
VM in it to achieve higher resource utilization and as a result reduce number of physical
servers and reduce energy consumption. We should mention here that we already
consider the QoS by assign upper threshold and keep utilization under this threshold.
Mathematically; the heuristic information of placing VMi on Sj can be calculated as:
𝜂 𝑖, 𝑗 =
1
𝑇𝐶 𝑗 −(𝑈𝐶 𝑗 + 𝑉𝑐𝑖) + 𝑇𝑚 𝑗 −(𝑈𝑚 𝑗 + 𝑉𝑚𝑖 )
𝑖𝑓 𝑆𝑗 ∈ 𝑎𝑙𝑙𝑜𝑤𝑒𝑑 𝑘 4.13
0 𝑜𝑡ℎ𝑒𝑟𝑤𝑖𝑠𝑒
Where Tcj and Tmj represent the CPU and memory upper threshold of server Si. Uci
and Umi represent the CPU and memory that has been used of Server j. 𝑉𝑐𝑖 and 𝑉𝑚𝑖
represent CPU and memory demands of current VM.
2015-2016 Page 50
4.4.3.3 Pheromone trail update
The ants communicate indirectly through the pheromone information. One may
consider. There are two different pheromone structures: one that associates a pheromone
trail with every movement VM-Server, or one that associates a pheromone trail with
every pair of VMs. In this work, the first way of laying pheromone trails is used, i.e., the
pheromone trail τ i j will be defined as the favorability of packing VMi into Server j.
The pheromone update comprises local update and global update. Local pheromone
update is followed by an ant that has finished building its solution, the local pheromone is
update as:
𝜏 𝑖, 𝑗 = 1 − 𝜌 . 𝜏 𝑖, 𝑗 + 𝜌. 𝜏0 4.14
The global pheromone updating is applied after the best current solution is found. It
increases the pheromone value on hosts in the best solution. In this way, the algorithm
can converge faster. The pheromone deployed on Sj in the current best solution is
updated as:
𝜏 𝑖, 𝑗 = (1 − 𝜀). 𝜏 𝑖, 𝑗 + 𝜀. ∆𝜏(𝑖, 𝑗) 4.15
Where:
∆𝜏(𝑖, 𝑗) Represents additional added pheromone
∆𝜏 𝑖, 𝑗 =
1
𝑃(𝑠)
4.16
Where P(s) is the normalized power consumption of the solution S. and its value is
calculated according to the following equation:
𝑃 𝑠 =
𝑃𝑗
𝑝 𝑗
max
𝑀
𝑗=1 4.17
Normally, the quantity of the added pheromone depends on the quality of the solution.
2015-2016 Page 51
4.4.4 Interquartile Range (IQR) method for finding dynamic threshold
The interquartile range (IQR) is a measure of statistical dispersion of data and an
estimate of variability, based on dividing a data set into quartiles. It is also called as
middle fifty and midspered. It is the difference between the upper and lower quartile in a
data set.
In this work; to find utilization upper threshold, we will use historical data from the
resource usage by VMs For decision making about when a host must be considered as an
overloaded host and We use Interquartile Range (IQR) method to design an adaptive
utilization threshold method.
IQR=Q3 - Q1 4.18
Where Q1 and Q3 are the 25th
percentile and 75th
percentile respectively of a sorted
set. Then the upper threshold for host Hi is found by Eq. 4.19.
UpTht=1 – sp. IQR 4.19
Where sp ∈ R+
is a parameter of the method that defines how aggressively the
system consolidates VMs is. In other words, the parameter sp allows the adjustment
of the safety of the method, the lower sp, the less the energy consumption, but the
higher the level of SLA violations caused by the allocation. Here value for sp is 1.5.
Steps for finding Interquartile Range based threshold:
1. Sort the data set in increasing order.
2. Find the median for the ordered set.
3. Divide the data set into two halves.
4. Find the median for the first half of the ordered data set (Lower Quartile Q1).
5. Find the median for the second half of the ordered data set (Upper Quartile Q3).
6. IQR = Upper Quartile – Lower Quartile.
7. UpTht=1 – sp. IQR
Here data set defines set of the host utilization.
2015-2016 Page 52
Example:
Let us assume the utilization of each host (in terms of percentage).
List of host utilization [70,62,64,72,63,64,81,77,81,76]
1. After sorting [62 , 63 , 64 , 64 , 70 , 72 , 76 , 77 , 81 , 81]
2. Median = (70+72) / 2 =71
3. First half [62 , 63 , 64 , 64 , 70], Second half [72 , 76 , 77 , 81 , 81]
4. Median of the first half =64, which is Q1.
5. Median of Second half = 77, which is Q2.
6. IQR= 77 – 64 = 13
7. UpThr= 1 – 1.5 (0.77-0.64) = 1 – 0.195 = 0.805 = 80.5 %
Figure ‎4-8 Interquartile Range Threshold
4.4.5 The complete proposed algorithm
In Algorithm.1 each ant works independently and tries to find best allocation for
VMs with regarding to energy consumption. Each ant constructs a solution Sk and after
find the solution, it will update the local pheromone. When all ants finish, their solutions
will be evaluated to find the best solution. Evaluation will be according to number of
active servers and energy consumption; the less the servers used and the less the energy
consumed, the better solution. Then, apply global pheromone update to the servers of best
solution. Repeat this procedure while stop criteria is not reached; here stop criteria is
equal to max number of iterations. Every iteration finds a best solution and compares
with previous best solution. Finally, after NI; number of iterations, the algorithm returns
the best solution which represents the best VMs allocation.
2015-2016 Page 53
Algorithm 1. ACO-based Allocation Algorithm
Input: Hosts : List of servers with capacity constraint
VMs : List of VMs with resource demand
Set of parameters.
Output: VM Allocation
/*Initialization*/
1. Set the value of the parameters
2. Initialize all the pheromone values of all hosts to Ʈ0
/*Iterative Loop*/
3. For n= 1 to NI (number of iterations) do
4. For K=1 to Nant (number of ants) do
/* Construct a solution */
5. Sk=AntK.constructSolution(VMs, Hosts)
6. Local pheromone updating
7. End For /* number of ants */
/* Evaluation */
8. Evaluate each solution Sk by calculating objective function value
9. Select the best solution /* which consume less energy */
10. Global pheromone update
11. End For /*number of iteration */
12. Return bestSolution
Algorithm.2 shows how an ant constructs a solution. Each ant starts with a set of
servers including one random server at the beginning. An ant allocates virtual machines
one by one to this server while it is suitable for resource requirements. If not, turn on a
new server and allocate the VM on it. A server is suitable for VM if it has a free amount
of processing power and memory under threshold greater than or equal to that of required
by the unallocated VM. If the active server set Sk contains more than one server that are
suitable for VM then the ant choose the server with highest defined probability and
allocate VM to it.
final
final
final
final
final
final
final
final
final
final
final
final
final
final
final
final
final
final
final
final
final
final
final
final
final
final
final
final
final
final

More Related Content

Similar to final

MOHAMMED OVAIZ_Resume -Industry
MOHAMMED OVAIZ_Resume -IndustryMOHAMMED OVAIZ_Resume -Industry
MOHAMMED OVAIZ_Resume -Industry
Mohammed Ovaiz
 
Data Veracity Proofs in Cloud Storage Space
Data Veracity Proofs in Cloud Storage SpaceData Veracity Proofs in Cloud Storage Space
Data Veracity Proofs in Cloud Storage Space
Association of Scientists, Developers and Faculties
 
Optimize Virtual Machine Placement in Banker Algorithm for Energy Efficient C...
Optimize Virtual Machine Placement in Banker Algorithm for Energy Efficient C...Optimize Virtual Machine Placement in Banker Algorithm for Energy Efficient C...
Optimize Virtual Machine Placement in Banker Algorithm for Energy Efficient C...
Association of Scientists, Developers and Faculties
 
Data Science Case Study: Wireless sensor network mathematical Models
Data Science Case Study: Wireless sensor network mathematical ModelsData Science Case Study: Wireless sensor network mathematical Models
Data Science Case Study: Wireless sensor network mathematical Models
Sandeep Sharma IIMK Smart City,IoT,Bigdata,Cloud,BI,DW
 
An Approach to Reduce Energy Consumption in Cloud data centers using Harmony ...
An Approach to Reduce Energy Consumption in Cloud data centers using Harmony ...An Approach to Reduce Energy Consumption in Cloud data centers using Harmony ...
An Approach to Reduce Energy Consumption in Cloud data centers using Harmony ...
ijccsa
 
An Approach to Reduce Energy Consumption in Cloud data centers using Harmony ...
An Approach to Reduce Energy Consumption in Cloud data centers using Harmony ...An Approach to Reduce Energy Consumption in Cloud data centers using Harmony ...
An Approach to Reduce Energy Consumption in Cloud data centers using Harmony ...
neirew J
 
ENERGY EFFICIENT VIRTUAL MACHINE ASSIGNMENT BASED ON ENERGY CONSUMPTION AND R...
ENERGY EFFICIENT VIRTUAL MACHINE ASSIGNMENT BASED ON ENERGY CONSUMPTION AND R...ENERGY EFFICIENT VIRTUAL MACHINE ASSIGNMENT BASED ON ENERGY CONSUMPTION AND R...
ENERGY EFFICIENT VIRTUAL MACHINE ASSIGNMENT BASED ON ENERGY CONSUMPTION AND R...
IAEME Publication
 
Power consumption prediction in cloud data center using machine learning
Power consumption prediction in cloud data center using machine learningPower consumption prediction in cloud data center using machine learning
Power consumption prediction in cloud data center using machine learning
IJECEIAES
 
Automated LiveMigration of VMs
Automated LiveMigration of VMs Automated LiveMigration of VMs
Automated LiveMigration of VMs
Akhila Chatlapalle
 
MOHAMMED OVAIZ_Resume_Faculty_Chennai
MOHAMMED OVAIZ_Resume_Faculty_ChennaiMOHAMMED OVAIZ_Resume_Faculty_Chennai
MOHAMMED OVAIZ_Resume_Faculty_Chennai
Mohammed Ovaiz
 
Resume of Swaminathan - Master’s in Electrical Engineering, Power Systems
Resume of Swaminathan - Master’s in Electrical Engineering, Power SystemsResume of Swaminathan - Master’s in Electrical Engineering, Power Systems
Resume of Swaminathan - Master’s in Electrical Engineering, Power Systems
Swamy Chandrasekaran
 
Adaptive Computing Seminar Report - Suyog Potdar
Adaptive Computing Seminar Report - Suyog PotdarAdaptive Computing Seminar Report - Suyog Potdar
Adaptive Computing Seminar Report - Suyog Potdar
Suyog Potdar
 
A survey to harness an efficient energy in cloud computing
A survey to harness an efficient energy in cloud computingA survey to harness an efficient energy in cloud computing
A survey to harness an efficient energy in cloud computing
ijujournal
 
A SURVEY: TO HARNESS AN EFFICIENT ENERGY IN CLOUD COMPUTING
A SURVEY: TO HARNESS AN EFFICIENT ENERGY IN CLOUD COMPUTINGA SURVEY: TO HARNESS AN EFFICIENT ENERGY IN CLOUD COMPUTING
A SURVEY: TO HARNESS AN EFFICIENT ENERGY IN CLOUD COMPUTING
ijujournal
 
A SURVEY: TO HARNESS AN EFFICIENT ENERGY IN CLOUD COMPUTING
A SURVEY: TO HARNESS AN EFFICIENT ENERGY IN CLOUD COMPUTINGA SURVEY: TO HARNESS AN EFFICIENT ENERGY IN CLOUD COMPUTING
A SURVEY: TO HARNESS AN EFFICIENT ENERGY IN CLOUD COMPUTING
ijujournal
 
A SURVEY: TO HARNESS AN EFFICIENT ENERGY IN CLOUD COMPUTING
A SURVEY: TO HARNESS AN EFFICIENT ENERGY IN CLOUD COMPUTINGA SURVEY: TO HARNESS AN EFFICIENT ENERGY IN CLOUD COMPUTING
A SURVEY: TO HARNESS AN EFFICIENT ENERGY IN CLOUD COMPUTING
ijujournal
 
An energy optimization with improved QOS approach for adaptive cloud resources
An energy optimization with improved QOS approach for adaptive cloud resources An energy optimization with improved QOS approach for adaptive cloud resources
An energy optimization with improved QOS approach for adaptive cloud resources
IJECEIAES
 
Intelligent task processing using mobile edge computing: processing time opti...
Intelligent task processing using mobile edge computing: processing time opti...Intelligent task processing using mobile edge computing: processing time opti...
Intelligent task processing using mobile edge computing: processing time opti...
IAESIJAI
 
Generation of electricity through speed breaker mechanism(AVANTHI CLG MAKAVAR...
Generation of electricity through speed breaker mechanism(AVANTHI CLG MAKAVAR...Generation of electricity through speed breaker mechanism(AVANTHI CLG MAKAVAR...
Generation of electricity through speed breaker mechanism(AVANTHI CLG MAKAVAR...
Aditya Guna
 
Energy-Aware Adaptive Four Thresholds Technique for Optimal Virtual Machine P...
Energy-Aware Adaptive Four Thresholds Technique for Optimal Virtual Machine P...Energy-Aware Adaptive Four Thresholds Technique for Optimal Virtual Machine P...
Energy-Aware Adaptive Four Thresholds Technique for Optimal Virtual Machine P...
IJECEIAES
 

Similar to final (20)

MOHAMMED OVAIZ_Resume -Industry
MOHAMMED OVAIZ_Resume -IndustryMOHAMMED OVAIZ_Resume -Industry
MOHAMMED OVAIZ_Resume -Industry
 
Data Veracity Proofs in Cloud Storage Space
Data Veracity Proofs in Cloud Storage SpaceData Veracity Proofs in Cloud Storage Space
Data Veracity Proofs in Cloud Storage Space
 
Optimize Virtual Machine Placement in Banker Algorithm for Energy Efficient C...
Optimize Virtual Machine Placement in Banker Algorithm for Energy Efficient C...Optimize Virtual Machine Placement in Banker Algorithm for Energy Efficient C...
Optimize Virtual Machine Placement in Banker Algorithm for Energy Efficient C...
 
Data Science Case Study: Wireless sensor network mathematical Models
Data Science Case Study: Wireless sensor network mathematical ModelsData Science Case Study: Wireless sensor network mathematical Models
Data Science Case Study: Wireless sensor network mathematical Models
 
An Approach to Reduce Energy Consumption in Cloud data centers using Harmony ...
An Approach to Reduce Energy Consumption in Cloud data centers using Harmony ...An Approach to Reduce Energy Consumption in Cloud data centers using Harmony ...
An Approach to Reduce Energy Consumption in Cloud data centers using Harmony ...
 
An Approach to Reduce Energy Consumption in Cloud data centers using Harmony ...
An Approach to Reduce Energy Consumption in Cloud data centers using Harmony ...An Approach to Reduce Energy Consumption in Cloud data centers using Harmony ...
An Approach to Reduce Energy Consumption in Cloud data centers using Harmony ...
 
ENERGY EFFICIENT VIRTUAL MACHINE ASSIGNMENT BASED ON ENERGY CONSUMPTION AND R...
ENERGY EFFICIENT VIRTUAL MACHINE ASSIGNMENT BASED ON ENERGY CONSUMPTION AND R...ENERGY EFFICIENT VIRTUAL MACHINE ASSIGNMENT BASED ON ENERGY CONSUMPTION AND R...
ENERGY EFFICIENT VIRTUAL MACHINE ASSIGNMENT BASED ON ENERGY CONSUMPTION AND R...
 
Power consumption prediction in cloud data center using machine learning
Power consumption prediction in cloud data center using machine learningPower consumption prediction in cloud data center using machine learning
Power consumption prediction in cloud data center using machine learning
 
Automated LiveMigration of VMs
Automated LiveMigration of VMs Automated LiveMigration of VMs
Automated LiveMigration of VMs
 
MOHAMMED OVAIZ_Resume_Faculty_Chennai
MOHAMMED OVAIZ_Resume_Faculty_ChennaiMOHAMMED OVAIZ_Resume_Faculty_Chennai
MOHAMMED OVAIZ_Resume_Faculty_Chennai
 
Resume of Swaminathan - Master’s in Electrical Engineering, Power Systems
Resume of Swaminathan - Master’s in Electrical Engineering, Power SystemsResume of Swaminathan - Master’s in Electrical Engineering, Power Systems
Resume of Swaminathan - Master’s in Electrical Engineering, Power Systems
 
Adaptive Computing Seminar Report - Suyog Potdar
Adaptive Computing Seminar Report - Suyog PotdarAdaptive Computing Seminar Report - Suyog Potdar
Adaptive Computing Seminar Report - Suyog Potdar
 
A survey to harness an efficient energy in cloud computing
A survey to harness an efficient energy in cloud computingA survey to harness an efficient energy in cloud computing
A survey to harness an efficient energy in cloud computing
 
A SURVEY: TO HARNESS AN EFFICIENT ENERGY IN CLOUD COMPUTING
A SURVEY: TO HARNESS AN EFFICIENT ENERGY IN CLOUD COMPUTINGA SURVEY: TO HARNESS AN EFFICIENT ENERGY IN CLOUD COMPUTING
A SURVEY: TO HARNESS AN EFFICIENT ENERGY IN CLOUD COMPUTING
 
A SURVEY: TO HARNESS AN EFFICIENT ENERGY IN CLOUD COMPUTING
A SURVEY: TO HARNESS AN EFFICIENT ENERGY IN CLOUD COMPUTINGA SURVEY: TO HARNESS AN EFFICIENT ENERGY IN CLOUD COMPUTING
A SURVEY: TO HARNESS AN EFFICIENT ENERGY IN CLOUD COMPUTING
 
A SURVEY: TO HARNESS AN EFFICIENT ENERGY IN CLOUD COMPUTING
A SURVEY: TO HARNESS AN EFFICIENT ENERGY IN CLOUD COMPUTINGA SURVEY: TO HARNESS AN EFFICIENT ENERGY IN CLOUD COMPUTING
A SURVEY: TO HARNESS AN EFFICIENT ENERGY IN CLOUD COMPUTING
 
An energy optimization with improved QOS approach for adaptive cloud resources
An energy optimization with improved QOS approach for adaptive cloud resources An energy optimization with improved QOS approach for adaptive cloud resources
An energy optimization with improved QOS approach for adaptive cloud resources
 
Intelligent task processing using mobile edge computing: processing time opti...
Intelligent task processing using mobile edge computing: processing time opti...Intelligent task processing using mobile edge computing: processing time opti...
Intelligent task processing using mobile edge computing: processing time opti...
 
Generation of electricity through speed breaker mechanism(AVANTHI CLG MAKAVAR...
Generation of electricity through speed breaker mechanism(AVANTHI CLG MAKAVAR...Generation of electricity through speed breaker mechanism(AVANTHI CLG MAKAVAR...
Generation of electricity through speed breaker mechanism(AVANTHI CLG MAKAVAR...
 
Energy-Aware Adaptive Four Thresholds Technique for Optimal Virtual Machine P...
Energy-Aware Adaptive Four Thresholds Technique for Optimal Virtual Machine P...Energy-Aware Adaptive Four Thresholds Technique for Optimal Virtual Machine P...
Energy-Aware Adaptive Four Thresholds Technique for Optimal Virtual Machine P...
 

final

  • 1. An Energy Efficient Load Balancing Algorithm for Cloud Computing Using Ant Colony Optimization Submitted in Partial Fulfillment of the Requirements of the Degree of Master of Technology In COMPUTER SCIENCE AND ENGINEERING By MOUSTAFA MOHAMAD NAJM (Roll no. 147509) Under the supervision of Dr. S. RAVI CHANDRA Assistant Professor Computer Science and Engineering Department Of Computer Science and Engineering NATIONAL INSTITUTE OF TECHNOLOGY, WARANGAL June 2016
  • 2. 2015-2016 Page i Approval This dissertation entitled “An Energy Efficient Load Balancing Algorithm for Cloud Computing Using Ant Colony Optimization” by “MOUSTAFA MOHAMAD NAJM” is approved for the degree of Master of Technology Examiners _________________ _________________ _________________ Supervisor ________________ _______________ _______________ Head of Department ________________ Date: ________________ Place: _______________
  • 3. 2015-2016 Page ii Declaration I declare that this written submission represents my ideas in my own words and where others’ ideas or words have been included, I have adequately cited and referenced the original sources. I also declare that I have adhered to all principles of academic honesty and integrity and have not misrepresented or fabricated or falsified any ideas/data/fact/source in my submission. I understand that any violation of the above sill be cause for disciplinary action by the institute and can also evoke penal action from the sources which have thus not been properly cited or from whom proper permission has not been taken when needed. ______________________ (Signature) ____MOUSTAFA MOHAMAD NAJM________ (Name of the student) . 147509 . (Roll No.) Date: __________________
  • 4. 2015-2016 Page iii NATIONAL INSTITUET OF TECHNOLOGY (An Institution of National Importance) DEPARTMENT OF COMPUTER SCIENCE & ENGINEERING WARANGAL – 506004 TELANGANA – INDIA June - 2016 Certificate This is to certify that the dissertation work entitled “An Energy Efficient Load Balancing Algorithm for Cloud Computing Using Ant Colony Optimization” is a bonafide record of work carried out by “Mr. MOUSTAFA MOHAMAD NAJM (Roll No. 147509)”, submitted to the Department of Computer Science & Engineering, in partial fulfillment of the requirements for the award of the degree of Master of Technology in “Computer Science & Engineering” at National Institute of Technology, Warangal during the academic year 2014-2016. Dr. S.Ravichandra Asst. Professor & Project Guide Department of Computer Science & Engineering NIT Warangal Dr. Ch. Sudhakar Head of the Department Department of Computer Science & Engineering NIT Warangal
  • 5. 2015-2016 Page I ACKNOWLEDGEMENT First and the foremost, I thank my creator (SWT) who has bestowed me health, and knowledge to complete this study. Peace and blessing of Allah be upon His Prophet (SAW). I acknowledge and express deep sense of sincere gratitude to my supervisor, Dr. S. Ravi Chandra, Department of Computer Science & Engineering, NIT Warangal, for his patience, motivation, enthusiasm, and continuous support of my study and research. His guidance helped me in all the time of research and writing of this thesis. It was great experience working under his supervision. I am extremely grateful for what he has offered me. I would also like to thank him for his friendship and empathy. I sincerely thank Dr. Chapram Sudhakar, Head of Department of Computer Science & Engineering for all his enormous support and insightful comments during my M.Tech. Special thanks also go to Prof. B. B. Amberkar who gave me invaluable recommendation and warm encouragements. It is my privilege to express my sincere thanks to all the faculty members of Department of Computer Science & Engineering, NIT Warangal for their valuable support and timely advice which helped me during my M.Tech in NIT Warangal. Last but not the least I would like to express my wholehearted thanks to my beloved parents for having faith in me and all my family members for their love, moral support, prayers and encouragement throughout my life and thanks all my classmates and friends who helped me directly or indirectly. MOUSTAFA MOHAMAD NAJM
  • 6. 2015-2016 Page II ABSTRACT Improvement of energy efficiency in cloud computing is an important research topic nowadays. The reduction of operational costs, generated heat and environment impact are some of the reasons for this. A 2011 report by Greenpeace found that if global cloud computing was a country; it would use the fifth most electricity in the world. It is possible to improve energy efficiency in data centers by running various virtual machines in a single physical machine. Then load balancing is needed to allocate VM’s to physical machines. Proper load balancing can help in utilizing the available resources optimally, thereby minimizing the resource utilization and power consumption as well. Moreover, modern cloud computing environments have to provide high QoS for their customers resulting in the necessity to deal with power-performance trade-off. The objective of this research is to develop an Energy efficient load balancing algorithm for VM allocation problem using ant colony optimization technique to minimize energy consumption while providing required QoS for customers in heterogeneous Environment. The proposed algorithm considers the trade-off between energy consumption and performance and use current resource information and CPU capacity factor to achieve the objectives. The proposed algorithm has been implemented and evaluated by using CloudSim simulator which has been used in most researches related to resource scheduling in cloud computing. Keywords: Cloud Computing; Load Balancing; Energy Efficiency; Energy Consumption; QoS; Resource Management; Virtualization; Virtual Machines Allocation; Ant Colony Optimization.
  • 7. 2015-2016 Page III Table of ContentsI ABSTRACT...................................................................................................................II Table Of Figures........................................................................................................ VI Table of Tables......................................................................................................... VII Table of Abbreviations............................................................................................ VIII 1. CHAPTER 1...........................................................................................................2 INTRODUCTION .....................................................................................................2 1.1. Introduction..................................................................................................................... 2 1.2. Definition of the problem................................................................................................ 4 1.3. Motivation....................................................................................................................... 4 1.4. Objectives........................................................................................................................ 6 1.4.1 Main objective......................................................................................................... 6 1.4.2 Specific objectives ................................................................................................... 6 1.5. Organization of Thesis..................................................................................................... 6 1.6. Conclusion ....................................................................................................................... 7 2. CHAPTER 2...........................................................................................................9 CLOUD COMPUTING.............................................................................................9 2.1 Introduction..................................................................................................................... 9 2.2 Cloud computing features............................................................................................... 9 2.3 Cloud Components........................................................................................................ 10 2.3.1 Clients........................................................................................................................... 10 2.3.2 Datacenter.................................................................................................................... 11 2.3.3 Distributed Servers....................................................................................................... 11 2.4 Essential Characteristics of cloud computing................................................................ 12 2.5 Cloud Service Model...................................................................................................... 13 2.6 Cloud Deployment Model ............................................................................................. 14 2.7 Virtualization ................................................................................................................. 15 2.8 Conclusion ..................................................................................................................... 16
  • 8. 2015-2016 Page IV 3. CHAPTER 3.........................................................................................................18 LITERATURE REVIEW........................................................................................18 3.1 Introduction................................................................................................................... 18 3.2 Load Balancing in cloud computing environment......................................................... 18 3.2.1 Goals of Load Balancing in cloud computing......................................................... 18 3.2.2 Related work to Load Balancing algorithms.......................................................... 19 3.3 Literature Review .......................................................................................................... 22 3.4 Conclusion ..................................................................................................................... 35 4. CHAPTER 4.........................................................................................................37 METHODOLOGY AND PROPOSED ALGORITHM ...........................................37 4.1 Introduction................................................................................................................... 37 4.2 Ant Colony Optimization algorithm............................................................................... 37 4.2.1 Ant In Nature......................................................................................................... 38 4.2.2 Ant Colony Optimization ....................................................................................... 39 4.2.3 Basic Steps for ACO ............................................................................................... 39 4.2.4 Advantages and disadvantages of ACO................................................................. 40 4.3 The Bin Packing Problem............................................................................................... 41 4.4 Proposed Energy Efficiency VM allocation based on ACO ............................................ 43 4.4.1 Problem Representation ....................................................................................... 43 4.4.2 System models and problem formulation............................................................. 45 4.4.3 The description of the proposed ant colony algorithm......................................... 47 4.4.4 Interquartile Range (IQR) method for finding dynamic threshold........................ 51 4.4.5 The complete proposed algorithm........................................................................ 52 4.5 Conclusion ..................................................................................................................... 58 5. CHAPTER 5.........................................................................................................60 SIMULATION AND EXPERIMENTAL RESULTS...............................................60 5.1 Introduction................................................................................................................... 60 5.2 Simulation Environment - CloudSim.............................................................................. 61 5.2.1 CloudSim Characteristics....................................................................................... 61 5.2.2 The CloudSim Platform.......................................................................................... 61
  • 9. 2015-2016 Page V 5.2.3 CloudSim Data Flow............................................................................................... 63 5.3 Simulation steps ............................................................................................................ 64 5.4 Simulation Classes ......................................................................................................... 64 5.5 Simulation Settings........................................................................................................ 65 5.3.1 System Mode......................................................................................................... 66 5.3.2 Workload Data....................................................................................................... 66 5.3.3 Simulation parameters.......................................................................................... 67 5.3 Evaluation and experimental results............................................................................. 68 5.3.1 Number of Active Hosts......................................................................................... 68 5.3.2 Energy Consumption ............................................................................................. 69 5.3.3 Quality of Service................................................................................................... 71 5.3.4 Energy and SLA Violations (ESV)............................................................................ 73 5.3.5 Execution Time ...................................................................................................... 75 5.4 Conclusion ..................................................................................................................... 76 6. CHAPTER 6.........................................................................................................78 CONCLUSION AND FUTURE WORK .................................................................78 6.1 Conclusion ..................................................................................................................... 78 6.2 Future Work .................................................................................................................. 79 REFERENCES .............................................................................................................80
  • 10. 2015-2016 Page VI Table Of Figures Figure ‎1-1 an example of VM placement in a virtualized environment.......................................... 5 Figure ‎2-1 three components make up a cloud computing solution............................................ 11 Figure ‎2-2 Cloud Computing Architecture..................................................................................... 13 Figure ‎2-3 Types of Clouds ............................................................................................................ 14 Figure ‎4-1 Adaptive behavior of ants............................................................................................ 39 Figure ‎4-2 Flowchart of ant colony optimization .......................................................................... 40 Figure ‎4-3 Packing under Next Fit ................................................................................................. 41 Figure ‎4-4 Packing under First Fit.................................................................................................. 42 Figure ‎4-5 Packing under Best Fit.................................................................................................. 42 Figure ‎4-6 Packing under Worst Fit............................................................................................... 42 Figure ‎4-7 Problem representation of VM Allocation................................................................... 44 Figure ‎4-8 Interquartile Range Threshold ..................................................................................... 52 Figure ‎4-9 Data Flow Diagram for proposed algorithm ................................................................ 57 Figure ‎5-1 Main Entities of CloudSim............................................................................................ 62 Figure ‎5-2 CloudSim Work Style.................................................................................................... 63 Figure ‎5-3 CloudSim data flow ...................................................................................................... 63 Figure ‎5-4 Number of Active Hosts ............................................................................................... 68 Figure ‎5-5 Energy Consumption.................................................................................................... 70 Figure ‎5-6 Average SLA Violation * 100 ........................................................................................ 72 Figure ‎5-7 Overall SLA Violation * 100 .......................................................................................... 73 Figure ‎5-8 Energy and SLA Violations............................................................................................ 74 Figure ‎5-9 Excution Time............................................................................................................... 75
  • 11. 2015-2016 Page VII Table of Tables Table ‎3-1 Load Balancing scenarios comparison........................................................................... 22 Table ‎5-1 configuration of servers................................................................................................. 66 Table ‎5-2 Power consumption of server at different load levels in watts .................................... 66 Table ‎5-3 Simulation parameters.................................................................................................. 67 Table ‎5-4 Number of Active Hosts................................................................................................. 68 Table ‎5-5 Energy Consumption ..................................................................................................... 70 Table ‎5-6 Average SLA Violation * 100.......................................................................................... 72 Table ‎5-7 Overall SLA Violation * 100 ........................................................................................... 73 Table ‎5-8 Energy and SLA Violations ............................................................................................. 74 Table ‎5-9 Excution Time ................................................................................................................ 75
  • 12. 2015-2016 Page VIII Table of Abbreviations ACO Ant Colony Optimization CIS Cloud Information Service COP Combinatorial Optimization Problem CPU Central Processing Unit HaaS Hardware as a Service IQR Inter Quartile Range IaaS Infrastructure as a Service MIPS Million Instructions Per Second PaaS Platform as a Service PM Physical Machine QoS Quality of Service RAM Random Access Memory SaaS Software as a Service SI Swarm Intelligence SLA Service Level Agreement SOA Service-Oriented Architecture VM Virtual Machine VMP Virtual Machine Placement
  • 13. 2015-2016 Page 1 Chapter 1 INTRODUCTION
  • 14. 2015-2016 Page 2 1. CHAPTER 1 INTRODUCTION 1.1. Introduction In recent years, cloud computing become a new computing model emerged from the rapidly development of internet. It leads the new IT revolution. It saves businesses the initial setup, updates and maintenance cost. cloud computing is a heterogeneous environment which means different hardware characteristics including CPU, memory, storage and other hardware that offers a rapidly and on-demand wide range of services in which shared resources, information, software and other devices are provided according to the clients requirement [1]. It has moved computing and data away from desktop and portable PCs into large data centers [2]. It has the capability to harness the power of Internet and wide area network (WAN) to use resources that are available remotely, thereby providing cost effective solution to most of the real life requirements [2]. This technology also enables on-demand or utility computing just-in-time resource provisioning model in which computing resources such as CPU, memory, and disk space are made available to applications only as needed and not allocated statically based on the peak workload demand [3]. Energy optimization was identified as one of the major concern to adopt it in full- fledged manner. Cloud computing infrastructure consumes enormous amount of electrical energy due to a huge-scale infrastructure involved and AC cooling cost that causes very high metered bills. For example, in 2006, the cost of electricity consumed by IT infrastructures in US was estimated as $4.5 billion and tends to double by 2011 [3]. Moreover, studies have shown that data centers around the world consumed 201.8 terawatt hours (TWh) in 2010. This is enough energy to power 19 million average U.S. households and results in approximately $23.3 billion spent for energy costs. Another problem is significant CO2 emissions that contribute to the greenhouse effect. One of the ways to reduce power consumption by a data center is to apply virtualization technology. This technology provides a promising approach through which
  • 15. 2015-2016 Page 3 hardware resources on one or more machines can be divided through partial or complete machine simulation, time-sharing, hardware and software partitioning into multiple execution environments, each of which can act as a complete system. Virtualization enables dynamic sharing of physical resources in cloud computing environments, allowing multiple applications to run in different performance-isolated platforms called VMs in a single physical server. On the other hand, it is essential for cloud providers to offer reliable QoS for the customers that are negotiated in terms of Service Level Agreements (SLA), such as minimal throughput and maximal response time or latency of the system. Therefore, the main challenge is to reduce energy consumption of data centers while satisfying QoS requirements. While there are many VMs should be assigned to one physical node, VM allocation and Load Balancing is needed. Load balancing is considered as one of the challenges in cloud computing, it is the major factor to improve the performance of the cloud computing and energy efficiency which is highly considered recently. The current load balancing algorithms in cloud computing environment is not highly efficient, because prediction of user request arrivals on the server is not possible. Each VM has different specification, so it becomes a very difficult to schedule job and balance the load among nodes and a distributed solution is required [6]. Load management in cloud data centers must take into account the hardware diversity of hosts, heterogeneous user requirements and energy consumption. In this work, we propose a fully distributed VM allocation algorithm based on Ant Colony Optimization (ACO) technique for dynamic allocation of VMs according to current resources requirements, while ensuring reliable QoS. The objective of the allocation is to minimize the number of physical nodes serving current workload, whereas idle nodes are switched off in order to decrease power consumption. Recently, we can find many research works that have been done on load balancing in cloud computing using ACO, but most of these researches concentrated on improving performance and QoS, some authors worked on power consumption and less works considered heterogeneous environment. In contrast to previous studies, the proposed
  • 16. 2015-2016 Page 4 approach can effectively reduce the power consumption and handle strict QoS requirements and heterogeneous infrastructure and heterogeneous VMs. 1.2. Definition of the problem In cloud, virtualization technology is used for efficient management of resources. This project focuses on the Infrastructure as a Service (IaaS) model in private cloud where physical resources are exposed as services. Under this model, users request VM to the cloud, which are then associated to physical resources. Number of VMs more than physical resources. To achieve the best performance and reduce the consumed energy, VMs have to fully utilize the physical resources by adapting to the cloud environment dynamically, so our problem in this research is how to develop efficient Load Balancing strategy to appropriately allocate the VMs in physical resources in heterogeneous cloud computing. The energy-efficient VM placement problem can be divided in two sub-problems. The first one is the placement of a requested VM on a host, while the second one is the optimization of the current VM placement. The focus of this work is the first one. 1.3. Motivation In practice, powering-up a physical server without any CPU load, consumes more than 50% of the energy consumed by a server with a fully loaded CPU. Therefore, an energy efficient VM placement aims to reduce the number of active physical machines, by increasing the workload in the current active machines. The idea is simple: if the machine already has a work to do, increasing the amount of work will not increase the power consumption of the data center significantly. However, waking up a new machine will impact the power consumption of the data center more significantly, since a machine in suspended state consumes a little fraction of the power of an active one. The strategy used to place the VMs must be careful to not overload a host, since it is important to not violate any Service-Level Agreements (SLAs) between the cloud provider and the client.
  • 17. 2015-2016 Page 5 Figure ‎1-1 an example of VM placement in a virtualized environment For example, let us consider the situation depicted in Figure 1-1. We have seven servers, each of which has a quad-core processor which is capable of executing four VMs. The system is currently hosting seven virtual machines labeled VM1 to VM7. Figure 1-1 (a) shows VM allocation in existing algorithm [8] where VM allocated to less loaded server. Figure 1-1 (b) shows VM allocation in our proposed algorithm where VM allocated to higest loaded server with considering threshold; a simple process for VM placement is as follows: Place the first VM on the first server. Place the second virtual VM on the same server if it can satisfy the resource requirements. If not, add a new server and place the VM on this new server. Continue this procedure until each of the VMs has been placed on a server, adding a new server when required. To consider QoS and avoid overload the server, we can consider upper utilization threshold (e.g 90%). The set of resulting servers at the end comprises the consolidated server farm. Finally the number of servers required reduced from 7 down to 3. For simplicity, we consider fixed threshold in this example. Anyway, the threshold in our proposal will be calculated dynamically according to utilization information.
  • 18. 2015-2016 Page 6 1.4. Objectives 1.4.1 Main objective The main objective of this research is to propose an energy efficient distributed algorithm for VM allocation problem based on ACO technique to achieve power- performance trade-off in heterogeneous private cloud computing environment. 1.4.2 Specific objectives The specific objectives of this research are: 1. Study and analyze existing works for load balancing in cloud computing. 2. Study ACO technique, and related works that have been done by using this technique to solve VM allocation problem. 3. Formulate VM allocation problem as optimization problem. 4. Propose an energy efficient load balancing algorithm based on ACO. 5. Propose an adaptive threshold method for QoS. 6. Implement the proposed algorithm using CloudSim simulator. 7. Evaluate the proposed algorithm using some metrics (e.g. energy consumption, number of active hosts, QoS and execution time). 8. Compare the results of proposed algorithm with existing algorithm. 1.5. Organization of Thesis The thesis is organized as follows:  Chapter 1: This chapter describes the research problem and defines the research objectives. Furthermore, it gives motivation toward the proposed solution.  Chapter 2: This chapter gives an overview of cloud computing, which includes the terminologies and technologies used in cloud computing.  Chapter 3: This chapter studies and compares different load balancing techniques in cloud computing. It also reviews recently works that have been done to solve resource allocation problem in cloud computing based on ACO and discuses the
  • 19. 2015-2016 Page 7 advantages and disadvantages of each work. Furthermore, it focuses on some works related to energy consumption and QoS in cloud computing.  Chapter 4: This chapter describes proposed algorithm in details. First, it describes ACO technique and models resources utilization and power consumption in cloud computing. After that, it formulates VM allocation problem as combinatorial problem and presents ACO based algorithm to solve this problem. It describes also IQR method to calculate upper threshold dynamically using utilization history. Finally, it shows the complete algorithm including pseudo code and data flow diagram.  Chapter 5: this chapter focuses on the simulation details and experimental results using CloudSim.  Chapter 6: This chapter describes the conclusion derived from the proposed work and directions for future research work. 1.6. Conclusion This chapter gives a brief idea about cloud computing and load balancing. It also gives an overall idea about the research problem, main and specific objectives and motivation for proposed solution.
  • 20. 2015-2016 Page 8 Chapter 2 CLOUD COMPUTING
  • 21. 2015-2016 Page 9 2. CHAPTER 2 CLOUD COMPUTING 2.1 Introduction In case of cloud computing, services can be used from diverse and widespread resources rather than remote servers or local machines. There is no standard definition of cloud computing. Generally it consists of a bunch of distributed servers known as masters, providing demanded services and resources to different clients known as clients in a network with scalability and reliability of datacenter. The distributed computers provide on-demand services. Services may be of software resources (e.g. SaaS) or physical resources (e.g. PaaS) or hardware/infrastructure (e.g. HaaS or IaaS). Amazon EC2 (Amazon Elastic Compute Cloud) is an example of cloud computing services [10]. The National Institute of Standards and Technology's (NIST) define a Cloud computing as "cloud computing is a model for enabling ubiquitous, convenient, on- demand network access to a shared pool of configurable computing resources (e.g., networks, servers, storage, applications and services) that can be rapidly provisioned and released with minimal management effort or service provider interaction. "[4] The cloud is a virtualization of resources that maintains and manages itself [11]. It builds on a wide range of different computing technologies such as high-performance computing, distributed systems, virtualization, storage, networking, security, management and automation, SOA, SLA and QoS [12]. 2.2 Cloud computing features Cloud computing provides several features that make it attractive to IT industry, such as: [4] [15].  No up-front investment: The pricing model in cloud computing is based on a pay- per-use principle. This model gives the client the ability to rent services and resources from cloud as he needs.
  • 22. 2015-2016 Page 10  Lowering operating cost: Cloud environment resources are allocated and de- allocated on demand and this can provide a considerable saving in operating costs since resources can be released when service demand is low.  Scalability and Elasticity: The infrastructure providers have a large amount of resources and infrastructure. So they can easily expand its service to handle the growing service according to client demand. On the other hand, elasticity is the ability to scale resources both up and down when required. Allowing the dynamic integration and extraction of physical resources to the infrastructure. That’s mean elasticity enables scalability.  Easy access: The cloud services provided to users as a web-based services. So, they can access the services through any devices supported with Internet connections.  Reducing business risks and maintenance expenses: Shifts the business risks such as hardware failures to infrastructure providers, because providers have better expertise and resources to manage these risks.  Virtualization: Virtualization hides a computing platform’s physical characteristics from users; it allows abstraction and isolation of lower level functionalities and underlying hardware.  Mobility: Cloud Computing means mobility because users can access applications through internet easily at any point of time. 2.3 Cloud Components A Cloud system consists of 3 major components such as clients, datacenter, and distributed servers. Each element has a definite purpose and plays a specific role. 2.3.1 Clients End users interact with the clients to manage information related to the cloud. Clients generally fall into three categories as given in [13]:
  • 23. 2015-2016 Page 11  Mobile: Windows Mobile Smartphone, smartphones, like a Blackberry, or an iPhone.  Thin: They don’t do any computation work. They only display the information. Servers do all the works for them. Thin clients don’t have any internal memory.  Thick: These use different browsers like IE or Mozilla Firefox or Google Chrome to connect to the Internet cloud. Now-a-days thin clients are more popular as compared to other clients because of their low price, security, low consumption of power, less noise, easily replaceable and repairable etc. 2.3.2 Datacenter Datacenter is nothing but a collection of servers hosting different applications. An end user connects to the datacenter to subscribe different applications. A datacenter may exist at a large distance from the clients. Now-a-days a concept called virtualization is used to install software that allows multiple instances of virtual server applications. 2.3.3 Distributed Servers Distributed servers are the parts of a cloud which are present throughout the Internet hosting different applications. But while using the application from the cloud, the user will feel that he is using this application from its own machine. Figure ‎2-1 three components make up a cloud computing solution
  • 24. 2015-2016 Page 12 2.4 Essential Characteristics of cloud computing The Essential Characteristics of cloud computing are: [NIST Def]  On-demand self-service: A consumer can unilaterally provision computing capabilities, such as server time and network storage, as needed automatically without requiring human interaction with each service provider.  Broad network access: Capabilities are available over the network and accessed through standard mechanisms that promote use by heterogeneous thin or thick client platforms (e.g., mobile phones, tablets, laptops, and workstations).  Resource pooling: The provider’s computing resources are pooled to serve multiple consumers using a multi-tenant model, with different physical and virtual resources dynamically assigned and reassigned according to consumer demand. There is a sense of location independence in that the customer generally has no control or knowledge over the exact location of the provided resources but may be able to specify location at a higher level of abstraction (e.g., country, state, or datacenter). Examples of resources include storage, processing, memory, and network bandwidth.  Rapid elasticity: Capabilities can be elastically provisioned and released, in some cases automatically, to scale rapidly outward and inward commensurate with demand. To the consumer, the capabilities available for provisioning often appear to be unlimited and can be appropriated in any quantity at any time.  Measured service. Cloud systems automatically control and optimize resource use by leveraging a metering capability at some level of abstraction appropriate to the type of service (e.g., storage, processing, bandwidth, and active user accounts). Resource usage can be monitored, controlled, and reported.
  • 25. 2015-2016 Page 13 2.5 Cloud Service Model Cloud Computing can be delivered through such delivery models as follow:  Infrastructure as a Service (IaaS): This model of Cloud computing provide Hardware as a Service via Internet such as storage, CPU and other. There are many IaaS providers such as Amazon Elastic Cloud Compute (EC2), Rackspace [14] [15].  Platform as a Service (PaaS): Cloud computing provide a platform as a services that required for building application, where user using tools and libraries for Cloud service providers, and also consumers deployed their applications without costing of hardware where providers of services provide the network, storage. There are many PaaS providers such as Google App Engine, Windows Azure [14] [15].  Software as a Service (SaaS): Focus on providing different software hosted on the Cloud and usually referred to as on-demand-software, where in this type of service, consumer will have to pay for usage of software. Usually consumer access to the software via the Internet, therefore, user uses the software don’t need any integration with other system [14] [15]. There are many SaaS provider such as Google Apps, SalesForce.com as shown in Figure2.2 [4]. Figure ‎2-2 Cloud Computing Architecture
  • 26. 2015-2016 Page 14 2.6 Cloud Deployment Model Based on the domain or environment in which clouds are used, clouds can be divided into three types [4] [16]: Figure ‎2-3 Types of Clouds  Public clouds: It’s a cloud in which service providers offer their resources as services to the general public. Public clouds offer several key benefits to service providers, including no initial capital investment on infrastructure and shifting of risks to infrastructure providers. However, public clouds lack fine-grained control over data, network and security settings, which hampers their effectiveness in many business scenarios.  Private clouds: Also known as internal clouds, private clouds are designed for exclusive use by a single organization. A private cloud may be built and managed by the organization or by external providers. A private cloud offers the highest degree of control over performance, reliability and security. However, they are often criticized for being similar to traditional proprietary server farms and do not provide benefits such as no up-front capital costs.
  • 27. 2015-2016 Page 15  Community clouds: A community cloud is a collaborative effort in which infrastructure is shared between several organizations from a specific community with common concerns (security, compliance, jurisdiction, etc.), whether managed internally or by a third- party and hosted internally or externally. The costs are spread over fewer users than a public cloud (but more than a private cloud), so only some of the cost savings potential of cloud computing are realized.  Hybrid clouds: A hybrid cloud is a combination of public and private cloud models that tries to address the limitations of each approach. In a hybrid cloud, part of the service infrastructure runs in private clouds while the remaining part runs in public clouds. 2.7 Virtualization Virtualization separates resources and services from the underlying physical delivery environment [15]. Virtualization is considered as a core of cloud computing technologies and one of the most important technologies that enabled this paradigm [16] [17]. Virtualization hides a computing platform’s physical characteristics from users [16] [17]. It allows abstraction and isolation of lower level functionalities and underlying hardware. This enables portability of higher level functions and sharing and/or aggregation of the physical resources [18]. Virtualization means “something which isn’t real”, but gives all the facilities of a real [6]. It is the software implementation of a computer which will execute different programs like a real machine [19]. Virtualization has three characteristics that make it very related with cloud computing which are [15]. 1- Partitioning: By partitioning the available resources, many applications and operating systems can run in a single physical system. 2- Isolation: By isolation, each virtual machine can run in its host with others virtual machine without effect on others. So, if one virtual instance failed, it doesn’t affect the other virtual machines.
  • 28. 2015-2016 Page 16 3- Encapsulation: A virtual machine encapsulated and stored as a single file, so a virtual machine can be presented to an application as a complete entity without interfere with another application. 2.8 Conclusion In this chapter we give an overview about cloud computing. It’s a service oriented environment. This cloud model is composed of five essential characteristics, three service models, and four deployment models. We defined the cloud computing and its characteristics and models. We also defined the virtualization; the key technology in cloud and presented the benefits of virtualization in cloud computing.
  • 29. 2015-2016 Page 17 Chapter 3 LITERATURE REVIEW
  • 30. 2015-2016 Page 18 3. CHAPTER 3 LITERATURE REVIEW 3.1 Introduction Resource allocation and load balancing for clouds has been studied very extensively in the literature. The problem of deciding on an optimal assignment of requests to resources allocator is NP-hard problem. Several heuristic algorithms have been proposed by researchers for optimal allocation of cloud resources. ACO is a heuristic algorithm inspired by the behavior of real ants for solving such problems, which can be reduced to find good paths through graphs. This chapter will review different load balancing techniques in cloud computing, study recent scheduling researches based on ACO and discuses the advantages and disadvantages of each research. 3.2 Load Balancing in cloud computing environment It is a process of reassigning the total load to the individual nodes of the collective system to make resource utilization effective and to improve the response time of the job, simultaneously removing a condition in which some of the nodes are over loaded while some others are under loaded. A load balancing algorithm which is dynamic in nature does not consider the previous state or behavior of the system, that is, it depends on the present behavior of the system. The important things to consider while developing such algorithm are : estimation of load, comparison of load, stability of different system, performance of system, interaction between the nodes, nature of work to be transferred, selecting of nodes and many other ones. This load considered can be in terms of CPU load, amount of memory used, delay or Network load. 3.2.1 Goals of Load Balancing in cloud computing Load balancing in cloud computing provides an efficient solution to various issues residing in cloud computing environment set-up and usage. Load balancing must
  • 31. 2015-2016 Page 19 take into account two major tasks, one is the resource provisioning or resource allocation and other is task scheduling in distributed environment. Efficient provisioning of resources and scheduling of resources as well as tasks will ensure [9]. a. Resources are easily available on demand. b. Resources are efficiently utilized under condition of high/low load. c. Energy is saved in case of low load (i.e. when usage of cloud resources is below certain threshold). d. Cost of using resources is reduced. 3.2.2 Related work to Load Balancing algorithms Cloud is made up of massive resources. Management of these resources requires efficient planning and proper layout. While designing an algorithm for resource provisioning on cloud the developer must take into consideration different cloud scenarios and must be aware of the issues that are to be resolved by the proposed algorithm. Therefore, resource provisioning algorithm can be categorized into different classes based upon the environment, purpose and technique of proposed solution. 3.2.2.1 Load Balancing on the basis of cloud environment Cloud computing can have either static or dynamic environment based upon how developer configures the cloud demanded by the cloud provider.  Static Environment In static environment the cloud provider installs homogeneous resources. Also the resources in the cloud are not flexible when environment is made static. In this scenario, the cloud requires prior knowledge of nodes capacity, processing power, memory, performance and statistics of user requirements. These user requirements are not subjected to any change at run-time. Algorithms proposed to achieve load balancing in static environment cannot adapt to the run time changes in load. Although static environment is easier to simulate, it is not well suited for heterogeneous cloud environment.
  • 32. 2015-2016 Page 20  Dynamic Environment In dynamic environment the cloud provider installs heterogeneous resources. The resources are flexible in dynamic environment. In this scenario cloud cannot rely on the prior knowledge whereas it takes into account run-time statistics. The requirements of the users are granted flexibility (i.e. they may change at run-time). Algorithm proposed to achieve load balancing in dynamic environment can easily adapt to run time changes in load. Dynamic environment is difficult to be simulated but is highly adaptable with cloud computing environment. 3.2.2.2 Load Balancing based on spatial distribution of nodes Nodes in the cloud are highly distributed. Hence the node that makes the provisioning decision also governs the category of algorithm to be used. There can be three types of algorithms that specify which node is responsible for balancing of load in cloud computing environment.  Centralized Load Balancing In centralized load balancing technique all the allocation and scheduling decision are made by a single node. This node is responsible for storing knowledge base of entire cloud network and can apply static or dynamic approach for load balancing. This technique reduces the time required to analyze different cloud resources but creates a great overhead on the centralized node. Also the network is no longer fault tolerant in this scenario as failure intensity of the overloaded centralized node is high and recovery might not be easy in case of node failure.  Distributed Load Balancing In distributed load balancing technique, no single node is responsible for making resource provisioning or task scheduling decision. There is no single domain responsible for monitoring the cloud network instead multiple domains monitor the network to make accurate load balancing decision. Every node in the network maintains local knowledge base to ensure efficient distribution of tasks in static environment and re-distribution in dynamic environment.
  • 33. 2015-2016 Page 21  Hierarchical Load Balancing Hierarchical load balancing involves different levels of the cloud in load balancing decision. Such load balancing techniques mostly operate in master slave mode. These can be modeled using tree data structure wherein every node in the tree is balanced under the supervision of its parent node. Master or manager can use light weight agent process to get statistics of slave nodes or child nodes. Based upon the information gathered by the parent node provisioning or scheduling decision is made. Table 3-1 compares different types of load balancing scenarios in cloud computing environment. Type Knowledge Base Issues to be addressed Usage Drawbacks Static Prior knowledge base is required about each node statistics and user requirements. Response time Resource utilization Scalability Power consumption Makespan Throughput/Performance Used in homogeneous environment. Not Flexible Not scalable Not compatible with changing user requirements as well as load Dynamic Run time statistics of each node are monitored to adapt to changing load requirements. Location of processor to which load is transferred by an overloaded processor. Transfer of task to a remote machine. Load estimation. Limiting the number of migrations. Throughput Used in heterogeneous environment. Complex Time Consuming Centralized Single node or server is responsible for maintaining the statistics of entire network and updating it from time to time. Threshold policies Throughput Failure Intensity Communication between central server and processors in network. Associated Overhead Useful in small networks with low load. Not fault tolerant Overloaded central decision making node
  • 34. 2015-2016 Page 22 Distributed All the processors in the network responsible for load balancing store their own local database (e.g. MIB) to make efficient balancing decisions. Selection of processor that take part in load balancing. Migration time Interprocessor communication Information exchange Throughput Fault tolerance Useful in large and heterogeneous environment. Algorithm complexity Communication overhead Hierarchical Nodes at different levels of hierarchy communicate with the nodes below them to get information about the network performance. Threshold policies Information exchange criteria Selection of nodes at different levels of network Failure intensity Performance Migration time Useful in medium or large size network with heterogeneous environment. Less fault tolerant Complex Table ‎3-1 Load Balancing scenarios comparison 3.3 Literature Review Now we will study and analyze previous works which have been done for load balancing in cloud computing using ACO. For each work we will describe the propose solution, then analyze advantages and disadvantages of this solution.  Ant colony Optimization a Solution of Load balancing in cloud 2012 [20] Ratan Mishra et al. proposed heuristic algorithm based on ant colony optimization “MACO” to initiate the service load distribution under cloud computing architecture. The objective of this paper is to develop an effective load balancing algorithm using Ant colony optimization technique to maximize or minimize different performance parameters like CPU load, Memory capacity, Delay or network load for the clouds of different sizes. Author has discussed how the mobile agents can balance the load of a cloud using the concept of ACO and proposed an approach for updating pheromone table. The limitation of this technique is that it will be more efficient if it’s combined with clustering. Author proposed “Active clustering” technique works on the principle of grouping similar nodes together and working on these groups.
  • 35. 2015-2016 Page 23 Advantages: 1- The advantage of using MACO is that it is more likely to establish connections through multiple paths to help balance the load but does not increase the routing overhead. 2- This modification supports to minimize the make span of the cloud computing based services (makespan is the time difference between the start and finish of a sequence of jobs or tasks). 3- Portability of servicing the request also has been converged using the ant colony optimization technique. Disadvantages: 1- This technique does not consider the fault tolerance issues. 2- This approach for updating pheromone is only appropriate for routing in symmetric networks. 3- Less efficient due to the absence of cluster in cloud solution. 4- No simulation or comparison with other algorithms.  Load Balancing of Nodes in Cloud Using Ant Colony Optimization 2012 [21] Kumar Nishant et al. proposed an efficient algorithm for load balancing of nodes in cloud environment. The standard ACO algorithm is modified in the way that ants continue to update a single result set rather than updating their own result set. In this algorithm a Regional Load Balancing Node (RLBN) is elected to act as a head node. Other ants consider head node as the root; which means they will update the single result set obtained from the head node. In this approach, once head node is elected; doesn’t mean that now it is permanent. Selection can be reset if the past selection stops functioning efficiently due to some inappropriate conditions. Advantages: 1- Under loaded node is found at the beginning. 2- New head node can be elected if previous nodes stop functioning properly. 3- The ant updated the single result set rather than updating their own result set.
  • 36. 2015-2016 Page 24 Disadvantages: 1- Network over head due to large number of ants. 2- Points of initiation of ants and number of ants are not clear. 3- Choice of head node is crucial. 4- Nodes status change after ants visit to them is not considered. 5- Only availability of node is being considered, while there are other factors that should be taken into consideration. 6- Full replication of data.  Effective Scheduling Algorithm for Load balancing using Ant Colony Optimization in Cloud Computing 2014 [22] Shagufta Khan et al. proposed and implemented SALB algorithm, an improvement version of the Ant Colony Optimization. They have modified the concept of ACO in term of movement of the ant that is in both forward direction and backward direction and the way in which ants create pheromone table that contains the information about all nodes and its corresponding load. The goal of this study is to balance the node with efficiency & maximum utilization of resources. This algorithm is efficient in finding the overloaded node in minimum time. It also improves the performance in terms of throughout, response time and energy consumption. Advantages: 1- Efficient to finding the overloaded node in minimum time 2- Balance the node with efficiency and maximum utilization of resources. 3- Achieve good results in terms of throughout, response time, less energy consumption. Disadvantages: 1- better performance is the need of this algorithm by varying different parameters 2- Two types of pheromone.
  • 37. 2015-2016 Page 25  Cloud Task scheduling based on Load Balancing Ant Colony Optimization 2011.[23] Kun Li et al. proposed the LBACO algorithm (Load Balancing Ant Colony Optimization) to find the optimal resource allocation for each task in the dynamic cloud system. The main contribution of this work is to balance the entire system load while trying to minimize the makespan of a given tasks set. The new scheduling strategy was simulated using CloudSim toolkit package. Experiments results showed that proposed LBACO algorithm outperformed FCFS (First Come First Serve) and the basic ACO. Advantages: 1- Nodes are balanced dynamically. Disadvantages: 1- Authors assume that all Tasks are mutually independent, i.e., there is no precedence constraint between tasks, that’s not general case. 2- They assume that tasks are computationally intensive, which is not realistic for cloud systems. 3- It doesn’t consider heterogeneity of system  A Load Balancing Mechanism Based on Ant Colony and Complex Network Theory in Open Cloud Computing Federation 2010 [24] Zehua Zhang et al. proposed a load balancing mechanism based on ant colony and complex network theory in open cloud computing federation. An open cloud computing federation (OCCF) consists of many cloud computing service provider’s (CCSP) facilities. The proposal mechanism in this paper aims to cope with the complex and dynamic load balancing problem in OCCF. This mechanism improves many aspects of the related Ant Colony algorithms which proposed to realize load balancing in distributed system. The characteristic (small-world and scale-free) of Complex Network have been taken into consideration.
  • 38. 2015-2016 Page 26 Advantages: 1- Overcome heterogeneous of the cloud computing facilities. 2- Adaptive to the dynamic environments in the OCCF. 3- Excellent in fault tolerance. 4- Good scalability. Disadvantages: 1- Overhead increases during run time environment. 2- Poor response time. 3- An Ant encounters dead state at the end due to lack of synchronization of Ants.  Intelligent Strategy of Task Scheduling in Cloud Computing for Load Balancing- 2013 [25] Arabi E. keshk et al. proposed MACOLB algorithm (Modified Ant Colony Optimization for Load Balancing) for cloud task scheduling. They use MACOLB algorithm to find the optimal resource allocation for tasks in the dynamic cloud system to minimize the makespan of tasks on the entire system and increase the performance by balancing the load of the system. The load balancing factor, related to the job finishing rate, is proposed to make the job finishing rate at different resource being similar and the ability of the load balancing improved. The proposed scheduling strategy was simulated using CloudSim. Experimental results showed that MACOLB algorithm decreases the degree of imbalancing between VMs and increases the overall performance. Advantages: 1- MACOLB decreases the degree of imbalancing between available VMs. 2- Increase the overall performance. Disadvantages: 1- Tasks are mutually independent i.e., there is no precedence constraint between tasks.
  • 39. 2015-2016 Page 27  Cloud Task Scheduling Based on Ant Colony Optimization 2015 [26] Medhat Tawfeek et al. proposed cloud task scheduling policy based on ACO for allocation of incoming jobs to VMs. The main goal of this algorithm is minimizing the makespan of a given tasks set to help in utilizing the available resources optimally, minimize the resource consumption and achieve a high user satisfaction. They compared the proposed approach with different scheduling algorithms; First Come First Served (FCFS) and Round-Robin (RR). Algorithms have been simulated using CloudSim toolkit package. Experimental results showed that cloud task scheduling based on ACO outperformed FCFS and RR algorithms. Advantages: 1- Considerable reduction in task completion time. 2- Dynamic task allocation. Disadvantages: 1- Tasks are mutually independent. 2- Tasks are not preemptive and they cannot be interrupted or moved to another processor during their execution. 3- The same resource and VM would be over utilized, since ants would converge to first available position.  ACO-LB Algorithm for Task Scheduling in the Cloud Environment 2014 [27] Shengjun Xue et al. proposed a ACO-LB (Load balancing optimization algorithm based on ACO) to solve the load imbalance of VMs in the process of task scheduling. ACO-LB will not only shorten the makespan of task scheduling, but also maintain the load balance of VMs in the data center. This work considered dependent tasks and workflow model with priority constraints using DAG (Directed Acyclic Graph). This algorithm can adapt to the dynamic cloud environment. ACO-LB has been simulated in CloudSim and the results show that it can efficiently provide appropriate resources for tasks and improve the utilization rate of resources.
  • 40. 2015-2016 Page 28 Advantages: 1- ACO-LB algorithm has better performance and load balancing ability. 2- ACO-LB considers the dependency between tasks. Disadvantages: 1- This paper only presents one workflow model with single structure and correlation to verify the advantages of the ACO-LB algorithm. 2- This paper only considers minimizing the execution time of tasks and ignores the cost problem existing in reality.  A New Approach to Ant Colony to Load Balancing in Cloud Computing Environment 2015 [28] Hamid Mehdi proposed a modification for ACO. The main aim of the proposed algorithm is efficient in finding the overloaded node and load balancing in lowest time. The proposed method associated with concept of ACO promotion in connection with movement of the ant which is in both forward and backward direction. The ant use two types of pheromone for its movement these are:  Foraging Pheromone (FP) - Generally ACO uses foraging pheromones to explore new food sources. In this algorithm the ant would lay down foraging pheromone after encountering under loaded nodes to search overloaded nodes.  Trailing Pheromone (TP) - In a typical ACO the ant uses trailing pheromone to discover its path back to the nest. However, in this algorithm the ants would use this to find its path to the under loaded node after encountering overloaded Node. The aim is to balance the node with efficiency & maximum utilization of resource. The algorithm is simulated in CloudSim. The results show that the proposed algorithm improves the performance in terms of throughout, response time. Advantages: 1- Ant moves in both directions. 2- Achieve efficiency & maximum utilization of resources.
  • 41. 2015-2016 Page 29 Disadvantages: 1- More storage required for pheromone. 2- This algorithm didn’t consider the energy related issues.  Balancing throughput and response time in online scientific Clouds via Ant Colony Optimization 2015 [29] Elina Pacini et al. described and evaluated a Cloud scheduler based on ACO. The goal of this work is to study private Clouds to execute scientific experiments coming from multiple users. This work focuses on IaaS model where custom VM are launched in appropriate hosts available in a Cloud. In this scheduler, the load is calculated on each host taking into account the CPU utilization made by all the VMs that are executing on each host. The main performance metrics are the number of serviced users by the cloud, the total number of created VMs in online (non-batch) scheduling scenarios and the number of intra-cloud network messages sent. Simulated experiments performed using CloudSim and job data from real scientific problems show that proposed scheduler succeeds in balancing the studied metrics compared to schedulers based on Random assignment and Genetic Algorithms. Advantages: 1- Describe a two-level Cloud scheduler. 2- Address an online Cloud scenario. 3- Balancing the number of serviced users in a cloud and the total number of created VMs. 4- Use an exponential back-off strategy to retry allocating failing VMs. Disadvantages: 1- High network consumption. 2- This work didn’t consider heterogeneous physical resources. 3- The algorithm didn’t consider Energy consumption.
  • 42. 2015-2016 Page 30  Energy Efficient Allocation of Virtual Machines in Cloud Data Centers 2010 [30] Anton Beloglazov and Rajkumar Buyya proposed an efficient resource management policy for virtualized Cloud data centers to minimize energy consumption, while providing reliable QoS. The heuristic approach presented in this paper use technique derived, from the Best Fit Decreasing algorithm. The goal is to place each migrating VM on the server that minimizes the overall power consumption of the data center. They also proposed and evaluated heuristics for dynamic reallocation of VMs. The obtained results show that the technique of dynamic reallocation of VMs and switching off the idle servers brings substantial energy savings and is applicable to real-world Cloud data centers. Advantages: 1- Reducing energy consumption. 2- Handling QoS requirements. 3- Considering heterogeneous infrastructure and heterogeneous VMs. 4- They do not depend on a particular type of workload and do not require any knowledge about applications executing on VMs. Disadvantages: 1- This is deterministic and centralized algorithm whose efficiency deteriorates as the size of the data center grows and suffers from scalability and fault tolerance issues. 2- mapping strategies may require the concurrent migration of many VMs, which can cause considerable performance degradation during the reassignment process 3- Consider only CPU utilization as a resource for reallocation decisions.  Energy-Aware Ant Colony Based Workload Placement in Clouds 2011 [31] In this work Eugen Feller et al. modeled the VM allocation problem as an instance of the multidimensional bin-packing (MDBP) problem considering many resources (i.e., CPU cycles, CPU cores, RAM size, network bandwidth and disk size). They presented workload resource demand estimation approach to minimize the
  • 43. 2015-2016 Page 31 amount of performance degradation and designed a novel, nature-inspired workload consolidation algorithm based on ACO to compute the placement dynamically according to the current load. In order to improve the performance a multithreaded version of the ACO-based workload consolidation algorithm was developed. The ultimate goal of this work is to minimize the amount of hosts, thus increasing the average utilization of each host. The proposed algorithm was evaluated by comparing it with one frequently applied greedy algorithm (i.e., FFD). Simulation results demonstrated that ACO outperforms the evaluated greedy algorithm as it achieves superior energy gains through better server utilization and requires fewer machines. Moreover, it computes solutions which are nearly optimal. Advantages: 1- This was the first work to apply ACO on the MDBP and consider many resources. 2- Minimize the number of machines. Disadvantages: 1- They assume a homogeneous environment in which all physical machines have the same capacity. 2- The algorithm requires the prior knowledge about all the workload. 3- This approach is also implemented in a centralized manner. 4- Maximum energy gain is 5.88%. 5- They didn’t consider QoS and risk of SLA violation.  Energy Aware Virtual Machine Placement scheduling in Cloud Computing Based on Ant Colony Optimization Approach 2014 [32] Xiao-Fang Liu et al. proposed an approach based on ACO to solve the Virtual Machine Placement Problem (VMP), named as ACO-VMP, so as to effectively use the physical resources and to reduce the number of running physical servers. The number of physical servers is the same as the number of the VMs at the beginning. Then the ACO approach tries to reduce the physical server one by one. Experimental results compared with the ones obtained by the first-fit decreasing (FFD) algorithm
  • 44. 2015-2016 Page 32 show that ACO-VMP can solve VMP more efficiently to reduce the number of physical servers significantly, especially when the number of VMs is large. Advantages: 1- Reduce Energy consumption by reducing the number of physical servers. Disadvantages: 1- All servers are homogeneous. 2- They only consider CPU and memory resources. 3- They didn’t consider the QoS for customers.  Energy-efficient virtual machine placement in data centers with heterogeneous requirements 2014 [33] Xiangming Dai et al. focused in this paper on reducing the power consumption of data centers in public cloud environments by exploring two greedy approximation algorithms: the minimum power VM placement algorithm (MinPow); that attempts to decrease the power consumption by avoiding powering up unnecessarily additional servers and the minimum communication virtual machine placement algorithm (Min Com); that aims at packing one user's VMs as much as possible on the same server or under the same rack to decrease the networking energy cost. The performance of these two algorithms has been evaluated and compared to other alternatives in both small scale and large scale clusters. Results showed that MinPow and MinCom yield placements that are within 5% to 10% energy consumption of the optimal solution. Advantages: 1- Heterogeneous Environment. 2- They consider power consumed by Network Devices in large scale Data Center. 3- The proposed Algorithms are near to optimal solution. Disadvantages: 1- Central algorithm. 2- Proposed algorithms are designed only to reduce energy while they ignore the effects on QoS for customers.
  • 45. 2015-2016 Page 33  An Energy Efficient Virtual Machine Consolidation in Cloud Computing 2015 [34] Jayshri Damodar Pagare et al. proposed a VMs consolidation approach to consider the trade-off between energy consumption and performance. The most important contributions of this paper are as follows: 1) Proposing an efficient algorithm which finds and decides overloaded host with SLA violation 2) Proposing an efficient algorithm for finding underutilized hosts. 3) Combine two proposed algorithms as VM consolidation algorithm to get better results in both power consumption and SLA violation. The overload detection finds overloaded host and get the status of it whether it result in SLA Violation or not. If there is no SLA violation then no migration required which saves power required to migrate VMs. But if there is SLA violation then place all the VMs from this host to other hosts until the host becomes under load. Proposed algorithms have been implemented and evaluated using CloudSim simulator. Simulation results showed improvement in energy consumption. Advantages: 1- The algorithm reduces SLA violation and energy consumption. 2- It reduces number of migrations by trigger migration only if overload host generates SLA violation host. 3- This work considers heterogeneous environment. Disadvantages: 1- They concentrate on rebalancing the load but they didn’t mention the initial allocation algorithm. 2- Long execution time.  Power Efficient Resource Allocation for Clouds Using Ant Colony Framework 2011 [35] Lskrao Chimakurthi et al. presented an energy efficient mechanism for adaptive resource allocation in cloud computing environments for hosting the applications with given QoS requirements as throughput and response time. This algorithm reduces the
  • 46. 2015-2016 Page 34 power consumption of data center resources by considering the dynamic loads of servers using different ant agents. Advantages: 1- It’s very flexible mechanism that can be extended with improvements 2- It considers dynamic loads of servers. Disadvantages: 1- There are many types of agents. 2- They didn’t evaluate the proposed mechanism. 3- They didn’t include the load prediction and usage models so this mechanism can’t be applied to real cloud environments.  An ACO-based Scheduling Strategy on Load Balancing in Cloud Computing Environment 2015 [36] Wei-Tao Wen et al. proposed ACO-VMM; a novel distributed VM migration strategy based on ACO. In ACO-VMM Strategy, local migration agent autonomously monitors the resource utilization and launches the migration. At monitoring stage, it takes both the previous and current system condition into account to avoid unnecessary migrations. Besides, it adopts two different traversing strategies for ants, Positive and Negative Traversing, in order to find the near-optimal mapping relationship between VMs and PMs. The proposed strategy is evaluated by using CloudSim. Experimental results showed that ACO-VMM achieves load balancing and reasonable resource utilization, which outperforms the existing migration strategies in terms of number of VM migrations and number of SLA violations. Advantages: 1- This algorithm reduces number of migrations. 2- It takes the memory utilization and the bandwidth condition into account. 3- High reliability and scalability. 4- It considers heterogeneous Environment. Disadvantages: 1- Threshold has a fixed value.
  • 47. 2015-2016 Page 35 3.4 Conclusion After the literature review, we came to conclude that scheduling and load balancing is challenging task in cloud computing and it’s very important research area now-a-days. Many of the existing approaches nowadays still ignore the multidimensional character of the problem. Also, many researches adopted VM allocation strategy in centralized manner. However, one of the main limitations of all current cloud management frameworks next to their high degree of centralization is that they do not provide any advanced energy-aware workload consolidation policies. Energy consumption has become substantial issues in cloud computing recently and it should be considered in load balancing. Only some algorithms consider energy consumption during solving the load balancing problem; the main idea of these algorithms is to set upper and lower utilization thresholds and keep the total CPU utilization of a node between them by using Live Migration. However, Most researches set static threshold, which is not suitable for heterogeneous environment and dynamic load.
  • 48. 2015-2016 Page 36 Chapter 4 METHODOLOGY AND PROPOSED ALGORITHM
  • 49. 2015-2016 Page 37 4. CHAPTER 4 METHODOLOGY AND PROPOSED ALGORITHM 4.1 Introduction Swarm Intelligence techniques are increasingly used to solve optimization problems, and thus they result good alternatives to achieve the goals proposed in this work. SI is a discipline that deals with natural and artificial systems composed of many individuals that coordinate themselves using decentralized control and self-organization. Examples of systems that studied by SI are ants’ colonies. The advantage of these techniques derives from their ability to explore solutions in large search spaces in a very efficient way along with little initial information. Moreover, using SI techniques is an interesting approach to cope in practice with the NP-completeness of job scheduling. In this chapter we will explain briefly the methods used in this work; ACO then we will apply this method to solve the VM allocation problem. Besides that, to ensure QoS for customers, proposed adaptive threshold using IQR method which will be shown later on in this chapter. Finally, the complete algorithm will be presented including pseudo code and data flow diagram. 4.2 Ant Colony Optimization algorithm Ant Colony Optimization “ACO” is one example of SI techniques. It is a meta- heuristic algorithm with efficient local search for combinatorial problems. It’s a general framework that can be used to create a specific algorithm to solve a specific graph path problem. ACO imitates the behavior of real ant colonies in nature to search for food and to connect to each other by pheromone laid on paths traveled. Many researches use ACO to solve NP-hard problems such as traveling salesman problem, graph coloring problem, vehicle routing problem, and so on. Although ACO was proposed in a 1992 doctoral thesis by M. Dorigo, the first detailed description of the algorithm is generally attributed to a 1996 follow-up paper by M. Dorigo, V. Maniezzo and A. Colorni. Since then, ACO has been widely studied and modified.
  • 50. 2015-2016 Page 38 4.2.1 Ant In Nature Ant Colony Optimization (ACO) [29, 30] is a meta-heuristic inspired by the observation of real ant colonies and based upon their collective foraging behavior [26]. Ants are social insects and live in colonies. Their behavior is governed by the goal of colony survival. When searching for food, ants frequently travel between their nest and food sources. At the beginning, ants explore the area surrounding their nest in a random manner. While moving, ants deposit special substances called pheromones along their paths. Ants can smell pheromones. When choosing their way, they tend to choose, in probability, paths marked by strong pheromone concentrations. As soon as an ant finds a food source, it evaluates the quantity and the quality of the food and carries some of it back to the nest. During the return trip, the quantity of pheromones that an ant leaves on the ground may depend on the quantity and quality of the food. The pheromone trails will guide other ants to the food source. However, if over time ants do not visit a certain path, pheromone trails start to evaporate, thus reducing their attractive strength. The more the time an ant needs to travel down the path and back again, the less the pheromone trails are reinforced. The indirect communication between the ants via pheromone trails enables them to find the shortest paths between their nest and food sources. From an algorithmic point of view, the pheromone evaporation process is useful for avoiding the convergence to a local optimum solution. Fig. 4-1 shows two possible paths from the nest to the food source, but one of them is longer than the other one. Fig. 4-1(a) shows how ants will start moving randomly at the beginning to explore the ground and then choose one of two paths. The ants that follow the shorter path will naturally reach the food source before the others ants, and in doing so the former group of ants will leave behind them a pheromone trail. After reaching the food, the ants will turn back and try to find the nest. Moreover, the ants that perform the round trip faster strengthen more quickly the quantity of pheromone in the shorter path, as shown in Fig. 4-1(b). The ants that reach the food source through the slower path will find attractive to return to the nest using the shortest path. Eventually, most ants will choose the left path as shown in Fig.4-1(c).
  • 51. 2015-2016 Page 39 Figure ‎4-1 Adaptive behavior of ants 4.2.2 Ant Colony Optimization The above behavior of real ants has inspired ACO. One of its main ideas is exploiting the indirect communication among the individuals of an ant colony. ACO employs pheromone trails as a kind of distributed numerical information which is modified by ants to reflect their accumulated experience while solving a particular problem. At each execution step, ants compute a set of feasible moves and select the best one (according to some probabilistic rules) to carry out all the tour. The transition probability for moving from a place to another is based on the heuristic information and pheromone trail level of the move. The higher the value of the pheromone and the heuristic information, the more profitable it is to select this move and resume the search. 4.2.3 Basic Steps for ACO Algorithm: Basic Steps for ACO 1. Initialize the pheromone 2. While criteria not satisfied, then repeat 3. Initially set locations of all ants on an entry state 4. Selection of next state 5. While not reached to the final state then repeat from step 4, if reached then Step 6. 6. Pheromone stages (deposit, daemon and evaporate pheromone) 7. Check whether criteria satisfied or not, if satisfied then end, if not then repeat from step 2. 8. End.
  • 52. 2015-2016 Page 40 Figure ‎4-2 Flowchart of ant colony optimization 4.2.4 Advantages and disadvantages of ACO 4.2.4.1 ACO Advantages 1- Inherent Parallelism. 2- Used in dynamic application. 3- Positive feedback leads to rapid discovery of good solutions. 4- Distributed computation avoids premature convergence. 5- The greedy heuristic helps find acceptable solution in the early solution in the early stages of the search process. 6- The collective interaction of a population of agents. 4.2.4.2 ACO Disadvantages 1- Theoretical analysis is difficult. 2- Sequence of random decision (not independent). 3- Probability distribution changes by iteration. 4- Research is experimental rather than theoretical. 5- Time of convergence uncertain.
  • 53. 2015-2016 Page 41 4.3 The Bin Packing Problem Definition: Given a list of objects and their weights, and a collection of bins of fixed size, find the smallest number of bins so that all of the objects are assigned to a bin. Bin packing is an NP-hard combinatorial optimization problem, based on the partition problem. Finding the optimal solution is known to be exponentially difficult. One solution methodology is to formulate the problem as an integer programming problem. The run-time performance of traditional exact methods, such as branch and bound, degrade as the problem size increases, however. In order to handle larger problems, heuristic methods have been developed. Some of the more popular algorithms are given in the following discussion.  Next Fit Heuristic (BP-NF). Place the items in the order in which they arrive. Place the next item into the current bin if it fits. If it does not, close that bin and start a new bin. Example: Given the set of items S = {4, 8, 5, 1, 7, 6, 1, 4, 2, 2} and bins of size 10, pack the items into as few bins as possible using Next Fit. The results of using the Next fit algorithm are shown in the figure below. Figure ‎4-3 Packing under Next Fit  First Fit Heuristic (BP-FF). Place the items in the order in which they arrive. Place the next item into the lowest numbered bin in which it fits. If it does not fit into any open bin, start a new bin. Example: Given the set of items S = {4, 8, 5, 7, 6, 1, 4, 2, 2, 1} and bins of size 10, pack the items into as few bins as possible using First Fit. The solution is shown here.
  • 54. 2015-2016 Page 42 Figure ‎4-4 Packing under First Fit  Best Fit Heuristic (BP-BF): The general idea is to obtain the best global packing by getting the best local packing of individual bins. Place the items in the order in which they arrive. Place the next item into that bin which will leave the least room left over after the item is placed in the bin. If it does not fit in any bin, start a new bin. Example: Given the set of items S = {4, 8, 5, 1, 7, 6, 1, 4, 2, 2} and bins of size 10, pack the items into as few bins as possible using Best Fit. Figure ‎4-5 Packing under Best Fit In this example, it turns out that the packings for BP-FF and BP-BF are the same.  Worst Fit Heuristic (BP-WF): Place the items in the order in which they arrive. Place the next item into that bin which will leave the most room left over after the item is placed in the bin. If it does not fit in any bin, start a new bin. Example: Given the set of items S = {4, 8, 5, 1, 7, 6, 1, 4, 2, 2} and bins of size 10, pack the items into as few bins as possible using Worst Fit. Figure ‎4-6 Packing under Worst Fit
  • 55. 2015-2016 Page 43 4.4 Proposed Energy Efficiency VM allocation based on ACO To find the optimal solution of a VM allocation problem is NP-hard [Jung et al., 2010], therefore it is interesting to use heuristics instead of calculating the exact solution, for efficiency reasons, since a slow algorithm would not be interesting in real data centers receiving several requests to allocate new VMs at every second. To efficiently and dynamically manage the VM resources, in this section, we first present VM allocation problem. Then the problem is formulated as a combinatorial optimization problem (COP). After that we come up with the solution for this problem using ACO based approach to reduce Energy consumption while providing desirable QoS for customers. The motivation of using ACO is that the VMP is formulated as a COP while ACO has been widely accepted as a promising approach to solve various COPs. ACO algorithm can be applied to any combinatorial problem as far as it is possible to define: 1. Problem representation represents the problem as a graph which allows ants to incrementally build/ modify solutions. 2. A constraint satisfaction method which forces the construction of feasible solutions. 3. The heuristic desirability η of edges. 4. A pheromone updating rule which specifies how to modify pheromone trail τ on the edges of the graph. 5. A probabilistic transition rule of the heuristic desirability and of pheromone trail. 4.4.1 Problem Representation A cloud data center consists of a large number of heterogeneous PMs with different resource capacities. At any given time, a cloud data center usually serves many simultaneous users and as a result, VMs with different resource capacities are created on PMs. Several VMs may be deployed into a PM, and the number of the VMs in each PM can be different from each other. However, an VM can be allocated to only one PM.
  • 56. 2015-2016 Page 44 Let: P = {P1, P2, . . . , PM} be the set of all the PMs in a data center, where M is the number of PMs and Pj, ∀j = 1, . . . , M represents the j-th PM. V = {V1, V2, . . . , VN} be the set of all the virtual machines in a data center, where N is the number of VMs and Vi, ∀i= 1, . . . , N represents the i-th VM. The problem is represented as a graph G= (K, E) where the set of nodes K represents the PMs and VMs and the set of edges E the connections between the host and VM as shown in Figure 4-3. All ants are placed at the starting Hosts randomly. During an iteration ants build solutions to the VM allocation problem by moving from one host to another until they complete a tour (all VMs have been allocated). Each ant represents one VM. Iterations are indexed by t, 1< t < tmax, where tmax is the maximum number of iterations allowed. Figure ‎4-7 Problem representation of VM Allocation
  • 57. 2015-2016 Page 45 4.4.2 System models and problem formulation In a cloud environment, we have a pool of server nodes with applications running on them. Suppose that the cluster is fully virtualized and all the applications are running on VMs. The problem of VM placement across a pool of server nodes is related to the multidimensional vector packing problems. Dimensions in the packing problem are resource utilizations. For simplicity, we consider CPU and Memory resources. If two VMs are running on the same server, the CPU and Memory utilization of the server is estimated as the sum of the CPU and Memory utilizations of the two VMs For example, let (25%, 30%) be a CPU and memory request of one VM, and (35%, 40%) be that of another VM, the utilizations of a server accommodating the two VMs are estimated at (60%, 70%). To prevent CPU usage of a server from reaching 100%, we have to impose an upper bound on resource utilization of a single server with some threshold value. The main idea behind this is that 100% utilization can cause severe performance degradation and VM live migration technology consumes some amount of CPU processing capability on the migrating node. 4.4.2.1 Resource utilization model Resources of physical server are consumed by VMs which are allocated on this server. So, we can represent the resource utilization as sum of the resource demand of all VMs allocated to this server. 𝑈𝑐𝑗 = (𝑥𝑖𝑗 𝑛 𝑖=1 . 𝑉𝑐𝑖 ) 4.1 𝑈𝑚𝑗 = (𝑥𝑖𝑗 𝑛 𝑖=1 . 𝑉 𝑚𝑖 ) 4.2 When 𝑉𝑐𝑖 and 𝑉 𝑚𝑖 are CPU and memory demand of VMi (1≤i≤N). xij is binary variable indicates if VMi is assigned to server j or not. 𝑈𝑐𝑗 and 𝑈𝑚𝑗 represent the current CPU and Memory utilization of server j.
  • 58. 2015-2016 Page 46 4.4.2.2 Power consumption model The power consumed by a physical server comes from CPU, memory and storage systems. Recent studies show that the power consumption of servers can be accurately described by a linear relationship between the power consumption and CPU utilization. In order to save energy, servers are turned off when they are idle. Hence, their idle power is not part of the total energy consumption. Finally, we defined the power consumption of the jth server as a function of the CPU utilization as shown in Eq. 4.3. 𝑝𝑗 𝑖𝑑𝑙𝑒 + 𝑝𝑗 𝑏𝑢𝑠𝑦 − 𝑝𝑗 𝑖𝑑𝑙𝑒 × 𝑈𝐶𝑗 ,𝑈𝑐𝑗 >0 4.3 0 otherwise Where Pidle is the power consumed by an idle server, Pbusy is the power consumed by a fully loaded server. Ucj represent the CPU utilization of server j. Real data shows that typically Pidle is around 0.6 x Pbusy, and is hardly lower than 0.5 x Pbusy. 4.4.2.3 Problem formulation Next, we formalize the VM placement optimization problem, suppose that we are given N VMs (applications) i ∈ I that are to be placed on M servers j ∈ J. For simplicity, we consider only CPU and memory resources. Each physical server j (1≤j≤M) has CPU capacity 𝑝𝑐𝑖 and memory capacity 𝑝 𝑚𝑖 . Let Tc j, Tm j be the threshold of CPU and memory utilization associated with jth server respectively. 𝑈𝑐𝑗 and 𝑈𝑚𝑗 represent the CPU and memory that have been used by all the VMs deposited on server j. We use two binary variables xij and yj. The binary variable xij indicates if VMi is assigned to server j and the binary variable yj indicates whether server j is in use (yj=1) or not (yj=0). The goal is to find the allocations of the VMs on physical servers such that the power consumed by all the equipments is minimized and resources are highly utilized. We assume that none of the VMs requires more resources than can be provided by a single server. The placement problem can therefore be formulated as: Pj =
  • 59. 2015-2016 Page 47 The objective function: 𝑀𝑖𝑛𝑖𝑚𝑖𝑧𝑒 𝑝 = 𝑝𝑗 = [𝑦𝑗 𝑚 𝑗=1 𝑀 𝑗=1 × 𝑝𝑗 𝑏𝑢𝑠𝑦 − 𝑝𝑗 𝑖𝑑𝑙𝑒 × 𝑈𝑐𝑗 + 𝑝𝑗 𝑖𝑑𝑙𝑒 ] 4.4 Where p is the total power consumed by all servers included in the solution. Eq. 4.4 means the less power consumed, the solution is better. Constraints: Subject To: 𝑥𝑖𝑗 𝑚 𝑖=1 = 1 ∀ 𝑖 ∈ 𝐼 4.5 𝑥𝑖𝑗 ≤ 𝑦𝑗 ∀ 𝑖 ∈ 𝐼, 𝑗 ∈ 𝐽 4.6 𝑈𝑐𝑗 ≤ 𝑇𝑐𝑗 ∀ 𝑗 ∈ 𝐽 4.7 𝑈𝑚𝑗 ≤ 𝑇 𝑚𝑗 ∀ 𝑗 ∈ 𝐽 4.8 𝑦𝑗 , 𝑥𝑖𝑗 ∈ [0,1] ∀ 𝑖 ∈ 𝐼, 𝑗 ∈ 𝐽 4.9 Constraint (4.5) assigns a VMi to one and only one of the servers. Constraint (4.6) if any VMi is allocated to a server j, then the status of the server j must be on. Constraints (4.7) and (4.8) model the capacity constraint of the server. Constraint (4.9) defines the domain of the variables of the problem. Given a set of N VMs and a set of M PMs, there are a total of M N possible VM placement solutions. It is therefore typically impractical to make a complete enumeration of all possible solutions to find the best solutions. The following shows how to apply an ACO algorithm to efficiently search for good solutions in large solution spaces. 4.4.3 The description of the proposed ant colony algorithm All ACO algorithms adapt the algorithm scheme explained next. After initializing the pheromone trails and control parameters, a main loop is repeated until a stopping criterion is met (e.g., a certain number of iterations to perform or a given time limit without improving the result). In this loop, ants construct feasible solutions and update the associated pheromone trails. Furthermore, partial problem solutions are seen as nodes
  • 60. 2015-2016 Page 48 (an abstraction for the location of an ant); each ant starts to travel from a random node and moves from a node i to another node j of the partial solution. At each step, the ant k computes a set of feasible solutions to its current node and moves according to a probability distribution. 4.4.3.1 Probabilistic Decision Rule For an ant k the probability pk ij to move from a node i to a node j is: Where: Ƞij is the attractiveness of the move as computed by some heuristic information indicating a prior desirability of that move. Ʈij is the pheromone trail level of the move, indicating how profitable it has been in the past to make that particular move (it represents therefore a posterior indication of the desirability of that move). 𝛼 and 𝛽 are two parameters which determine the relative influence of the pheromone trail and the heuristic information, The role of the parameters 𝛼 and 𝛽 is the following. If 𝛼 = 0, the heuristic is used for selection. If 𝛽 = 0, only pheromone trial is at work. allowed k is the set of active servers that still have sufficient resources to host VMi 𝑎𝑙𝑙𝑜𝑤𝑒𝑑 𝐾 = 𝑗 (( 𝑥𝑗𝑘 . 𝑉𝑐 𝑘 + 𝑉𝑐𝑖) ≤ 𝑇𝑐𝑗 ) ^𝑖−1 𝑘=1 (( 𝑥𝑗𝑘 . 𝑉𝑚 𝑘 + 𝑉𝑚𝑖) ≤ 𝑇𝑚𝑗 )𝑖−1 𝑘=1 𝑦𝑗 = 1, ∀ 𝑗 4.11 4.10
  • 61. 2015-2016 Page 49 The higher the pheromone value and the heuristic information, the more profitable it is to include j in the partial solution. The initial pheromone level is a positive integer Ʈ0. In nature, there is not any pheromone on the ground at the beginning (i.e., Ʈ0 =0). However, the ACO algorithm requires Ʈ0 > 0, otherwise the probability to chose the next state would be pk ij = 0 and the search process would stop from the beginning. An ant selects a server according to the rule as follow: 𝑗 = arg 𝑚𝑎𝑥 𝑠 ∈𝑎𝑙𝑙𝑜𝑤𝑒𝑑𝐾 𝑝 𝑖𝑗 𝑘 𝑖𝑓𝑞 ≤ 𝑞0 𝐽, 𝑜𝑡ℎ𝑒𝑟𝑤𝑖𝑠𝑒 4.12 When q0 (0≤q0≤1) is a parameter, q (0≤q≤1) is a random number. 𝑎𝑙𝑙𝑜𝑤𝑒𝑑𝐾 is the set of servers that still have sufficient resources to host VMi. J is a random number selected according to probability distribution calculated by Eq. 4.10 above. This selection way can increase the randomness to avoid local optimum. 4.4.3.2 Heuristic Information The heuristic information is important in the solution construction. It represents the desirability to assign VMi to server j. Good heuristic information guides the ants to move targeted. It’s related to the improvement that VMi can contribute to improve the objective function by selecting the server j that will be utilized the most by placing the VM in it to achieve higher resource utilization and as a result reduce number of physical servers and reduce energy consumption. We should mention here that we already consider the QoS by assign upper threshold and keep utilization under this threshold. Mathematically; the heuristic information of placing VMi on Sj can be calculated as: 𝜂 𝑖, 𝑗 = 1 𝑇𝐶 𝑗 −(𝑈𝐶 𝑗 + 𝑉𝑐𝑖) + 𝑇𝑚 𝑗 −(𝑈𝑚 𝑗 + 𝑉𝑚𝑖 ) 𝑖𝑓 𝑆𝑗 ∈ 𝑎𝑙𝑙𝑜𝑤𝑒𝑑 𝑘 4.13 0 𝑜𝑡ℎ𝑒𝑟𝑤𝑖𝑠𝑒 Where Tcj and Tmj represent the CPU and memory upper threshold of server Si. Uci and Umi represent the CPU and memory that has been used of Server j. 𝑉𝑐𝑖 and 𝑉𝑚𝑖 represent CPU and memory demands of current VM.
  • 62. 2015-2016 Page 50 4.4.3.3 Pheromone trail update The ants communicate indirectly through the pheromone information. One may consider. There are two different pheromone structures: one that associates a pheromone trail with every movement VM-Server, or one that associates a pheromone trail with every pair of VMs. In this work, the first way of laying pheromone trails is used, i.e., the pheromone trail τ i j will be defined as the favorability of packing VMi into Server j. The pheromone update comprises local update and global update. Local pheromone update is followed by an ant that has finished building its solution, the local pheromone is update as: 𝜏 𝑖, 𝑗 = 1 − 𝜌 . 𝜏 𝑖, 𝑗 + 𝜌. 𝜏0 4.14 The global pheromone updating is applied after the best current solution is found. It increases the pheromone value on hosts in the best solution. In this way, the algorithm can converge faster. The pheromone deployed on Sj in the current best solution is updated as: 𝜏 𝑖, 𝑗 = (1 − 𝜀). 𝜏 𝑖, 𝑗 + 𝜀. ∆𝜏(𝑖, 𝑗) 4.15 Where: ∆𝜏(𝑖, 𝑗) Represents additional added pheromone ∆𝜏 𝑖, 𝑗 = 1 𝑃(𝑠) 4.16 Where P(s) is the normalized power consumption of the solution S. and its value is calculated according to the following equation: 𝑃 𝑠 = 𝑃𝑗 𝑝 𝑗 max 𝑀 𝑗=1 4.17 Normally, the quantity of the added pheromone depends on the quality of the solution.
  • 63. 2015-2016 Page 51 4.4.4 Interquartile Range (IQR) method for finding dynamic threshold The interquartile range (IQR) is a measure of statistical dispersion of data and an estimate of variability, based on dividing a data set into quartiles. It is also called as middle fifty and midspered. It is the difference between the upper and lower quartile in a data set. In this work; to find utilization upper threshold, we will use historical data from the resource usage by VMs For decision making about when a host must be considered as an overloaded host and We use Interquartile Range (IQR) method to design an adaptive utilization threshold method. IQR=Q3 - Q1 4.18 Where Q1 and Q3 are the 25th percentile and 75th percentile respectively of a sorted set. Then the upper threshold for host Hi is found by Eq. 4.19. UpTht=1 – sp. IQR 4.19 Where sp ∈ R+ is a parameter of the method that defines how aggressively the system consolidates VMs is. In other words, the parameter sp allows the adjustment of the safety of the method, the lower sp, the less the energy consumption, but the higher the level of SLA violations caused by the allocation. Here value for sp is 1.5. Steps for finding Interquartile Range based threshold: 1. Sort the data set in increasing order. 2. Find the median for the ordered set. 3. Divide the data set into two halves. 4. Find the median for the first half of the ordered data set (Lower Quartile Q1). 5. Find the median for the second half of the ordered data set (Upper Quartile Q3). 6. IQR = Upper Quartile – Lower Quartile. 7. UpTht=1 – sp. IQR Here data set defines set of the host utilization.
  • 64. 2015-2016 Page 52 Example: Let us assume the utilization of each host (in terms of percentage). List of host utilization [70,62,64,72,63,64,81,77,81,76] 1. After sorting [62 , 63 , 64 , 64 , 70 , 72 , 76 , 77 , 81 , 81] 2. Median = (70+72) / 2 =71 3. First half [62 , 63 , 64 , 64 , 70], Second half [72 , 76 , 77 , 81 , 81] 4. Median of the first half =64, which is Q1. 5. Median of Second half = 77, which is Q2. 6. IQR= 77 – 64 = 13 7. UpThr= 1 – 1.5 (0.77-0.64) = 1 – 0.195 = 0.805 = 80.5 % Figure ‎4-8 Interquartile Range Threshold 4.4.5 The complete proposed algorithm In Algorithm.1 each ant works independently and tries to find best allocation for VMs with regarding to energy consumption. Each ant constructs a solution Sk and after find the solution, it will update the local pheromone. When all ants finish, their solutions will be evaluated to find the best solution. Evaluation will be according to number of active servers and energy consumption; the less the servers used and the less the energy consumed, the better solution. Then, apply global pheromone update to the servers of best solution. Repeat this procedure while stop criteria is not reached; here stop criteria is equal to max number of iterations. Every iteration finds a best solution and compares with previous best solution. Finally, after NI; number of iterations, the algorithm returns the best solution which represents the best VMs allocation.
  • 65. 2015-2016 Page 53 Algorithm 1. ACO-based Allocation Algorithm Input: Hosts : List of servers with capacity constraint VMs : List of VMs with resource demand Set of parameters. Output: VM Allocation /*Initialization*/ 1. Set the value of the parameters 2. Initialize all the pheromone values of all hosts to Ʈ0 /*Iterative Loop*/ 3. For n= 1 to NI (number of iterations) do 4. For K=1 to Nant (number of ants) do /* Construct a solution */ 5. Sk=AntK.constructSolution(VMs, Hosts) 6. Local pheromone updating 7. End For /* number of ants */ /* Evaluation */ 8. Evaluate each solution Sk by calculating objective function value 9. Select the best solution /* which consume less energy */ 10. Global pheromone update 11. End For /*number of iteration */ 12. Return bestSolution Algorithm.2 shows how an ant constructs a solution. Each ant starts with a set of servers including one random server at the beginning. An ant allocates virtual machines one by one to this server while it is suitable for resource requirements. If not, turn on a new server and allocate the VM on it. A server is suitable for VM if it has a free amount of processing power and memory under threshold greater than or equal to that of required by the unallocated VM. If the active server set Sk contains more than one server that are suitable for VM then the ant choose the server with highest defined probability and allocate VM to it.