[英]If both a burstable and best-effort containers are in need of compute resource, is there any priority that kubernetes follows?
I will explain my question using an example. 我将用一个例子来解释我的问题。
Suppose in a node (with capacity X+1 cpu, Y+1 memory) there are two containers, 1 Burstable type container and the other best-effort type. 假设在一个节点(容量为X + 1 cpu,Y + 1内存)中有两个容器,一个是Burstable类型的容器,另一个是尽力而为类型。
If the burstable container (configured as X cpu request, Y memory request) is already using X cpu, Y memory of the node. 如果易爆容器(配置为X cpu请求,Y内存请求)已经在使用节点的X cpu,Y内存。
What happens next when both Burstable and Best-effort request for that unused 1 cpu, 1 memory of the node. 当Burstable和Best-effort同时请求该节点的未使用1 cpu,1内存时,接下来将发生什么。 Will Kubernetes give priority to Burstable container over Best-effort or is it random.
Kubernetes是Burstable容器优先于Best-effort还是随机的。
Note: My question is not regarding eviction of a process but regarding which container will get the unused 1 cpu. 注:我的问题是不是关于过程的驱逐,但关于其容器将获得未使用1个CPU。
From : https://github.com/kubernetes/community/blob/master/contributors/design-proposals/node/resource-qos.md 来自: https : //github.com/kubernetes/community/blob/master/contributors/design-proposals/node/resource-qos.md
Pods will not be killed if CPU guarantees cannot be met (for example if system tasks or daemons take up lots of CPU), they will be temporarily throttled. 如果无法满足CPU保证(例如,如果系统任务或守护程序占用大量CPU),则不会杀死Pod。
Memory is an incompressible resource and so let's discuss the semantics of memory management a bit. 内存是不可压缩的资源,因此让我们稍微讨论一下内存管理的语义。
Best-Effort pods will be treated as lowest priority. 尽力而为的豆荚将被视为最低优先级。 Processes in these pods are the first to get killed if the system runs out of memory.
如果系统内存不足,这些吊舱中的进程将首先被杀死。 These containers can use any amount of free memory in the node though.
这些容器可以在节点中使用任何数量的可用内存。
Guaranteed pods are considered top-priority and are guaranteed to not be killed until they exceed their limits, or if the system is under memory pressure and there are no lower priority containers that can be evicted. 保证的Pod被认为是优先级最高的Pod,并保证直到它们超过其限制时才被杀死,或者如果系统处于内存压力下并且没有可以撤出的优先级较低的容器,则将保证Pod被杀死。
Burstable pods have some form of minimal resource guarantee, but can use more resources when available. 易爆Pod具有某种形式的最小资源保证,但是在可用时可以使用更多资源。 Under system memory pressure, these containers are more likely to be killed once they exceed their requests and no Best-Effort pods exist.
在系统内存压力下,一旦这些容器超出了它们的请求,并且不存在尽力而为的容器,它们很可能被杀死。
So it seems Burstable pods will have priority over Best Effort pods. 因此,似乎“爆裂”豆荚将优先于“尽力而为”豆荚。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.