当前位置:网站首页>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 .
边栏推荐
猜你喜欢
AdaViT——自适应选择计算结构的动态网络
Mise en place d'un environnement de développement OP - tee basé sur qemuv8
Leetcode exercise - Sword finger offer 26 Substructure of tree
Matlab tips (27) grey prediction
rust知识思维导图xmind
Web APIs DOM time object
Pit encountered by handwritten ABA
Aardio - 封装库时批量处理属性与回调函数的方法
动作捕捉用于蛇运动分析及蛇形机器人开发
Custom swap function
随机推荐
Plafond du tutoriel MySQL, bien collecté, regardez lentement
2022-07-05 stonedb sub query processing parsing time analysis
DR-Net: dual-rotation network with feature map enhancement for medical image segmentation
Is there any requirement for the value after the case keyword?
树的先序中序后序遍历
【踩坑合辑】Attempting to deserialize object on CUDA device+buff/cache占用过高+pad_sequence
Should novice programmers memorize code?
软考高级(信息系统项目管理师)高频考点:项目质量管理
sizeof关键字
Financial professionals must read book series 6: equity investment (based on the outline and framework of the CFA exam)
extern关键字
Balanced Multimodal Learning via On-the-fly Gradient Modulation(CVPR2022 oral)
Web APIs DOM time object
MySQL教程的天花板,收藏好,慢慢看
Clip +json parsing converts the sound in the video into text
2014 Alibaba web pre intern project analysis (1)
Matlab tips (27) grey prediction
Extern keyword
Puppeter connects to the existing Chrome browser
[step on pit collection] attempting to deserialize object on CUDA device+buff/cache occupy too much +pad_ sequence