简体   繁体   English

如果易爆容器和尽力而为容器都需要计算资源,那么kubernetes是否有优先级?

[英]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.

相关问题 创建一个“尽力而为”的 pod,它的 oom 分数不是 1000,而是 -999 - create a "Best-effort" pod and its oom score not 1000 but -999 Kubernetes 中 QoS Burstable pod 的资源分配 - Resource allocation for QoS Burstable pods in Kubernetes 使用 Kubernetes 部署/更新容器的最佳实践? - Best practices for deploying/updating containers with Kubernetes? 需要通过 Kubernetes 容器中的命令进行输入 - Need input with passing commands in Kubernetes containers 在Kubernetes或部分GPU资源请求中将GPU共享到多个容器 - Sharing GPU to multiple containers in Kubernetes or Fractional GPU Resource Request Kubernetes是实现自己的容器还是使用Docker容器,还是两者都使用? - Does Kubernetes implement its own container or use Docker containers or Both? kube.netes init 容器在 pod 运行过程中会消耗资源吗? - Will kubernetes init containers consume resource during pod running? 有什么方法可以使用Kubernetes运行超级特权容器吗? - Is there any way to run super-privileged containers using Kubernetes? 我们可以在 kubernetes 初始化容器中设置任何条件吗? - Can we set any conditions in kubernetes init containers? Kubernetes:一个或多个容器没有资源限制 - VS Code Kubernetes 工具中的警告 - Kubernetes: One or more containers do not have resource limits - warning in VS Code Kubernetes tools
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM