Professional Documents
Culture Documents
Energy Efficient Container Consolidation in Cloud
Energy Efficient Container Consolidation in Cloud
Energy Efficient Container Consolidation in Cloud
Consolidation in Cloud
Dimple Patel
218CS1086
Guide-Dr. Bibhudatta Sahoo
Cloud Computing
Cloud: Something which is present at remote
location.
2
What is Container?
Virtual Machine
A virtual machine (VM) is an operating system (OS) or
application environment that is installed on software,
which imitates dedicated hardware.
Multiple VM can exist on one host at a time
A virtual machine enables teams to run what appear
to be multiple machines on a single computer. If you
need to run software on a different type of hardware
or operating system, a VM provides that option
without using additional hardware.
3
Virtual Machine
VM1 VM2 VM3
Hypervisor
Hardware
5
Disadvantages of Virtual Machine
When multiple virtual machines are simultaneously
running on a host computer, each virtual machine may
introduce an unstable performance, which depends on
the workload on the system by other running virtual
machines.
Virtual machines contain a complete operating system
and applications. Hypervisor-based virtualization is
resource intensive, a VM can take up several GB
depends on the guest the OS.
6
Container
The container includes all the code, its dependencies and even the
operating system itself. This enables applications to run almost
anywhere.
containers are far more lightweight, they share the OS kernel, start
much faster, and use a fraction of the memory compared to booting
an entire OS.
Rather than spinning up an entire virtual machine, a container
packages together everything needed to run a small piece of
software.
Instead of virtualizing the hardware stack as with the virtual
machines approach, containers virtualize at the operating system
level, with multiple containers running on top the OS kernel
directly.
The primary difference is that with a VM, the team creates virtual
environments where different types of software can run. A
container, however, isolates the software from the environment in a
7
way that enables it to run most anywhere.
Container
Container Runtime
Hardware
8
Figure 2. Container Architecture
Advantages of Container
The average container size is within the range of tens of MB
while VMs can take up several gigabytes. Therefore a server can
host significantly more containers than virtual machines.
Running containers is less resource intensive then running VMs
so you can add more computing workload onto the same server.
Provisioning containers only take a few seconds or less,
therefore, the data center can react quickly to a spike in user
activity.
Containers can enable you to easily allocate resources to
processes and to run your application in various environments.
9
Container Vs Virtual Machine
Hardware Hardware
11
Motivation
A single data center host up to several thousands of server s spread
across over 4500 square meters. A typical 500 square meter data
center can reach power consumption of 38 megawatt-hours (MWh)
per day, which is more than the power consumption of over 3500
households in EU.
The energy consumption results in increased Total Cost of
Ownership (TCO) and consequently decreases the Return of
Investment (ROI) of the cloud infrastructure.
Apart from low ROI, energy consumption has a significant impact
on carbon dioxide (CO2) emissions, which are estimated to be 2% of
global emissions [2].
12
Literature Review-1
In paper [3], Albert Greenberg et al. Identify reason of
energy consumption such as inefficiency in data center
cooling system, network equipment and server
utilization. However, server are the main reason for
energy consumption.
In paper [4], Ozmen Emre et al. compare the
performance and efficiency of VM(KVM) and
container(docker) and conclude that container offers
faster deployment , reduced resource consumption,
easier manageable and reduce energy consumption.
13
Literature Review-2
Sr. Authors Virtualiza Workloa Parameter Model
No. tion d considered
17
Table 1. Continue Summary of Literature review
Summary of literature review
Most of the research is done on virtual machine.
Not much research is done using Heuristic and
meta heuristic algorithm for container placement.
Most of the paper have used cloudsim for the
simulation.
18
Problem Statement
For a given application, we have container set C {c1 ,c2
,c3 ,…, cn} where ci is a container of modules of an
application. Let Host machine set be H {h1 , h2 , h3 ,…,
hm }. Each host machines can be
homogeneous/heterogeneous. Container run on host
machine h. Find the efficient allocation of container
on host machine such that the overall energy
consumed by data center is minimized by minimizing
the number of running server.
19
Objective Function
Assumptions: The application with its requirement
and dependencies are specified.
Each of these application consists of independent
module and this modules are mapped to container.
So, for each application, we have a set of container
{c1 , c2 , … cn }.
Server is represented by it maximum processing
capacity, maximum memory size, idle power
consumption and maximum power consumption.
Containers are represented by processing capacity
and memory required.
20
The correlations between the server utilization and the electric
power consumption proposed by Eugen et al. is
𝑛
𝑖=1 𝑥𝑖_𝑐𝑝𝑢 𝑘
𝑢𝑘𝑐𝑝𝑢 =
𝑐𝑝𝑢_𝑐𝑎𝑝𝑎𝑐𝑖𝑡𝑦(𝑘)
Total power consumption is given by,
𝑚
𝑃= 𝑃(𝑘)
𝑘=1
21
Objective is
𝑚
𝑚𝑖𝑛 𝑃(𝑘)
𝑘=1
Subjected to
𝑛
𝑥𝑖_𝑚𝑒𝑚𝑜𝑟𝑦 𝑘 ≤ 𝑚𝑒𝑚𝑜𝑟𝑦_𝑐𝑎𝑝𝑎𝑐𝑖𝑡𝑦(𝑘)
𝑖=1
and
𝑛
𝑥𝑖_𝑐𝑝𝑢 𝑘 ≤ 𝐶𝑃𝑈_𝑐𝑎𝑝𝑎𝑐𝑖𝑡𝑦(𝑘)
𝑖=1
Where 𝑥𝑖_𝑚𝑒𝑚𝑜𝑟𝑦 𝑘 and 𝑥𝑖_𝑐𝑝𝑢 𝑘 is the memory
consumption and CPU utilization of container i on server
k.
22
System Model
23
Figure 4. System Model
System Model
Parameters Assumed for given System Model
Servers type Homogeneous/Heterogeneous
25
Heuristic algorithm
Provides sub optimal solution or near optimal
solution.
Example
First fit
First fit decreasing
Next fit
Best fit
Best fit decreasing
26
Comparing different heuristic algorithm
𝑛
Fitness function
𝐸 = (𝑃𝑘,𝑚𝑎𝑥 −𝑃𝑘,𝑖𝑑𝑙𝑒 ) . 𝑢 + 𝑃𝑘,𝑖𝑑𝑙𝑒
𝑘=1
29 Table 3. Genetic Algorithm Parameter
Encoding Scheme
30
Population
31
Elitism Selection Method
32
Crossover
Figure 11. 100 containers with 2000 iterations Figure 12. 200 containers with 2000 iterations
34
Stopping Condition for Genetic Algorithm
Figure 13. 300 containers with 2000 iterations Figure 14. 400 containers with 2000 iterations
35
Deciding Population Size
Figure 15. 50 containers with 250 iteration Figure 16. 100 containers with 250 iteration
36
Deciding Population Size
Figure 17. 200 containers with 250 iteration Figure 18. 300 containers with 250 iteration
37
Particle Swarm Optimization(PSO)
Iteration Number 10
𝑛
Fitness Function
𝐸 = (𝑃𝑘,𝑚𝑎𝑥 −𝑃𝑘,𝑖𝑑𝑙𝑒 ) . 𝑢 + 𝑃𝑘,𝑖𝑑𝑙𝑒
𝑘=1
39
Representation of a particle
40
Update velocity and position
Update velocity
Vi+1 = P1 . Vi + P2 .(Xlbest - Xi) + P3 .(Xgbest -Xi)
Update position
Xi+1 = Xi * Vi+1
41
Subtraction
If both the bits are same, then resultant bit is 1
otherwise 0.
42
Addition
If all the bits are same then the resultant bit value is
same otherwise the value depends on probability.
The probability P1 , P2 and P3 is calculated as,
𝑓(𝑋𝑖)
P1i =
𝑓 𝑋𝑖 +𝑓 𝑋𝑙𝑏𝑒𝑠𝑡 +𝑓(𝑋𝑔𝑏𝑒𝑠𝑡)
𝑓(𝑋𝑙𝑏𝑒𝑠𝑡)
P2i =
𝑓 𝑋𝑖 +𝑓 𝑋𝑙𝑏𝑒𝑠𝑡 +𝑓(𝑋𝑔𝑏𝑒𝑠𝑡)
𝑓(𝑋𝑔𝑏𝑒𝑠𝑡)
P3i =
𝑓 𝑋𝑖 +𝑓 𝑋𝑙𝑏𝑒𝑠𝑡 +𝑓(𝑋𝑔𝑏𝑒𝑠𝑡)
43
Figure 22. Addition Operator
44
For each # value, generate a random number.
If random number > P1 then the corresponding bit
from velocity vector is selected.
If P1 > random number > P2 then the corresponding
bit from velocity vector of local best particle is
selected.
Otherwise, corresponding bit from velocity vector
of global best particle is selected.
45
Multiplication
46
Stopping Condition
Figure 24. 50 task with 50 iteration Figure 25. 100 task with 50 iteration
47
Stopping Condition
Figure 26. 150 task with 50 iteration Figure 27. 200 task with 50 iteration
48
Deciding Population Size
Figure 28. 100 task with 50 iteration Figure 29. 200 task with 50 iteration
49
Result
50
Conclusion
We implemented heuristic and metaheuristic algorithm.
Next fit, best fit, best fit decreasing, first fit, first fit
decreasing algorithms are implemented and compared.
We got better result with best fit decreasing and first fit
decreasing algorithm
Particle swarm optimization and genetic algorithm is
implemented and compared with best fit decreasing
algorithm.
PSO performs better than Genetic algorithm as well as
best fit decreasing algorithm.
PSO gives result in very less number of iteration.
51
Future Work
Further energy consumption can be reduced using
different metaheuristic algorithm.
Also energy consumption can be improved by
changing the parameter considered.
Energy efficiency along with service level
agreement can be done as a future work.
52
References
1. C. Pahl, A. Brogi, J. Soldani, and P. Jamshidi. Cloud container technologies: A state-of-
the-art review. IEEE Transactions on Cloud Computing, 7(3):677–692, July 2019
2. R. Buyya, A. Beloglazov, and J. Abawajy, “Energy-efficient management of data center
resources for cloud computing: a vision, architectural elements, and open challenges,”
in Proceedings of 16th International Conference on Parallel and Distributed Processing
Techniques and Applications (PDPTA 2010), July 2010, pp. 6–17.
3. Albert Greenberg, James Hamilton, David A Maltz, and Parveen Patel. The cost of a
cloud: research problems in data center networks. ACM SIGCOMM computer
communication review, 39(1):68–73, 2008.
4. ¨OZMEN EMRE DEM˙IRKOL and AS¸KIN DEM˙IRKOL. Energy efficiency with an
application container. Turkish Journal of Electrical Engineering & Computer Sciences,
26(2):1129–1139, 2018.
5. Eugen Feller, Louis Rilling, and Christine Morin. Energy-aware ant colony based
workload placement in clouds. In Proceedings of the 2011 IEEE/ACM 12th
International Conference on Grid Computing, pages 26–33. IEEE Computer Society,
2011.
6. Ziqian Dong, Wenjie Zhuang, and Roberto Rojas-Cessa. Energy-aware scheduling
schemes for cloud data centers on google trace data. In `2014 IEEE Online Conference
on Green Communications (OnlineGreencomm), pages 1–6. IEEE, 2014.
53
References
7. Ziqian Dong, Wenjie Zhuang, and Roberto Rojas-Cessa. Energy-aware scheduling
schemes for cloud data centers on google trace data. In 2014 IEEE Online Conference
on Green Communications (Online Greencomm), pages 1–6. IEEE, 2014
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, pages 368–375,
Dec 2015.
9. X. Guan, X. Wan, B. Choi, S. Song, and J. Zhu. Application oriented dynamic resource
allocation for data centers using docker containers. IEEE Communications Letters,
21(3):504–507, March 2017.
10. DongZhang, Bing-HengYan, ZhenFeng, ChiZhang, and Yu-XinWang. Container oriented
job scheduling using linear programming model. In 20173rdInternational Conference
on Information Management(ICIM), pages 174–180. IEEE, 2017.
11. 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), pages 237–242, Dec 2017.
12. Gargi Dasgupta, Amit Sharma, Akshat Verma, Anindya Neogi, and Ravi Kothari.
Workload management for power efficiency in virtualized data centers. Commun. ACM,
54:131–141, 07 2011.
54
References
13. Tao Shi, Hui Ma, and Gang Chen. Energy-aware container consolidation based on pso in
cloud data centers. In 2018 IEEE Congress on Evolutionary Computation (CEC), pages
1–8. IEEE, 2018.
14. Carlos Guerrero, Isaac Lera, and Carlos Juiz. Genetic algorithm for multi-objective
optimization of container allocation in cloud architecture. Journal of Grid Computing,
16(1):113–135, 2018
15. Netaji, Vhatkar Kapil, and G. P. Bhole. "Optimal Container Resource Allocation in
Cloud Architecture: A New Hybrid Model." Journal of King Saud University-
Computer and Information Sciences (2019).
16. Yesodha, R. & Amudha, T. (2012). A Comparative Study On Heuristic Procedures To
Solve Bin Packing Problems. International Journal in Foundation of Computer Science
& Technology (IJFCST). 2. 37-49. 10.5121/ijfcst.2012.2603.
17. Mala Kalra, Sarbjeet Singh, A review of metaheuristic scheduling techniques in cloud
computing,Egyptian Informatics Journal,Volume 16, Issue 3,2015,Pages 275-295,ISSN
1110-8665
55