SlideShare a Scribd company logo
International Research Journal of Engineering and Technology (IRJET) e-ISSN: 2395-0056
Volume: 09 Issue: 03 | Mar 2022 www.irjet.net p-ISSN: 2395-0072
© 2022, IRJET | Impact Factor value: 7.529 | ISO 9001:2008 Certified Journal | Page 1
A Host Selection Algorithm for Dynamic Container
Consolidation in Cloud Data Centres using Particle Swarm
Optimization
Prof.Radwan Saleh Dandah1, Dr.Kasem Kabalan2, Eng.Hayyan Rajab3
1 Professor, Department of Systems and Computer Networks, Faculty of Information Engineering, Tishreen
University, Lattakia, Syria
2 Assistant professor, Department of Systems and Computer Networks, Faculty of Information Engineering,
Tishreen University, Lattakia, Syria.
3 Postgraduate student (Phd), Department of Systems and Computer Networks, Faculty of Information
Engineering, Tishreen University, Lattakia, Syria.
---------------------------------------------------------------------***---------------------------------------------------------------------
Abstract - One of the leading causes of excessive
energy consumption in cloud data centers is inefficient
resource use. To address the issue,researchersproposed the
Dynamic Container consolidation approach, which aims to
consolidate containers into the fewest number of VMs and
hosts. In this research, we introduce a novel host selection
policy for container consolidation calledtheEnergyEfficient
Particle Swarm Optimization (EE-PSO) Algorithm to reduce
energy consumption while maintaining the required
performance levels in a cloud data center. We performed
experimental evaluations using the ContainerCloudSim
toolkit to validate the proposed algorithm's effectiveness
with real-world workloads. The simulation results show
that our proposed algorithm outperforms existing works in
terms of energy consumption, QoS guarantees, number of
newly created VMs, and number of container migrations.
Key Words: Cloud Computing, Container as a Service
(CaaS), Energy Efficiency, Dynamic Container
Consolidation, Particle Swarm Optimization.
1.INTRODUCTION
As a result of the rise of web-based applications such as
micro-services and server-less architectures, containers
have become more popular for creating an isolated, low
overhead environment for deploying applications [1].
Container is an operating system-level virtualization that
offers various advantages over virtual machines, including
lightweight, mobility, low start-up time, and low resource
usage [2]. Thus, containers might be seen as a new
revolution in the cloud era and have been adopted from
many cloud providers. Container as a service (CaaS) is the
new service model that has been introduced in addition to
traditional cloud services, including software as a service
(SaaS), platform as a service (PaaS), and infrastructure as a
service (IaaS).
Containers can be deployed either on physical machines
or on virtual machines. Although deploying containers
without the overhead of the hypervisor achieves high
performance levels, there are some limitations for usingthis
model such as: the dependency between containers and
operating system type, suffering fromsecuritythreatsdue to
the fact that containers do not provide the same level of
isolation as VMs [3]. Consequently, many cloud providers
use a two-level virtualization architectureas showninFig -1.
Host OS
Hardware
Hypervisor
Container Engine
Guest OS2
VM2
Container Engine
App
C3
Bins/Libs
App
C4
Bins/Libs
Guest OS1
VM1
App
C1
Bins/Libs
App
C2
Bins/Libs
Fig -1: Two-level virtualization architecture [4]
In order to meet the increasing demand for cloud
services, there has been a significant expansion in building
data centers around the world, and statistics indicate that
there are approximately 8.2 million data centers [5]. A
International Research Journal of Engineering and Technology (IRJET) e-ISSN: 2395-0056
Volume: 09 Issue: 03 | Mar 2022 www.irjet.net p-ISSN: 2395-0072
© 2022, IRJET | Impact Factor value: 7.529 | ISO 9001:2008 Certified Journal | Page 2
recently published study showed that data centers
consumed about 205 TWh during 2018, which represents
about 1% of global electricity consumption [6], and
expectations indicate that this number could reach about
353 TWh by 2030 [7].
Servers are responsible for a large part of the power
consumed in a cloud data center. Consequently,reducingthe
number of active servers, through dynamic consolidation of
containers (or virtual machines), can significantly reduce
power consumption while maintaining quality of service.
The following issues should be able to be addressed by any
container consolidation framework: [8]:
 When the host is detected as being overloaded and
unable to provide the required resources for
containers and virtual machines running on this
host?
 Which containers should be selected to migrate
from an overloaded host?
 When the host is identifiedasbeingunderloaded?Is
it possible to migrate all hosted containers andshut
down this host?
 How to choose a destination (host/VM) for
migrated containers?
According to the above questions, there are four sub-
problems in dynamic container consolidation, in this paper
we will focus on the sub-problem of destination host
selection.
2. Related Work:
In contrast to the substantial study on energy efficiency
of computing, for virtualized cloud data centers, only a few
studies explored the challenge of energy efficient container
management.
In [7], the researchers proposed a framework for
container dynamic consolidation on virtual machines. They
used static thresholds to determine the status of the hosts,
Maximum Usage (MU) and Most Correlated (MCor) to select
containers from overloaded hosts, First Fit (FF), least full
(LF), and Correlation threshold (CorHs) to select a
destination host for a migrated container, and finally, they
used First Fit to place the migrated containers ona VMatthe
selected destination.
In [9], the researchers evaluated some of the container
placement algorithms, including First Fit, Least Full, Most
Full, and Random. These algorithms are used to select a
running virtual machine on the host to be allocated to the
container. The results showed that First Fit outperforms all
the other algorithms in terms of energy consumption and
number of migrations.
In [10], the authors showed the relationship between
container and host selection policy. ACO, Least Full, Most
Full, Most Correlated, Least Correlated, Max Variance, and
Min Variance were considered for host selection, while for
container selection, they considered max-correlated, max-
variance, max-usage, and min-variance. They achieve a
superior result using the maximum-variance host selection
strategy and the greatest utilization container selection
policy.
In [11], the researchers proposed MESF,ormostefficient
server first, which is a greedy containerplacementtechnique
that assigns containers to the most energy efficient
computers first. The suggested MESF method may greatly
improve energy usagewhen comparedtotheLeastAllocated
Server First (LASF) and random scheduling schemes,
according to simulation findings utilizing an actual set of
Google cluster data as task input and machine set.
In [12], the researchers designed a fitness function to
evaluate the resource wastage of VMs and Hosts, then they
used Best Fit algorithm to create VMs in the hosts, and ACO
to place containers on these VMs.
3. Background:
3.1 Data Center Power Model:
The power consumption of a data center at time t
( ) can be calculated as the sumofpowerconsumption
of its servers at time t ( ) as shown in equation 1.
(1)
where is the number of servers. According to [13]
there is a linear relationship between the CPU utilization
and power consumption of the server. This relation can be
formulated as follows:
(2)
where is the CPU utilization of server i at time t,
and represent theconsumed powerwhentheserveris
idle, or fully utilized respectively.
3.2 SLAV Metric:
Meeting QoS requirements is a very critical issueincloud
computing environment. These requirements can be
formulated using several metrics such as: minimum
throughput or maximum response time, but due to the fact
that we do not have any prior knowledge about the behavior
of the application running inside the container, it is
important to identify a metric which does not depend on the
workload. Researchers in [14] showed that the SLA can be
violated if the virtual machine cannot get the required CPU
which has been requested. Equation 3 shows how to
calculate the SLAV metric:
(3)
International Research Journal of Engineering and Technology (IRJET) e-ISSN: 2395-0056
Volume: 09 Issue: 03 | Mar 2022 www.irjet.net p-ISSN: 2395-0072
© 2022, IRJET | Impact Factor value: 7.529 | ISO 9001:2008 Certified Journal | Page 3
where , are the number of VMs, the number of SLA
Violations respectively, and ,
are CPU amount requested and allocated
by VM j on server i at the time at which the violation p
happened.
3.3 System Model:
In order to consolidate containers on the minimum
number of virtual machines and hosts, we will use a similar
model to the proposed model in [8], which consists of two
modules: Host Status Module and Consolidation Module.
The Host Status Module exists in each active host, and it
has three main components:
 Host Over-load/ Under-Load Detector: This
component is responsible of deciding if the host is
detected as being either over-loaded or under-loaded.
In this research, the resource utilization is checked
every 5 minutes using static thresholds to identify the
status of the host.
 Container Selector: Thiscomponentdetermineswhich
containers should be selected to migrate from an
overloaded host.
 Container Migration List: This list storesall containers
selected by the Container Selector component.
The Consolidation Module runs on a separate host. This
module is responsible for choosing a destination (host/VM)
for migrated containers, and consists of the following
components:
 Over-loaded Host List
 Over-loaded Destination Selector: This component
uses a host selection policy to select a destinationfora
migrated container from an over-loaded host, and a
container placement policy to choose one of the
running VMs on that host to be allocated to the
container. If there is no running vm to host a migrated
container, the Vm Creator component is called.
 VM Creator: this component creates the largest
possible vm on the host and assign the container to it.
 Destination List: This component stores the migration
map decided by the over-loaded Destination Selector.
 Under-loaded Host List: This listcontainsall hoststhat
are identified as under-loaded after finding a
destination for all migrated containers from over-
loaded hosts.
 Under-loaded Destination Selector: This component
tries to find appropriate destinations for all hosted
containers by an under-loaded host. If this mission
could be achieved, it sends the hostIDtounder-loaded
host deactivator component.
 VM-Host Migration Manager: This componenttriggers
the migration process after selecting all destinations.
 Under-loaded Host Deactivator: after migrating all
containers of an under-loaded host, this component
turns it off.
3.4 Standard Particle Swarm Optimization
PSO is a meta-heuristic algorithm that wasintroducedby
Eberhart and Kennedy in 1995[15]. It mimics the social
behavior of a flock of birds searching for food. Each bird
inside the algorithm is called a particle, andeachparticlehas
a position vector that represents one of the possible
solutions to the problem, as well as a velocity vector that
describes its movement within the solution space. First, the
position vectors are generated randomly. Second, at each
iteration of the algorithm, each particle moves to a new
position which depends on the values of the following: the
particle's velocity in the previous iteration, the best position
found by the particle (pbest); and the best position found in
the entire swarm (gbest). The positions are evaluated using
a fitness function. The following equations are used to
calculate the new position and velocity vectors. [16]:
(5)
where:
: velocity vector of particle i at iteration t
: velocity vector of particle i at iteration t+1
: current position of particle at iteration t
: new position of particle i at iteration t+1
: personal best position of particle i
: global best position
w: inertia weight
c1,c2: cognitive and social learning parameters
respectively
rand1,rand2 : random values between 0 and 1
Fig-2 shows the flowchart of the algorithm.
(4)
International Research Journal of Engineering and Technology (IRJET) e-ISSN: 2395-0056
Volume: 09 Issue: 03 | Mar 2022 www.irjet.net p-ISSN: 2395-0072
© 2022, IRJET | Impact Factor value: 7.529 | ISO 9001:2008 Certified Journal | Page 4
Start
Swarm initialization
Particle fitness evaluating
Calculating the individual
historical optimal position
Calculating the swarm
historical optimal position
Updating particle velocity and
position according to the velocity
and position updating equation
Satisfying the
ending condition?
End
Yes
No
Fig-2: Flowchart of PSO [17]
4. Proposed Method:
4.1 Initialize Particles:
In the standard PSO, initial particles are generated
randomly. However, this randomness reduces the
algorithm’s likelihood of converging to the optimal solution.
As a result, effective initialization solutions can vastly
increase its performance [18]. In our proposed method, we
choose a random container from the migrated container list
and assign it to an available host using the algorithm
described in Fig-3. This approach ensures thattheinitialized
solutions are good and feasible. The proposed host selection
method is considered a modified version of the well-known
bin-packing algorithm, First Fit. The hosts are arranged in
descending order according to their power efficiencies and
CPU utilization, respectively. The power efficiency of a host
is a ratio between its CPU capacity and its maximum
consumed power [19]. The algorithm examines hosts and
their running VMs one by one. If there is a suitable vm and
the host would not become overloadedaftertheallocationof
the container, the selected host along with the selected vm
are returned as the destination of the migrated container. If
there is no running vm, the algorithm tries to create the
largest possible VM on that host and assigns the container to
it. It is important to note that creating VMs is only done in
the process of finding destinations for migrated containers
from overloaded hosts. Theotherdifferencebetweenfinding
destinations for migrated containers from overloaded and
underloaded hosts is the excluded hosts list, which includes
the overloaded hosts in the first phase, and overloaded,
switched off, and hosts which have been selected as
destinations in the second phase.
Algorithm1: Destination Selection Process
Input: hostList,excludedHosts,container
Output: Destination(allocatedHost, allocatedVM)
1: allocatedHost NULL;
2: allocatedVM NULL;
3: hostList sort(hostList,PE,U,’Des’);
4: foreach host in hostList do
5: if excludedHosts.contains(host) then
6: continue;
7: end if
8: vmList host.getVmList();
9: foreach vm in vmList do
10: if (vm.isSuitable(container) and
host.isNotOverLoadedAfterAllocation(vm,contain
er)) then
11: allocatedHost host;
12: allocatedVM vm;
13: break;
14: end if
15: end foreach
16: if (allocatedVM == NULL) then
17: newVM = host.createLargestPossibleVM();
18: if (newVM != NULL) then
19: if (newVM.isSuitable(container) and
host.isNotOverLoadedAfterAllocation(newV
M, container)) then
20: allocatedHost host;
21: allocatedVM vm;
22: break;
23: end if
24: end if
25: end if
26: end foreach
27: return Destination;
Fig-3: Destination Selection Process
International Research Journal of Engineering and Technology (IRJET) e-ISSN: 2395-0056
Volume: 09 Issue: 03 | Mar 2022 www.irjet.net p-ISSN: 2395-0072
© 2022, IRJET | Impact Factor value: 7.529 | ISO 9001:2008 Certified Journal | Page 5
4.2 Fitness Function:
To formulate the fitness function of our proposed
algorithm, we use a multi-criteria algorithm called TOPSIS
[20]. According to this method, the best solution is the one
which has the greatest distance from the negative-ideal
solution and the smallest distance from the positive-ideal
solution. There are four criteria depicted in table 1 used to
rank the particles.
Table-1: Considered Criteria in Fitness Function
No criteria Description Cost/benefit
1
Energy
Consumption
The new power
consumption of the
data center after
container
migrations
Cost
2
Number of
Successfully
migrated
containers
The higher this
number, the higher
the probability that
the overloaded
host will return to
normal state, and
the under-loaded
host will be shut
down
Benefit
3
The Sum of
Energy
Efficiency
Factors of
Selected Hosts
Selecting the most
energy-efficient
hosts has a great
impact on energy
consumption and
performance
Benefit
4
Number Of
Newley Created
VMs
The lower this
number, the lower
overhead of
launching a new
operating system
Cost
First, we calculate the value of each parameter for every
particle in the swarm. Then, these values are normalized by
dividing them by the maximum value of each parameter
found in the swarm using the equation:
(6)
In the next step, the and are
determined according to the following equations:
Then, the Euclidean distances from the positive ideal
solution and the negative ideal solution
are calculated for each particle using the equation 9 and
equation 10, respectively.
(9)
(10)
Finally, the score of the particle i is calculated using
Equation 11:
(11)
This score is regarded as the fitness function value that
the algorithm seeks to maximize.
4.3 PSO Parameters:
The value of inertia weight w and its changes during the
iterations of the algorithm are very critical to performance.
In our proposed algorithm, we will use the approach
introduced in [21], which leadstogoodresults.,asitdepends
on a linear reduction of w value for 70% of the iterations,
and in the last stages, it gives w a random value within the
range (0.4,0.7), which means greater valuesofwtoallowthe
algorithm to jump outside the local optimal solution. The
equation for calculating w is given as follows:
Where t is the current iteration, T is the total number of
iterations.
When a particle updates its position, the proposed
algorithm checks the feasibility of the new solution. For
simplicity, it examines the statusoftheselectedhostforeach
migrated container one by one, and if there is no suitable vm
(running or newly created), the value of the corresponded
element of the unallocated container at thepositionvectoris
set to null.
The rest of the algorithm parameters are shown in the
Table -2.
(7)
(8)
(12)
International Research Journal of Engineering and Technology (IRJET) e-ISSN: 2395-0056
Volume: 09 Issue: 03 | Mar 2022 www.irjet.net p-ISSN: 2395-0072
© 2022, IRJET | Impact Factor value: 7.529 | ISO 9001:2008 Certified Journal | Page 6
Table-2: PSO Parameters
100
Number of particles
1.4
Initial inertia weight w
0.4
Minimum Value of w
2
Learning factors c1,c2
100
Number of iterations
5. Performance Evaluation:
5.1 Simulation Setup:
To evaluate the performance of our proposed policy, we
will use the ContainerCloudSim toolkit [22]. In our
experiments, the cloud datacenter consists of 100 PMs, 200
VMs, and more than 1000 containers. The characteristics of
their configurations are shown in Table-3. PMs, VMs, and
containers each have 1 TB, 2.5 GB, and 0.1GBofdisk storage.
The network bandwidth of PMs, VMs, and containers is
1GB/s, 10MB/s, and 250KB/s, respectively. Because the
startup delay of each container and VM creation directly
affects the SLA measurements, these startup delays are
significant and are set to 0.4 seconds for containers [8] and
100 seconds for VMs [23].
The CPU utilization of eachcontainerisassignedtooneof
PlanetLab workload traces [19]. These traces consist of 10
days of workload gathered every 5 minutes between March
and April 2011 [9] as shown in Table-4.
We use the First Fit algorithm as a container placement
policy, and the Maximum Usage (MU) algorithm as a
container selection policy.
The performance of our proposed algorithm (EE-PSO) is
compared with the following algorithms: Correlation
Threshold Host Selection (CorHS), First Fit Host Selection
(FFHS), Least Full Host Selection (LFHS), and Most Full Host
Selection (MFHS). This comparison will be done in terms of
energy consumption, SLAV, total number of migrations, and
number of newly created VMs.
Table-4: PlanetLab Workload Traces
Date
Number of
Containers
Mean(%) St.dev(%)
2011/03/03 1052 12.31% 17.09%
2011/03/06 898 11.44% 16.83%
2011/03/09 1061 10.70% 15.57%
2011/03/22 1516 9.26% 12.78%
2011/03/25 1078 10.56% 14.14%
2011/04/03 1463 12.39% 16.55%
2011/04/09 1358 11.12% 15.09%
2011/04/11 1233 11.56% 15.07%
2011/04/12 1054 11.54% 15.15%
2011/04/20 1033 10.43% 15.21%
5.2 Experiment Results:
5.2.1 Scenario 1:
In this set of experiments, the upper and lower
thresholds are set at 80% ,70%, respectively. Because there
are 10 days' workload data, each performance metric might
Table-3: Configuration of PMs, VMs, and containers
PM Configurations and power models
PM type # CPU [3GHz] (mapped on 37274 MIPS Per core)
Memory
(GB)
Pidle(Watt) Pmax(Watt)
# 1 4 cores 64 86 117
# 2 8 cores 128 93 135
# 3 16 cores 256 66 247
Container and VM Types
Container
type #
CPU MIPS (1 core) Memory (MB) VM type #
CPU [1.5 GHz]
(mapped on 18636
MIPS Per core)
Memory
(GB)
# 1 4658 128 # 1 1 core 1
# 2 9320 256 # 2 2 cores 2
# 3 18636 512
# 3 4 cores 4
# 4 8 cores 8
International Research Journal of Engineering and Technology (IRJET) e-ISSN: 2395-0056
Volume: 09 Issue: 03 | Mar 2022 www.irjet.net p-ISSN: 2395-0072
© 2022, IRJET | Impact Factor value: 7.529 | ISO 9001:2008 Certified Journal | Page 7
yield ten results. The average of these results is used as the
final result of the algorithm on the metric. The results
(Charts [1-4]) show that our proposed method outperforms
all the other algorithms for all metricsbecauseouralgorithm
aims to minimize the power consumption in its fitness
function. EE-PSO also maximizes the number of successfully
migrated containers, which means a lower number of
overloaded hosts and SLA violations, anda higher numberof
underloaded hosts that will beshutdown.Ontheotherhand,
selecting the most energy efficient hosts means not only
minimizing the energy but also means higher capacities so
the container will get its required resources and thenumber
of migrations and created VMs will decrease.
Chart -1: Energy consumption in scenario 1
Chart -2: Total number of container migrations in
scenario 1
Chart -3: SLAV in scenario 1
Chart -4: Total number of newly created VMs in
scenario 1
5.2.2 Scenario 2:
In this set of experiments, we will study the effect of
varying the upper-threshold value while keeping the lower
threshold fixed at 70%. The number of containers and their
workload traces are set according to day 1 of Table-4. The
results (Charts [5-8]) show that increasing the upper-
threshold value increases the powerconsumptionmetric for
all algorithms because of the linear relationship between
CPU utilization and energy consumed by the server. Also,
when the upper-threshold is increased,theprobabilitythata
host would be identified as overloaded is decreased, which
in turn decreases the number of containers selected to
migrate, which results in a lower number of VM creations.
On the other hand, the higher the upper-threshold, themore
likely the host will not have adequate resources to adapt to
fluctuations in container resourcerequirements,resultingin
more SLA violations. At all upper-threshold values, our
proposed algorithm performs better than all other
algorithms.
International Research Journal of Engineering and Technology (IRJET) e-ISSN: 2395-0056
Volume: 09 Issue: 03 | Mar 2022 www.irjet.net p-ISSN: 2395-0072
© 2022, IRJET | Impact Factor value: 7.529 | ISO 9001:2008 Certified Journal | Page 8
Chart -5: Energy consumption in scenario 2
Chart -6: Total number of container migrations in
scenario 2
Chart -7: SLAV in scenario 2
Chart -8: Total number of newly created VMs in
scenario 2
5.2.3 Scenario 3:
In this set of experiments, the upper threshold is set at
80%, and the lower threshold will be varied. Also, the
number of containers and their workload traces are set
according to day 1 of Table-4. As shown in Charts [9-12],
decreasing the lower-threshold increases the energy
consumption metric since more hosts will be active, and the
number of migrations will decrease becausefewerhosts will
be identified as underloaded. A lower container migration
rate results in fewer VMsbeingcreated.Althoughthesmaller
number of created VMs when we decrease the lower-
threshold, the size of these VMs will be bigger since we have
more resources to allocate and the possibilitythatthese VMs
will not get their required resources in the future is high,
which results in high SLA violations. The findingsreveal that
the performance of our proposed method outperforms that
of competing algorithms across all metrics and lower-
threshold values.
Chart -9: Energy consumption in scenario 3
International Research Journal of Engineering and Technology (IRJET) e-ISSN: 2395-0056
Volume: 09 Issue: 03 | Mar 2022 www.irjet.net p-ISSN: 2395-0072
© 2022, IRJET | Impact Factor value: 7.529 | ISO 9001:2008 Certified Journal | Page 9
Chart -10: Total number of container migrations in
scenario 3
Chart -11: SLAV in scenario 3
Chart -12: Total number of newly created VMs in
scenario 3
6. CONCLUSION AND FUTURE WORK
Despite the growing popularity of Container as a Service
(CaaS), the energy efficiency of resource management
algorithms in this service paradigm has received little
attention.
In this paper, we introduced A novel host selection
algorithm for container consolidationbytakingadvantageof
particle swarm optimization and energy efficiency of hosts.
Three sets of simulation tests were performed to compare
the performance of our approach with existing algorithms.
Results show that our proposed method outperforms all
competitive algorithms regardingenergyconsumption,total
number of migrations, SLAV, and number of created VMs.
As for future work, we will improve our algorithm to
make it aware of operating system type as a new constraint
for the problem, and will extend our work to solve other
container consolidation sub-problems.
REFERENCES
[1] B. Tan, H. Ma, Y. Mei, and M. J. I. T. o. C. C. Zhang, "A
cooperative coevolution genetic programming hyper-
heuristic approach for on-line resource allocation in
container-based clouds," 2020.
[2] F. Paraiso, S. Challita, Y. Al-Dhuraibi, and P. Merle,
"Model-driven management of docker containers," in 2016
IEEE 9th International Conference on cloud Computing
(CLOUD), 2016, pp. 718-725: IEEE.
[3] O. Smimite and K. J. a. p. a. Afdel, "Container placement
and migration on cloud system," 2020.
[4] C. Zhang, Y. Wang, H. Wu, and H. J. I. A. Guo, "An energy-
aware host resource management framework for two-tier
virtualized cloud data centers," vol. 9, pp. 3526-3544, 2020.
[5] B. K. Sovacool, C. G. Monyei, P. J. R. Upham, and S. E.
Reviews, "Making the internet globally sustainable:
Technical and policy options for improved energy
management, governance and community acceptance of
Nordic datacenters," vol. 154, p. 111793, 2022.
[6] E. Masanet, A. Shehabi, N. Lei, S. Smith, and J. J. S.Koomey,
"Recalibrating global data center energy-use estimates,"vol.
367, no. 6481, pp. 984-986, 2020.
[7] M. Koot and F. J. A. E. Wijnhoven, "Usage impact on data
center electricity needs: A system dynamic forecasting
model," vol. 291, p. 116798, 2021.
[8] S. F. Piraghaj, A. V. Dastjerdi, R. N. Calheiros, and R.
Buyya, "A framework and algorithm for energy efficient
container consolidation in cloud data centers," in 2015 IEEE
International Conference on Data Science and Data Intensive
Systems, 2015, pp. 368-375: IEEE.
[9] P. Mishra, S. Bhatnagar, and A. Katal, "Cloud Container
Placement Policies: A Study and Comparison," in
International Research Journal of Engineering and Technology (IRJET) e-ISSN: 2395-0056
Volume: 09 Issue: 03 | Mar 2022 www.irjet.net p-ISSN: 2395-0072
© 2022, IRJET | Impact Factor value: 7.529 | ISO 9001:2008 Certified Journal | Page 10
International Conference on Computer Networks and
Inventive Communication Technologies, 2019, pp. 513-524:
Springer
[10] W. A. Hanafy, A. E. Mohamed, and S. A. Salem, "Novel
selection policies for container-based cloud deployment
models," in 2017 13th International Computer Engineering
Conference (ICENCO), 2017, pp. 237-242: IEEE.
[11] Z. Dong, W. Zhuang, and R. Rojas-Cessa, "Energy-aware
scheduling schemes for cloud data centers on google trace
data," in 2014 IEEE Online Conference on Green
Communications (OnlineGreencomm), 2014, pp. 1-6: IEEE.
[12] M. K. Hussein, M. H. Mousa, and M. A. J. J. o. C. C. Alqarni,
"A placement architecture for a container as a service(CaaS)
in a cloud environment," vol. 8, no. 1, pp. 1-15, 2019.
[13] D. Kusic, J. O. Kephart, J. E. Hanson, N. Kandasamy, and
G. J. C. c. Jiang, "Power and performance management of
virtualized computing environmentsvia lookaheadcontrol,"
vol. 12, no. 1, pp. 1-15, 2009.
[14] A. Beloglazov, R. J. C. Buyya, C. Practice, and Experience,
"Optimal online deterministic algorithms and adaptive
heuristics for energy and performance efficient dynamic
consolidation of virtual machines in cloud data centers,"vol.
24, no. 13, pp. 1397-1420, 2012.
[15] R. Eberhart and J. Kennedy, "A new optimizer using
particle swarm theory," in MHS'95. Proceedings of the sixth
international symposium on micro machine and human
science, 1995, pp. 39-43: Ieee.
[16] F. Ebadifard, S. M. J. C. Babamir, C. Practice, and
Experience, "A PSO‐based task scheduling algorithm
improved using a load‐balancing technique for the cloud
computing environment," vol. 30, no. 12, p. e4368, 2018.
[17] D. Wang, D. Tan, and L. J. S. C. Liu, "Particle swarm
optimization algorithm: an overview," vol. 22, no. 2,pp.387-
408, 2018.
[18] S. Alsaidy, A. Abbood, and M. Sahib, "Heuristic
initialization of PSO task scheduling algorithm in cloud
computing," Journal of King Saud University-Computer and
Information Sciences, 2020.
[19] F. F. Moges and S. L. J. J. o. C. C. Abebe, "Energy-aware
VM placement algorithms for the OpenStack Neat
consolidation framework," vol. 8, no. 1, pp. 1-14, 2019.
[20] M. Behzadian, S. K. Otaghsara, M. Yazdani, and J. J. E. S.
w. a. Ignatius, "A state-of the-art survey of TOPSIS
applications," vol. 39, no. 17, pp. 13051-13069, 2012.
[21] F. Luo, Y. Yuan, W. Ding, and H. Lu, "An improved
particle swarm optimization algorithm based on adaptive
weight for task scheduling in cloud computing," in
Proceedings of the 2nd International ConferenceonComputer
Science and Application Engineering, 2018, pp. 1-5.
[22] S. F. Piraghaj, A. V. Dastjerdi, R. N. Calheiros, R. J. S. P.
Buyya, and Experience, "ContainerCloudSim: An
environment for modeling and simulation of containers in
cloud data centers," vol. 47, no. 4, pp. 505-521, 2017.
[23] M. Mao and M. Humphrey, "A performance study on the
vm startup time in the cloud," in 2012 IEEE Fifth
International Conference on Cloud Computing,2012,pp.423-
430: IEEE.

More Related Content

PDF
Performance analysis of an energy efficient virtual machine consolidation alg...
PDF
Dynamic Resource Allocation Algorithm using Containers
PDF
Paper id 41201624
PDF
ICC paper
PDF
Iaetsd appliances of harmonizing model in cloud
PDF
Energy aware load balancing and application scaling for the cloud ecosystem
PDF
Migration Control in Cloud Computing to Reduce the SLA Violation
PDF
kogatam_swetha
Performance analysis of an energy efficient virtual machine consolidation alg...
Dynamic Resource Allocation Algorithm using Containers
Paper id 41201624
ICC paper
Iaetsd appliances of harmonizing model in cloud
Energy aware load balancing and application scaling for the cloud ecosystem
Migration Control in Cloud Computing to Reduce the SLA Violation
kogatam_swetha

Similar to A Host Selection Algorithm for Dynamic Container Consolidation in Cloud Data Centres using Particle Swarm Optimization (20)

PDF
Energy-aware Load Balancing and Application Scaling for the Cloud Ecosystem
PDF
A Survey on Reducing Energy Sprawl In Cloud Computing
PDF
A SURVEY ON REDUCING ENERGY SPRAWL IN CLOUD COMPUTING
PDF
Energy-Aware Adaptive Four Thresholds Technique for Optimal Virtual Machine P...
PDF
Survey: An Optimized Energy Consumption of Resources in Cloud Data Centers
PDF
F1034047
PDF
IRJET- An Efficient Energy Consumption Minimizing Based on Genetic and Power ...
PPTX
CS298_presentation
PDF
Automated LiveMigration of VMs
PDF
Server Consolidation through Virtual Machine Task Migration to achieve Green ...
PDF
Server Consolidation Algorithms for Virtualized Cloud Environment: A Performa...
PDF
Top Viewed Articles from Academia in 2019- International Journal of Distribu...
PDF
AUTO RESOURCE MANAGEMENT TO ENHANCE RELIABILITY AND ENERGY CONSUMPTION IN HET...
PPT
Srushti_M.E_PPT.ppt
PPTX
IEEE Paper Presentation by Chandan Kumar
PDF
Energy-Efficient Task Scheduling in Cloud Environment
PDF
Trends in heterogeneous computing in 2020
DOCX
Contents lists available at ScienceDirectOptical Switching a.docx
PDF
Advanced resource allocation and service level monitoring for container orche...
PDF
Advanced resource allocation and service level monitoring for container orche...
Energy-aware Load Balancing and Application Scaling for the Cloud Ecosystem
A Survey on Reducing Energy Sprawl In Cloud Computing
A SURVEY ON REDUCING ENERGY SPRAWL IN CLOUD COMPUTING
Energy-Aware Adaptive Four Thresholds Technique for Optimal Virtual Machine P...
Survey: An Optimized Energy Consumption of Resources in Cloud Data Centers
F1034047
IRJET- An Efficient Energy Consumption Minimizing Based on Genetic and Power ...
CS298_presentation
Automated LiveMigration of VMs
Server Consolidation through Virtual Machine Task Migration to achieve Green ...
Server Consolidation Algorithms for Virtualized Cloud Environment: A Performa...
Top Viewed Articles from Academia in 2019- International Journal of Distribu...
AUTO RESOURCE MANAGEMENT TO ENHANCE RELIABILITY AND ENERGY CONSUMPTION IN HET...
Srushti_M.E_PPT.ppt
IEEE Paper Presentation by Chandan Kumar
Energy-Efficient Task Scheduling in Cloud Environment
Trends in heterogeneous computing in 2020
Contents lists available at ScienceDirectOptical Switching a.docx
Advanced resource allocation and service level monitoring for container orche...
Advanced resource allocation and service level monitoring for container orche...
Ad

More from IRJET Journal (20)

PDF
Enhanced heart disease prediction using SKNDGR ensemble Machine Learning Model
PDF
Utilizing Biomedical Waste for Sustainable Brick Manufacturing: A Novel Appro...
PDF
Kiona – A Smart Society Automation Project
PDF
DESIGN AND DEVELOPMENT OF BATTERY THERMAL MANAGEMENT SYSTEM USING PHASE CHANG...
PDF
Invest in Innovation: Empowering Ideas through Blockchain Based Crowdfunding
PDF
SPACE WATCH YOUR REAL-TIME SPACE INFORMATION HUB
PDF
A Review on Influence of Fluid Viscous Damper on The Behaviour of Multi-store...
PDF
Wireless Arduino Control via Mobile: Eliminating the Need for a Dedicated Wir...
PDF
Explainable AI(XAI) using LIME and Disease Detection in Mango Leaf by Transfe...
PDF
BRAIN TUMOUR DETECTION AND CLASSIFICATION
PDF
The Project Manager as an ambassador of the contract. The case of NEC4 ECC co...
PDF
"Enhanced Heat Transfer Performance in Shell and Tube Heat Exchangers: A CFD ...
PDF
Advancements in CFD Analysis of Shell and Tube Heat Exchangers with Nanofluid...
PDF
Breast Cancer Detection using Computer Vision
PDF
Auto-Charging E-Vehicle with its battery Management.
PDF
Analysis of high energy charge particle in the Heliosphere
PDF
A Novel System for Recommending Agricultural Crops Using Machine Learning App...
PDF
Auto-Charging E-Vehicle with its battery Management.
PDF
Analysis of high energy charge particle in the Heliosphere
PDF
Wireless Arduino Control via Mobile: Eliminating the Need for a Dedicated Wir...
Enhanced heart disease prediction using SKNDGR ensemble Machine Learning Model
Utilizing Biomedical Waste for Sustainable Brick Manufacturing: A Novel Appro...
Kiona – A Smart Society Automation Project
DESIGN AND DEVELOPMENT OF BATTERY THERMAL MANAGEMENT SYSTEM USING PHASE CHANG...
Invest in Innovation: Empowering Ideas through Blockchain Based Crowdfunding
SPACE WATCH YOUR REAL-TIME SPACE INFORMATION HUB
A Review on Influence of Fluid Viscous Damper on The Behaviour of Multi-store...
Wireless Arduino Control via Mobile: Eliminating the Need for a Dedicated Wir...
Explainable AI(XAI) using LIME and Disease Detection in Mango Leaf by Transfe...
BRAIN TUMOUR DETECTION AND CLASSIFICATION
The Project Manager as an ambassador of the contract. The case of NEC4 ECC co...
"Enhanced Heat Transfer Performance in Shell and Tube Heat Exchangers: A CFD ...
Advancements in CFD Analysis of Shell and Tube Heat Exchangers with Nanofluid...
Breast Cancer Detection using Computer Vision
Auto-Charging E-Vehicle with its battery Management.
Analysis of high energy charge particle in the Heliosphere
A Novel System for Recommending Agricultural Crops Using Machine Learning App...
Auto-Charging E-Vehicle with its battery Management.
Analysis of high energy charge particle in the Heliosphere
Wireless Arduino Control via Mobile: Eliminating the Need for a Dedicated Wir...
Ad

Recently uploaded (20)

PPTX
MCN 401 KTU-2019-PPE KITS-MODULE 2.pptx
PPTX
Geodesy 1.pptx...............................................
PDF
PPT on Performance Review to get promotions
PPTX
bas. eng. economics group 4 presentation 1.pptx
PDF
Well-logging-methods_new................
PDF
July 2025 - Top 10 Read Articles in International Journal of Software Enginee...
PDF
Evaluating the Democratization of the Turkish Armed Forces from a Normative P...
PDF
composite construction of structures.pdf
PDF
TFEC-4-2020-Design-Guide-for-Timber-Roof-Trusses.pdf
PPTX
M Tech Sem 1 Civil Engineering Environmental Sciences.pptx
PPTX
Infosys Presentation by1.Riyan Bagwan 2.Samadhan Naiknavare 3.Gaurav Shinde 4...
PPTX
Lecture Notes Electrical Wiring System Components
PPTX
CYBER-CRIMES AND SECURITY A guide to understanding
PPTX
Recipes for Real Time Voice AI WebRTC, SLMs and Open Source Software.pptx
PPTX
Foundation to blockchain - A guide to Blockchain Tech
PDF
Mitigating Risks through Effective Management for Enhancing Organizational Pe...
PDF
Digital Logic Computer Design lecture notes
PDF
Automation-in-Manufacturing-Chapter-Introduction.pdf
PDF
The CXO Playbook 2025 – Future-Ready Strategies for C-Suite Leaders Cerebrai...
PDF
BMEC211 - INTRODUCTION TO MECHATRONICS-1.pdf
MCN 401 KTU-2019-PPE KITS-MODULE 2.pptx
Geodesy 1.pptx...............................................
PPT on Performance Review to get promotions
bas. eng. economics group 4 presentation 1.pptx
Well-logging-methods_new................
July 2025 - Top 10 Read Articles in International Journal of Software Enginee...
Evaluating the Democratization of the Turkish Armed Forces from a Normative P...
composite construction of structures.pdf
TFEC-4-2020-Design-Guide-for-Timber-Roof-Trusses.pdf
M Tech Sem 1 Civil Engineering Environmental Sciences.pptx
Infosys Presentation by1.Riyan Bagwan 2.Samadhan Naiknavare 3.Gaurav Shinde 4...
Lecture Notes Electrical Wiring System Components
CYBER-CRIMES AND SECURITY A guide to understanding
Recipes for Real Time Voice AI WebRTC, SLMs and Open Source Software.pptx
Foundation to blockchain - A guide to Blockchain Tech
Mitigating Risks through Effective Management for Enhancing Organizational Pe...
Digital Logic Computer Design lecture notes
Automation-in-Manufacturing-Chapter-Introduction.pdf
The CXO Playbook 2025 – Future-Ready Strategies for C-Suite Leaders Cerebrai...
BMEC211 - INTRODUCTION TO MECHATRONICS-1.pdf

A Host Selection Algorithm for Dynamic Container Consolidation in Cloud Data Centres using Particle Swarm Optimization

  • 1. International Research Journal of Engineering and Technology (IRJET) e-ISSN: 2395-0056 Volume: 09 Issue: 03 | Mar 2022 www.irjet.net p-ISSN: 2395-0072 © 2022, IRJET | Impact Factor value: 7.529 | ISO 9001:2008 Certified Journal | Page 1 A Host Selection Algorithm for Dynamic Container Consolidation in Cloud Data Centres using Particle Swarm Optimization Prof.Radwan Saleh Dandah1, Dr.Kasem Kabalan2, Eng.Hayyan Rajab3 1 Professor, Department of Systems and Computer Networks, Faculty of Information Engineering, Tishreen University, Lattakia, Syria 2 Assistant professor, Department of Systems and Computer Networks, Faculty of Information Engineering, Tishreen University, Lattakia, Syria. 3 Postgraduate student (Phd), Department of Systems and Computer Networks, Faculty of Information Engineering, Tishreen University, Lattakia, Syria. ---------------------------------------------------------------------***--------------------------------------------------------------------- Abstract - One of the leading causes of excessive energy consumption in cloud data centers is inefficient resource use. To address the issue,researchersproposed the Dynamic Container consolidation approach, which aims to consolidate containers into the fewest number of VMs and hosts. In this research, we introduce a novel host selection policy for container consolidation calledtheEnergyEfficient Particle Swarm Optimization (EE-PSO) Algorithm to reduce energy consumption while maintaining the required performance levels in a cloud data center. We performed experimental evaluations using the ContainerCloudSim toolkit to validate the proposed algorithm's effectiveness with real-world workloads. The simulation results show that our proposed algorithm outperforms existing works in terms of energy consumption, QoS guarantees, number of newly created VMs, and number of container migrations. Key Words: Cloud Computing, Container as a Service (CaaS), Energy Efficiency, Dynamic Container Consolidation, Particle Swarm Optimization. 1.INTRODUCTION As a result of the rise of web-based applications such as micro-services and server-less architectures, containers have become more popular for creating an isolated, low overhead environment for deploying applications [1]. Container is an operating system-level virtualization that offers various advantages over virtual machines, including lightweight, mobility, low start-up time, and low resource usage [2]. Thus, containers might be seen as a new revolution in the cloud era and have been adopted from many cloud providers. Container as a service (CaaS) is the new service model that has been introduced in addition to traditional cloud services, including software as a service (SaaS), platform as a service (PaaS), and infrastructure as a service (IaaS). Containers can be deployed either on physical machines or on virtual machines. Although deploying containers without the overhead of the hypervisor achieves high performance levels, there are some limitations for usingthis model such as: the dependency between containers and operating system type, suffering fromsecuritythreatsdue to the fact that containers do not provide the same level of isolation as VMs [3]. Consequently, many cloud providers use a two-level virtualization architectureas showninFig -1. Host OS Hardware Hypervisor Container Engine Guest OS2 VM2 Container Engine App C3 Bins/Libs App C4 Bins/Libs Guest OS1 VM1 App C1 Bins/Libs App C2 Bins/Libs Fig -1: Two-level virtualization architecture [4] In order to meet the increasing demand for cloud services, there has been a significant expansion in building data centers around the world, and statistics indicate that there are approximately 8.2 million data centers [5]. A
  • 2. International Research Journal of Engineering and Technology (IRJET) e-ISSN: 2395-0056 Volume: 09 Issue: 03 | Mar 2022 www.irjet.net p-ISSN: 2395-0072 © 2022, IRJET | Impact Factor value: 7.529 | ISO 9001:2008 Certified Journal | Page 2 recently published study showed that data centers consumed about 205 TWh during 2018, which represents about 1% of global electricity consumption [6], and expectations indicate that this number could reach about 353 TWh by 2030 [7]. Servers are responsible for a large part of the power consumed in a cloud data center. Consequently,reducingthe number of active servers, through dynamic consolidation of containers (or virtual machines), can significantly reduce power consumption while maintaining quality of service. The following issues should be able to be addressed by any container consolidation framework: [8]:  When the host is detected as being overloaded and unable to provide the required resources for containers and virtual machines running on this host?  Which containers should be selected to migrate from an overloaded host?  When the host is identifiedasbeingunderloaded?Is it possible to migrate all hosted containers andshut down this host?  How to choose a destination (host/VM) for migrated containers? According to the above questions, there are four sub- problems in dynamic container consolidation, in this paper we will focus on the sub-problem of destination host selection. 2. Related Work: In contrast to the substantial study on energy efficiency of computing, for virtualized cloud data centers, only a few studies explored the challenge of energy efficient container management. In [7], the researchers proposed a framework for container dynamic consolidation on virtual machines. They used static thresholds to determine the status of the hosts, Maximum Usage (MU) and Most Correlated (MCor) to select containers from overloaded hosts, First Fit (FF), least full (LF), and Correlation threshold (CorHs) to select a destination host for a migrated container, and finally, they used First Fit to place the migrated containers ona VMatthe selected destination. In [9], the researchers evaluated some of the container placement algorithms, including First Fit, Least Full, Most Full, and Random. These algorithms are used to select a running virtual machine on the host to be allocated to the container. The results showed that First Fit outperforms all the other algorithms in terms of energy consumption and number of migrations. In [10], the authors showed the relationship between container and host selection policy. ACO, Least Full, Most Full, Most Correlated, Least Correlated, Max Variance, and Min Variance were considered for host selection, while for container selection, they considered max-correlated, max- variance, max-usage, and min-variance. They achieve a superior result using the maximum-variance host selection strategy and the greatest utilization container selection policy. In [11], the researchers proposed MESF,ormostefficient server first, which is a greedy containerplacementtechnique that assigns containers to the most energy efficient computers first. The suggested MESF method may greatly improve energy usagewhen comparedtotheLeastAllocated Server First (LASF) and random scheduling schemes, according to simulation findings utilizing an actual set of Google cluster data as task input and machine set. In [12], the researchers designed a fitness function to evaluate the resource wastage of VMs and Hosts, then they used Best Fit algorithm to create VMs in the hosts, and ACO to place containers on these VMs. 3. Background: 3.1 Data Center Power Model: The power consumption of a data center at time t ( ) can be calculated as the sumofpowerconsumption of its servers at time t ( ) as shown in equation 1. (1) where is the number of servers. According to [13] there is a linear relationship between the CPU utilization and power consumption of the server. This relation can be formulated as follows: (2) where is the CPU utilization of server i at time t, and represent theconsumed powerwhentheserveris idle, or fully utilized respectively. 3.2 SLAV Metric: Meeting QoS requirements is a very critical issueincloud computing environment. These requirements can be formulated using several metrics such as: minimum throughput or maximum response time, but due to the fact that we do not have any prior knowledge about the behavior of the application running inside the container, it is important to identify a metric which does not depend on the workload. Researchers in [14] showed that the SLA can be violated if the virtual machine cannot get the required CPU which has been requested. Equation 3 shows how to calculate the SLAV metric: (3)
  • 3. International Research Journal of Engineering and Technology (IRJET) e-ISSN: 2395-0056 Volume: 09 Issue: 03 | Mar 2022 www.irjet.net p-ISSN: 2395-0072 © 2022, IRJET | Impact Factor value: 7.529 | ISO 9001:2008 Certified Journal | Page 3 where , are the number of VMs, the number of SLA Violations respectively, and , are CPU amount requested and allocated by VM j on server i at the time at which the violation p happened. 3.3 System Model: In order to consolidate containers on the minimum number of virtual machines and hosts, we will use a similar model to the proposed model in [8], which consists of two modules: Host Status Module and Consolidation Module. The Host Status Module exists in each active host, and it has three main components:  Host Over-load/ Under-Load Detector: This component is responsible of deciding if the host is detected as being either over-loaded or under-loaded. In this research, the resource utilization is checked every 5 minutes using static thresholds to identify the status of the host.  Container Selector: Thiscomponentdetermineswhich containers should be selected to migrate from an overloaded host.  Container Migration List: This list storesall containers selected by the Container Selector component. The Consolidation Module runs on a separate host. This module is responsible for choosing a destination (host/VM) for migrated containers, and consists of the following components:  Over-loaded Host List  Over-loaded Destination Selector: This component uses a host selection policy to select a destinationfora migrated container from an over-loaded host, and a container placement policy to choose one of the running VMs on that host to be allocated to the container. If there is no running vm to host a migrated container, the Vm Creator component is called.  VM Creator: this component creates the largest possible vm on the host and assign the container to it.  Destination List: This component stores the migration map decided by the over-loaded Destination Selector.  Under-loaded Host List: This listcontainsall hoststhat are identified as under-loaded after finding a destination for all migrated containers from over- loaded hosts.  Under-loaded Destination Selector: This component tries to find appropriate destinations for all hosted containers by an under-loaded host. If this mission could be achieved, it sends the hostIDtounder-loaded host deactivator component.  VM-Host Migration Manager: This componenttriggers the migration process after selecting all destinations.  Under-loaded Host Deactivator: after migrating all containers of an under-loaded host, this component turns it off. 3.4 Standard Particle Swarm Optimization PSO is a meta-heuristic algorithm that wasintroducedby Eberhart and Kennedy in 1995[15]. It mimics the social behavior of a flock of birds searching for food. Each bird inside the algorithm is called a particle, andeachparticlehas a position vector that represents one of the possible solutions to the problem, as well as a velocity vector that describes its movement within the solution space. First, the position vectors are generated randomly. Second, at each iteration of the algorithm, each particle moves to a new position which depends on the values of the following: the particle's velocity in the previous iteration, the best position found by the particle (pbest); and the best position found in the entire swarm (gbest). The positions are evaluated using a fitness function. The following equations are used to calculate the new position and velocity vectors. [16]: (5) where: : velocity vector of particle i at iteration t : velocity vector of particle i at iteration t+1 : current position of particle at iteration t : new position of particle i at iteration t+1 : personal best position of particle i : global best position w: inertia weight c1,c2: cognitive and social learning parameters respectively rand1,rand2 : random values between 0 and 1 Fig-2 shows the flowchart of the algorithm. (4)
  • 4. International Research Journal of Engineering and Technology (IRJET) e-ISSN: 2395-0056 Volume: 09 Issue: 03 | Mar 2022 www.irjet.net p-ISSN: 2395-0072 © 2022, IRJET | Impact Factor value: 7.529 | ISO 9001:2008 Certified Journal | Page 4 Start Swarm initialization Particle fitness evaluating Calculating the individual historical optimal position Calculating the swarm historical optimal position Updating particle velocity and position according to the velocity and position updating equation Satisfying the ending condition? End Yes No Fig-2: Flowchart of PSO [17] 4. Proposed Method: 4.1 Initialize Particles: In the standard PSO, initial particles are generated randomly. However, this randomness reduces the algorithm’s likelihood of converging to the optimal solution. As a result, effective initialization solutions can vastly increase its performance [18]. In our proposed method, we choose a random container from the migrated container list and assign it to an available host using the algorithm described in Fig-3. This approach ensures thattheinitialized solutions are good and feasible. The proposed host selection method is considered a modified version of the well-known bin-packing algorithm, First Fit. The hosts are arranged in descending order according to their power efficiencies and CPU utilization, respectively. The power efficiency of a host is a ratio between its CPU capacity and its maximum consumed power [19]. The algorithm examines hosts and their running VMs one by one. If there is a suitable vm and the host would not become overloadedaftertheallocationof the container, the selected host along with the selected vm are returned as the destination of the migrated container. If there is no running vm, the algorithm tries to create the largest possible VM on that host and assigns the container to it. It is important to note that creating VMs is only done in the process of finding destinations for migrated containers from overloaded hosts. Theotherdifferencebetweenfinding destinations for migrated containers from overloaded and underloaded hosts is the excluded hosts list, which includes the overloaded hosts in the first phase, and overloaded, switched off, and hosts which have been selected as destinations in the second phase. Algorithm1: Destination Selection Process Input: hostList,excludedHosts,container Output: Destination(allocatedHost, allocatedVM) 1: allocatedHost NULL; 2: allocatedVM NULL; 3: hostList sort(hostList,PE,U,’Des’); 4: foreach host in hostList do 5: if excludedHosts.contains(host) then 6: continue; 7: end if 8: vmList host.getVmList(); 9: foreach vm in vmList do 10: if (vm.isSuitable(container) and host.isNotOverLoadedAfterAllocation(vm,contain er)) then 11: allocatedHost host; 12: allocatedVM vm; 13: break; 14: end if 15: end foreach 16: if (allocatedVM == NULL) then 17: newVM = host.createLargestPossibleVM(); 18: if (newVM != NULL) then 19: if (newVM.isSuitable(container) and host.isNotOverLoadedAfterAllocation(newV M, container)) then 20: allocatedHost host; 21: allocatedVM vm; 22: break; 23: end if 24: end if 25: end if 26: end foreach 27: return Destination; Fig-3: Destination Selection Process
  • 5. International Research Journal of Engineering and Technology (IRJET) e-ISSN: 2395-0056 Volume: 09 Issue: 03 | Mar 2022 www.irjet.net p-ISSN: 2395-0072 © 2022, IRJET | Impact Factor value: 7.529 | ISO 9001:2008 Certified Journal | Page 5 4.2 Fitness Function: To formulate the fitness function of our proposed algorithm, we use a multi-criteria algorithm called TOPSIS [20]. According to this method, the best solution is the one which has the greatest distance from the negative-ideal solution and the smallest distance from the positive-ideal solution. There are four criteria depicted in table 1 used to rank the particles. Table-1: Considered Criteria in Fitness Function No criteria Description Cost/benefit 1 Energy Consumption The new power consumption of the data center after container migrations Cost 2 Number of Successfully migrated containers The higher this number, the higher the probability that the overloaded host will return to normal state, and the under-loaded host will be shut down Benefit 3 The Sum of Energy Efficiency Factors of Selected Hosts Selecting the most energy-efficient hosts has a great impact on energy consumption and performance Benefit 4 Number Of Newley Created VMs The lower this number, the lower overhead of launching a new operating system Cost First, we calculate the value of each parameter for every particle in the swarm. Then, these values are normalized by dividing them by the maximum value of each parameter found in the swarm using the equation: (6) In the next step, the and are determined according to the following equations: Then, the Euclidean distances from the positive ideal solution and the negative ideal solution are calculated for each particle using the equation 9 and equation 10, respectively. (9) (10) Finally, the score of the particle i is calculated using Equation 11: (11) This score is regarded as the fitness function value that the algorithm seeks to maximize. 4.3 PSO Parameters: The value of inertia weight w and its changes during the iterations of the algorithm are very critical to performance. In our proposed algorithm, we will use the approach introduced in [21], which leadstogoodresults.,asitdepends on a linear reduction of w value for 70% of the iterations, and in the last stages, it gives w a random value within the range (0.4,0.7), which means greater valuesofwtoallowthe algorithm to jump outside the local optimal solution. The equation for calculating w is given as follows: Where t is the current iteration, T is the total number of iterations. When a particle updates its position, the proposed algorithm checks the feasibility of the new solution. For simplicity, it examines the statusoftheselectedhostforeach migrated container one by one, and if there is no suitable vm (running or newly created), the value of the corresponded element of the unallocated container at thepositionvectoris set to null. The rest of the algorithm parameters are shown in the Table -2. (7) (8) (12)
  • 6. International Research Journal of Engineering and Technology (IRJET) e-ISSN: 2395-0056 Volume: 09 Issue: 03 | Mar 2022 www.irjet.net p-ISSN: 2395-0072 © 2022, IRJET | Impact Factor value: 7.529 | ISO 9001:2008 Certified Journal | Page 6 Table-2: PSO Parameters 100 Number of particles 1.4 Initial inertia weight w 0.4 Minimum Value of w 2 Learning factors c1,c2 100 Number of iterations 5. Performance Evaluation: 5.1 Simulation Setup: To evaluate the performance of our proposed policy, we will use the ContainerCloudSim toolkit [22]. In our experiments, the cloud datacenter consists of 100 PMs, 200 VMs, and more than 1000 containers. The characteristics of their configurations are shown in Table-3. PMs, VMs, and containers each have 1 TB, 2.5 GB, and 0.1GBofdisk storage. The network bandwidth of PMs, VMs, and containers is 1GB/s, 10MB/s, and 250KB/s, respectively. Because the startup delay of each container and VM creation directly affects the SLA measurements, these startup delays are significant and are set to 0.4 seconds for containers [8] and 100 seconds for VMs [23]. The CPU utilization of eachcontainerisassignedtooneof PlanetLab workload traces [19]. These traces consist of 10 days of workload gathered every 5 minutes between March and April 2011 [9] as shown in Table-4. We use the First Fit algorithm as a container placement policy, and the Maximum Usage (MU) algorithm as a container selection policy. The performance of our proposed algorithm (EE-PSO) is compared with the following algorithms: Correlation Threshold Host Selection (CorHS), First Fit Host Selection (FFHS), Least Full Host Selection (LFHS), and Most Full Host Selection (MFHS). This comparison will be done in terms of energy consumption, SLAV, total number of migrations, and number of newly created VMs. Table-4: PlanetLab Workload Traces Date Number of Containers Mean(%) St.dev(%) 2011/03/03 1052 12.31% 17.09% 2011/03/06 898 11.44% 16.83% 2011/03/09 1061 10.70% 15.57% 2011/03/22 1516 9.26% 12.78% 2011/03/25 1078 10.56% 14.14% 2011/04/03 1463 12.39% 16.55% 2011/04/09 1358 11.12% 15.09% 2011/04/11 1233 11.56% 15.07% 2011/04/12 1054 11.54% 15.15% 2011/04/20 1033 10.43% 15.21% 5.2 Experiment Results: 5.2.1 Scenario 1: In this set of experiments, the upper and lower thresholds are set at 80% ,70%, respectively. Because there are 10 days' workload data, each performance metric might Table-3: Configuration of PMs, VMs, and containers PM Configurations and power models PM type # CPU [3GHz] (mapped on 37274 MIPS Per core) Memory (GB) Pidle(Watt) Pmax(Watt) # 1 4 cores 64 86 117 # 2 8 cores 128 93 135 # 3 16 cores 256 66 247 Container and VM Types Container type # CPU MIPS (1 core) Memory (MB) VM type # CPU [1.5 GHz] (mapped on 18636 MIPS Per core) Memory (GB) # 1 4658 128 # 1 1 core 1 # 2 9320 256 # 2 2 cores 2 # 3 18636 512 # 3 4 cores 4 # 4 8 cores 8
  • 7. International Research Journal of Engineering and Technology (IRJET) e-ISSN: 2395-0056 Volume: 09 Issue: 03 | Mar 2022 www.irjet.net p-ISSN: 2395-0072 © 2022, IRJET | Impact Factor value: 7.529 | ISO 9001:2008 Certified Journal | Page 7 yield ten results. The average of these results is used as the final result of the algorithm on the metric. The results (Charts [1-4]) show that our proposed method outperforms all the other algorithms for all metricsbecauseouralgorithm aims to minimize the power consumption in its fitness function. EE-PSO also maximizes the number of successfully migrated containers, which means a lower number of overloaded hosts and SLA violations, anda higher numberof underloaded hosts that will beshutdown.Ontheotherhand, selecting the most energy efficient hosts means not only minimizing the energy but also means higher capacities so the container will get its required resources and thenumber of migrations and created VMs will decrease. Chart -1: Energy consumption in scenario 1 Chart -2: Total number of container migrations in scenario 1 Chart -3: SLAV in scenario 1 Chart -4: Total number of newly created VMs in scenario 1 5.2.2 Scenario 2: In this set of experiments, we will study the effect of varying the upper-threshold value while keeping the lower threshold fixed at 70%. The number of containers and their workload traces are set according to day 1 of Table-4. The results (Charts [5-8]) show that increasing the upper- threshold value increases the powerconsumptionmetric for all algorithms because of the linear relationship between CPU utilization and energy consumed by the server. Also, when the upper-threshold is increased,theprobabilitythata host would be identified as overloaded is decreased, which in turn decreases the number of containers selected to migrate, which results in a lower number of VM creations. On the other hand, the higher the upper-threshold, themore likely the host will not have adequate resources to adapt to fluctuations in container resourcerequirements,resultingin more SLA violations. At all upper-threshold values, our proposed algorithm performs better than all other algorithms.
  • 8. International Research Journal of Engineering and Technology (IRJET) e-ISSN: 2395-0056 Volume: 09 Issue: 03 | Mar 2022 www.irjet.net p-ISSN: 2395-0072 © 2022, IRJET | Impact Factor value: 7.529 | ISO 9001:2008 Certified Journal | Page 8 Chart -5: Energy consumption in scenario 2 Chart -6: Total number of container migrations in scenario 2 Chart -7: SLAV in scenario 2 Chart -8: Total number of newly created VMs in scenario 2 5.2.3 Scenario 3: In this set of experiments, the upper threshold is set at 80%, and the lower threshold will be varied. Also, the number of containers and their workload traces are set according to day 1 of Table-4. As shown in Charts [9-12], decreasing the lower-threshold increases the energy consumption metric since more hosts will be active, and the number of migrations will decrease becausefewerhosts will be identified as underloaded. A lower container migration rate results in fewer VMsbeingcreated.Althoughthesmaller number of created VMs when we decrease the lower- threshold, the size of these VMs will be bigger since we have more resources to allocate and the possibilitythatthese VMs will not get their required resources in the future is high, which results in high SLA violations. The findingsreveal that the performance of our proposed method outperforms that of competing algorithms across all metrics and lower- threshold values. Chart -9: Energy consumption in scenario 3
  • 9. International Research Journal of Engineering and Technology (IRJET) e-ISSN: 2395-0056 Volume: 09 Issue: 03 | Mar 2022 www.irjet.net p-ISSN: 2395-0072 © 2022, IRJET | Impact Factor value: 7.529 | ISO 9001:2008 Certified Journal | Page 9 Chart -10: Total number of container migrations in scenario 3 Chart -11: SLAV in scenario 3 Chart -12: Total number of newly created VMs in scenario 3 6. CONCLUSION AND FUTURE WORK Despite the growing popularity of Container as a Service (CaaS), the energy efficiency of resource management algorithms in this service paradigm has received little attention. In this paper, we introduced A novel host selection algorithm for container consolidationbytakingadvantageof particle swarm optimization and energy efficiency of hosts. Three sets of simulation tests were performed to compare the performance of our approach with existing algorithms. Results show that our proposed method outperforms all competitive algorithms regardingenergyconsumption,total number of migrations, SLAV, and number of created VMs. As for future work, we will improve our algorithm to make it aware of operating system type as a new constraint for the problem, and will extend our work to solve other container consolidation sub-problems. REFERENCES [1] B. Tan, H. Ma, Y. Mei, and M. J. I. T. o. C. C. Zhang, "A cooperative coevolution genetic programming hyper- heuristic approach for on-line resource allocation in container-based clouds," 2020. [2] F. Paraiso, S. Challita, Y. Al-Dhuraibi, and P. Merle, "Model-driven management of docker containers," in 2016 IEEE 9th International Conference on cloud Computing (CLOUD), 2016, pp. 718-725: IEEE. [3] O. Smimite and K. J. a. p. a. Afdel, "Container placement and migration on cloud system," 2020. [4] C. Zhang, Y. Wang, H. Wu, and H. J. I. A. Guo, "An energy- aware host resource management framework for two-tier virtualized cloud data centers," vol. 9, pp. 3526-3544, 2020. [5] B. K. Sovacool, C. G. Monyei, P. J. R. Upham, and S. E. Reviews, "Making the internet globally sustainable: Technical and policy options for improved energy management, governance and community acceptance of Nordic datacenters," vol. 154, p. 111793, 2022. [6] E. Masanet, A. Shehabi, N. Lei, S. Smith, and J. J. S.Koomey, "Recalibrating global data center energy-use estimates,"vol. 367, no. 6481, pp. 984-986, 2020. [7] M. Koot and F. J. A. E. Wijnhoven, "Usage impact on data center electricity needs: A system dynamic forecasting model," vol. 291, p. 116798, 2021. [8] S. F. Piraghaj, A. V. Dastjerdi, R. N. Calheiros, and R. Buyya, "A framework and algorithm for energy efficient container consolidation in cloud data centers," in 2015 IEEE International Conference on Data Science and Data Intensive Systems, 2015, pp. 368-375: IEEE. [9] P. Mishra, S. Bhatnagar, and A. Katal, "Cloud Container Placement Policies: A Study and Comparison," in
  • 10. International Research Journal of Engineering and Technology (IRJET) e-ISSN: 2395-0056 Volume: 09 Issue: 03 | Mar 2022 www.irjet.net p-ISSN: 2395-0072 © 2022, IRJET | Impact Factor value: 7.529 | ISO 9001:2008 Certified Journal | Page 10 International Conference on Computer Networks and Inventive Communication Technologies, 2019, pp. 513-524: Springer [10] W. A. Hanafy, A. E. Mohamed, and S. A. Salem, "Novel selection policies for container-based cloud deployment models," in 2017 13th International Computer Engineering Conference (ICENCO), 2017, pp. 237-242: IEEE. [11] Z. Dong, W. Zhuang, and R. Rojas-Cessa, "Energy-aware scheduling schemes for cloud data centers on google trace data," in 2014 IEEE Online Conference on Green Communications (OnlineGreencomm), 2014, pp. 1-6: IEEE. [12] M. K. Hussein, M. H. Mousa, and M. A. J. J. o. C. C. Alqarni, "A placement architecture for a container as a service(CaaS) in a cloud environment," vol. 8, no. 1, pp. 1-15, 2019. [13] D. Kusic, J. O. Kephart, J. E. Hanson, N. Kandasamy, and G. J. C. c. Jiang, "Power and performance management of virtualized computing environmentsvia lookaheadcontrol," vol. 12, no. 1, pp. 1-15, 2009. [14] A. Beloglazov, R. J. C. Buyya, C. Practice, and Experience, "Optimal online deterministic algorithms and adaptive heuristics for energy and performance efficient dynamic consolidation of virtual machines in cloud data centers,"vol. 24, no. 13, pp. 1397-1420, 2012. [15] R. Eberhart and J. Kennedy, "A new optimizer using particle swarm theory," in MHS'95. Proceedings of the sixth international symposium on micro machine and human science, 1995, pp. 39-43: Ieee. [16] F. Ebadifard, S. M. J. C. Babamir, C. Practice, and Experience, "A PSO‐based task scheduling algorithm improved using a load‐balancing technique for the cloud computing environment," vol. 30, no. 12, p. e4368, 2018. [17] D. Wang, D. Tan, and L. J. S. C. Liu, "Particle swarm optimization algorithm: an overview," vol. 22, no. 2,pp.387- 408, 2018. [18] S. Alsaidy, A. Abbood, and M. Sahib, "Heuristic initialization of PSO task scheduling algorithm in cloud computing," Journal of King Saud University-Computer and Information Sciences, 2020. [19] F. F. Moges and S. L. J. J. o. C. C. Abebe, "Energy-aware VM placement algorithms for the OpenStack Neat consolidation framework," vol. 8, no. 1, pp. 1-14, 2019. [20] M. Behzadian, S. K. Otaghsara, M. Yazdani, and J. J. E. S. w. a. Ignatius, "A state-of the-art survey of TOPSIS applications," vol. 39, no. 17, pp. 13051-13069, 2012. [21] F. Luo, Y. Yuan, W. Ding, and H. Lu, "An improved particle swarm optimization algorithm based on adaptive weight for task scheduling in cloud computing," in Proceedings of the 2nd International ConferenceonComputer Science and Application Engineering, 2018, pp. 1-5. [22] S. F. Piraghaj, A. V. Dastjerdi, R. N. Calheiros, R. J. S. P. Buyya, and Experience, "ContainerCloudSim: An environment for modeling and simulation of containers in cloud data centers," vol. 47, no. 4, pp. 505-521, 2017. [23] M. Mao and M. Humphrey, "A performance study on the vm startup time in the cloud," in 2012 IEEE Fifth International Conference on Cloud Computing,2012,pp.423- 430: IEEE.