In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-04-12 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >
Share
Shulou(Shulou.com)06/01 Report--
What this article shares to you is about the difference between docker container and virtual machine. The editor thinks it is very practical, so I share it with you to learn. I hope you can get something after reading this article.
What is the difference between a docker container and a virtual machine? Traditional virtualization is to virtualize multiple OS on the basis of hardware physical resources, and then build a relatively independent program running environment on the basis of OS. While Dokcer is virtual on the basis of OS, it is obvious that Dokcer is lighter, so its resource consumption and performance consumption have great advantages over traditional virtualization.
Structural differences
The way to realize resource isolation of virtual machine is to use Hypervisor to virtualize the server's CPU, memory, IO and other devices.
The docker container is much simpler, and the Docker engine can be seen as the encapsulation of Linux's namespace, cgroup and image management file system. Docker does not use a completely independent operating system to achieve environment isolation like a virtual machine, but uses the resource and environment isolation realized by the container mode supported by the linux kernel itself.
To put it simply, Docker is the isolation of the system environment realized by namespace, the resource restriction by cgroup, and the isolation of root environment by mirror image.
Differences in performance
Because Docker has fewer abstraction layers than virtual machines and does not need Hypervisor to virtualize hardware resources, the programs running on the Docker container directly use the hardware resources of the actual physical machine, which reduces the time and resource consumption of loading the operating system kernel, so it has more advantages in the utilization of resources such as CPU and memory.
For example, the startup time of containers is seconds, while virtual machines are minutes, hard disks are generally calculated by MB, while virtual machines are mostly GB-level space. In terms of performance, containers are closer to the native, and a single machine can support thousands, far more than dozens of virtual machines.
Docker has a small design, fast deployment and migration, efficient operation, independent applications, and managers can see the contents of all containers. The virtualization technology is relatively bloated, no matter what application needs to create a new system first, and not according to the application isolation, but according to the system isolation, the administrator can not see the internal information of the system.
These are the differences between docker containers and virtual machines. The editor believes that there are some knowledge points that we may see or use in our daily work. I hope you can learn more from this article. For more details, please follow the industry information channel.
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.