Introduction Docker and Analysis of Its Performance
Introduction Docker and Analysis of Its Performance
Abstract
Docker provide some facilities, which are useful for developers and administrators. It is
an open platform can be used for building, distributing, and running applications in a
portable, lightweight runtime and packaging tool, known as Docker Engine. It also provide
Docker Hub, which is a cloud service for sharing applications. Costs can be reduced by
replacing traditional virtual machine with docker container. It excellently reduces the cost
of re-building the cloud development platform.
Keywords: Docker, Docker Container, Virtual Machine, Virtualization, Cloud
Computing.
1. Introduction
Docker is an open source platform that run applications and makes the process easier to
develop, distribute. The applications that are built in the docker are packaged with all the
supporting dependencies into a standard form called a container. These containers keep
running in an isolated way on top of the operating system’s kernel. The extra layer of
abstraction might effect in terms of performance [1].
Even thou, the technologies of the container have been around for over 10 years, but
docker, a generally new hopeful is right now a standout amongst the best innovations, since
it accompanies new capacities that prior technologies did not have. Initially, it gives the
facility to create and control containers. Besides that, applications can easily be packed into
lightweight docker containers by the developer. These virtualized applications can easily be
worked anywhere without any alteration. Moreover, docker can convey more virtual
situations than different innovations, on the same equipment. To wrap things up, docker can
easily coordinate with third-party instruments, which help to easily deploy and manage
docker containers. Docker containers can easily be deployed into the cloudbased
environment [2].
This paper is a review on technology of docker, and will analyse its performance by a
systematic literature review. The article is organised as follow. Next section will introduce
the technology of docker. In Section 3, a more detailed description of docker and its
components will be presented. Section 4 briefly compare technology of Virtual Machine
and Docker. Sections 5 and 6 will discuss the advantages and disadvantages of docker
container, respectively. In Section 6 and 7, I briefly review few recent researches on
measuring the performance of Docker and compare it with other container technologies.
Finally, in section 9 and 10, features in virtual machines and containers will be briefly
summarised, following with a short summary of the paper.
1.1 What is Docker?
Docker provides a facility to automate the applications when they are deployed into
Containers. In a Container environment where the applications are virtualized and executed,
docker adds up an extra layer of deployment engine on top of it. The way that docker is
designed is to give a quick and a lightweight environment where code can be run efficiently
and moreover it provides an extra facility of the proficient work process to take the code
from the computer for testing before production [9]. Russell (2015) confirms that, as quick
as it is possible docker allows you to test your code and deploy it into the production
environment [6]. Turnbull (2014) concludes by saying that docker is amazingly simple [9].
Certainly, you can begin with a docker with a simple configuration system, a docker binary
with Linux kernel.
1.2 What is a Docker container and how is it different than a VM? Does
containerization replace my virtualization infrastructure?
Containerization is very different from virtualization. It starts with the Docker engine, the
tool that creates and runs containers (1 or more), and is the Docker installed software on
any physical, virtual or cloud host with a compatible OS. Containerization leverages the
kernel within the host operating system to run multiple root file systems. We call these root
file systems “containers.” Each container shares the kernel within the host OS, allowing
you to run multiple Docker containers on the same host. Unlike VMs, containers do not
have an OS within it. They simply share the underlying kernel with the other containers.
Each container running on a host is completely isolated so applications running on the same
host are unaware of each other (you can use Docker Networking to create a multi-host
overlay network that enables containers running on hosts to speak to one another).
Hypervisor is lying between host and guest operating systems. It is a virtual platform and it
handles more than one operating system in the server. It works between the operating
system and CPU. The virtualization divides it into two segments: the first one is Para-
Virtualization and the second one is Full Virtualization [3]. Figure 3 depicts the architecture
of the Docker Container.
Linux containers are managed by the docker tool and it is used as a method of operating
system level virtualization. Figure 3 shows that in single control host there are many Linux
containers, which are isolated. Resources such as Network, Memory, CPU, and Block I/O
are allocated by Linux kernel and it also deals with cgroups without starting virtualization
machine [8].
4.1 Speed
Speed is one of the most exceedingly touted advantages of Containers. When the benefits
of using docker are highlighted, it would be incredible not to mention about the speed of
docker in the conversation (Chavis & Architect, 2015). The time required to build a
container is very fast because they are really small. Development, testing, and deployment
can be done faster as containers are small. Containers can be pushed for testing once they
have been built and then from there, on to the production environment [12].
4.2 Portability
Those applications that are built inside docker containers are extremely portable. These
portable applications can easily be moved as a single element and the performance remains
the same [12].
4.3 Scalability
Docker has the ability that it can be deployed in several physical servers, data servers, and
cloud platforms. It can also be run on every Linux machine. Containers can easily be
moved from a cloud environment to local host and from there back to cloud again at a fast
pace. Adjustments can easily be done; the scale can simply be adjusted by the user
according to the need [5].
4.5 Density
Docker uses the resources that are available more efficiently because it does not use a
hypervisor. This is the reason that more containers can be run on a single host as compared
to virtual machines. The performance of a Docker Containers is higher because of higher
density and no overhead wastage of resources [5].
6. Docker Performance
Seo et al. (2014) used two servers with the same configuration in the cloud environment.
One server was used for docker and the other one was for an Open Stack platform for KVM
by means of a virtualization tool [8]. According to him, a VM works independently. This
factor make it easy to apply and manage the policy of network, security, user, and the
system. However, docker does not contain a guest operating system. Therefore, it takes
very little time in distributing and gathering images. The boot time is also very short. These
are the main advantages of utilizing Docker Cloud as compared with VM Cloud. Scheepers
(2014) compares LXC and Xen virtualization technologies to benchmark some applications
[7]. He explains that Xen would be a better choice in the sense of equally distributing
resources, performance is not dependent on the other tasks, and it is executed on the same
machine. However, LXC is much better in the sense of getting most of the hardware
resources or for the execution of smaller isolated processes. In private and dot clouds, LXC
is a better option.
Felter et al. (2014) evaluate the performance of three different environments, Native,
Docker, and KVM [3]. He clarifies that containers and VMs are both mature innovation that
has profited from last 10 years of incremental equipment and programming enhancements.
According to this research, docker is equivalent to or surpasses KVM execution for each
situation they tried. Their outcomes demonstrate that both KVM and docker present
irrelevant overhead for CPU and memory execution. It has also been shown that the overall
performance of docker is better than the Local Host, as the applications were executed and
responded faster than in Local Host. Moreover, fewer hardware resources were used in
docker container to perform the tasks.
Docker is really a future demanding technology. As users and developers would know
more about the docker and its capabilities then they would consider replacing traditional
virtualization with docker technology. Docker provides many simple and useful features.
To get the best performance and results, it is highly recommended to move up from the
default configuration. Containers provide advanced density, better performance, scalability,
and usability as compared with traditional virtualization because containers smartly utilize
its resources, which reduce the chance of unnecessary overhead. Containers are better in
performance than virtual machine, because containers take less start-up time. Docker has
removed the biggest issue of “dependency”. Now containers have all of their required
dependencies, which help containers to be properly built, and to execute them in any docker
environment. An additional layer of isolation is provided by the container, which increases
the containers’ security. Docker is not as insecure as people normally think, but it provides
a complete protection.
To calculate the operational speed, python language was used. Figure 5 shows that
operation speed of 100,000 is averagely around 4.5s. To measure the operation speed, they
obtain the average process time and standard deviation, by repeating the same process 100
times on docker and VM.
Figure. 5 CPU Calculation Performance.
Figure 5 shows the calculation speed of docker is slightly faster than the calculation speed
of the VM [7]. Seo et al. (2014) concluded that VM works independently [8]. This is one of
the reasons that it is easy to apply and manage the policy of network, security, user, and the
system. However, docker does not contain a guest operating System. Therefore, it takes
very less time in distributing and gathering images. Its boot time is also very short. These
are the main advantages of utilizing docker cloud as compared with VM Cloud.
Scheepers (2014) compares LXC and Xen virtualization technologies to benchmark some
applications [7]. For this purpose, Scheepers uses two servers Core OS 324.3.0 and
XenServer 6.2 with docker version 0.11.1. The configuration of these systems is RAM
4GB, CPU Intel Xeon Quad core and the virtualization support is Intel VTX. The base
operating system is Ubuntu 12.04 and containers will run on both machines. 2GB of
memory is allotted to the first virtual machine and Apache 2.2, WordPress 3.9 and PHP 5.3.
This was used as an application Server. 1GB of memory is used by the second virtual
machine with MYSQL Database 5.5. This database was filled by the WordPress sample
contents. This machine was used as a database Server. JMeter was used as a benchmarked
tool.
Figure 6 shows that LXC experienced less overhead as compared to Xen when the
SELECT query was run. The focus on running this benchmark process is to see the
utilization of the CPU and the performance of the Network speed because these are the
main resources consumed in this test.
Scheepers (2014) concludes that Xen would be a better choice in the sense of equally
distributing resources, performance is not dependent on the other tasks, and it is executed
on the same machine [7]. However, LXC is much better in the sense of utilizing most of the
hardware resources or the execution of smaller isolated processes. In private and dot clouds,
LXC is a better option. Felter et al. (2014) evaluated the performance of three different
environments, Native, Docker, and KVM [3]. Overhead issues are also highlighted in their
research. Scenarios were investigated where more than one hardware resource was
completely utilized. To perform the tests, they used an IBM x3650 M4 server, 16 core
processors of Xeon E5-2665, Two Intel Sandy Bridge-EP of 2.4 - 3.0 GHz and 256 GB of
RAM. To make a non-uniform memory access, two processors were linked together with
QPI link. Cloud providers also use this kind of similar Server. The base operating system
was Ubuntu 13.10, docker version 1.0, Linux kernel 3.11.0, libvirt version 1.1.1 and QEMU
1.5.0. This Figure 8 shows that the average size of 1 MB was used for I/O, little over 60
seconds by measuring the performance of sequential read and write. In this case, slight
overhead can be seen by Docker and KVM. In other cases, KVM has almost a four times
performance difference.
Figure 9 demonstrates the execution of irregularly read, write and mixed workloads
utilizing a 4 kB square size and simultaneousness of 128, which I tentatively decided gives
the greatest execution to this specific SSD. As I would expect, docker acquaints no
overhead contrasted and Linux, however, KVM conveys just have the same number of
IOPS since every I/O operation must experience QEMU. While the VM's supreme
execution is still very high, it utilizes more CPU cycles per I/O operation, leaving less CPU
accessible for application work.
Felter et al. (2014) conclude that containers and VMs are both mature innovations that
have profited from the last 10 years of incremental equipment and programming
enhancements [3]. When all is said and done, docker is equivalent to or surpasses KVM
execution for each situation I tried. Our outcomes demonstrate that both KVM and docker
present irrelevant overhead for CPU and memory execution.
To conclude these past works, regardless of utilizing distinctive techniques and having
diverse centres, one thing is common.
9. Conclusion:
Docker automates the applications when they are containerized. An extra layer of docker
engine is added to the host operating system. The performance of docker is faster than
virtual machines as it has no guest operating system and less resource overhead.
References
[1] Boettiger, C. (2015). An introduction to Docker for reproducible research. ACM
SIGOPS Operating Systems Review, 49(1), 71-79.
[2] Bui, T. (2015). Analysis of docker security. arXiv preprint arXiv:1501.02967.
[3] Felter, W., Ferreira, A., Rajamony, R., & Rubio, J. (2014). An updated performance
comparison of virtual machines and linux containers. technology, 28, 32.
[4] Harji, A. S., Buhr, P. A., & Brecht, T. (2013). Our troubles with Linux Kernel
upgrades and why you should care. ACM SIGOPS Operating Systems Review,
47(2), 66-72.
[5] Joy, A. M. (2015). Performance comparison between Linux containers and virtual
machines. Paper presented at the Computer Engineering and Applications
(ICACEA), 2015 International Conference on Advances in.
[6] Russell, B. (2015). Passive Benchmarking with docker LXC, KVM & OpenStack.
[7] Scheepers, M. J. (2014). Virtualization and containerization of application
infrastructure: A comparison.
[8] Seo, K.-T., Hwang, H.-S., Moon, I.-Y., Kwon, O.-Y., & Kim, B.-J. (2014).
Performance Comparison Analysis of Linux Container and Virtual Machine for
Building Cloud.
[9] Turnbull, J. (2014). The Docker Book: Containerization is the new virtualization.
[10] Van der Aalst, W., Weijters, T., & Maruster, L. (2004). Workflow mining:
Discovering process models from event logs. Knowledge and Data Engineering,
IEEE Transactions on, 16(9), 1128-1142.
[11] Varghese, B., Subba, L. T., Thai, L., & Barker, A. (2016). Container-Based Cloud
Virtual Machine Benchmarking. arXiv preprint arXiv:1601.03872.
[12] Vase, T. (2015). Advantages of Docker.
[13] Waldspurger, C. A. (2002). Memory resource management in VMware ESX server.
ACM SIGOPS Operating Systems Review, 36(SI), 181-194.
[14] ACM SIGOPS Operating Systems Review. 36 p.181-194.