当前位置:网站首页>Cloud native technology container knowledge points
Cloud native technology container knowledge points
2022-07-06 22:43:00 【Beipiao's vegetable Xiaobai】
Part of this article is excerpted from CNCF The official account : Link address
About resources
Any resource of the server is valuable , especially CPU, But in actual production activities , Utilization of resources , But not very high , Can occupy the server 50% It's already very good
How to save resources
The rational allocation of resources is to make full use of servers , The most effective way to reduce costs , The simplest and most effective way , Is to use containers
Why containers compare VM Can improve resource utilization ?
The resource isolation occupation of virtualization itself 10%, The container itself does not occupy more than 1%. This is because Docker Using the host kernel , Without the need for Guest OS. therefore , When you create a new container ,Docker There is no need to reload an operating system like a virtual machine , This avoids guidance 、 Loading the operating system kernel is a time-consuming and resource-consuming process .
When you create a new virtual machine , Virtual machine software needs to be loaded Guest OS, This new process is minute level , and Docker Because of the direct use of the host's operating system, this process is omitted , Containers only need the necessary running environment to start , Including file system 、 The system class library 、shell Environmental Science . Therefore, the boot is lighter than the virtual machine .
The positioning and capabilities of containers and virtualization are different , It also enables applications to run in containers and make full use of resources . It mainly includes the following points :
- When containers use resources , Can be based on Limit/Request Mechanism , Give containers elastic resource allocation .
- The container is extremely simple / Automatic capacity expansion and contraction , The application can be deployed , It is not necessary to allocate resources according to the maximum resource needs at the beginning , You can only add instances quickly when you need them .
- When the container encounters failure or resource preemption conflict , It can automatically migrate to other nodes with resources .
Based on the above three points , So that resources can be used more fully and effectively
Why containers are lighter , What is the mechanism of the container ?
The container is similar to VM, But they have a relaxed isolation property , The operating system can be shared between applications (OS). therefore , Containers are considered lightweight . Container and VM similar , Has its own file system 、CPU、 Memory 、 Process space, etc . Because they are separated from the infrastructure , So you can cross clouds and OS Release version for migration .
Docker yes LXC(Linux Container) and AUFS(AnotherUnionFS) A combination :LXC Is responsible for resource management ,AUFS Is responsible for image management ; Include Cgroup,
Namespace,Chroot And so on , And pass Cgroup Resource management , The three are actually one ring after another .Cgroup Is to implement resource management at the bottom ,LXC stay Cgroup There's a layer of packaging on it , And then Docker And in the LXC It encapsulates a layer of .
边栏推荐
- Traversal of a tree in first order, middle order, and then order
- signed、unsigned关键字
- Heavyweight news | softing fg-200 has obtained China 3C explosion-proof certification to provide safety assurance for customers' on-site testing
- 【无标题】
- 树的先序中序后序遍历
- 【编译原理】做了一半的LR(0)分析器
- memcached
- Const keyword
- Unified Focal loss: Generalising Dice and cross entropy-based losses to handle class imbalanced medi
- hdu 5077 NAND(暴力打表)
猜你喜欢
随机推荐
C# 三种方式实现Socket数据接收
View
memcached
自制J-Flash烧录工具——Qt调用jlinkARM.dll方式
POJ 1094 sorting it all out
Comparison between variable and "zero value"
The difference between enumeration and define macro
pytorch_YOLOX剪枝【附代码】
LeetCode 练习——剑指 Offer 26. 树的子结构
[leetcode] 19. Delete the penultimate node of the linked list
关于声子和热输运计算中BORN电荷和non-analytic修正的问题
GD32F4XX串口接收中断和闲时中断配置
2022-07-04 the high-performance database engine stonedb of MySQL is compiled and run in centos7.9
Aardio - 通过变量名将变量值整合到一串文本中
Typescript get function parameter type
DR-Net: dual-rotation network with feature map enhancement for medical image segmentation
2022-07-05 use TPCC to conduct sub query test on stonedb
Jafka source analysis processor
BasicVSR_ Plusplus master test videos and pictures
Dealing with the crash of QT quick project in offscreen mode