简体   繁体   English

Kubernetes CPU 分配:Azure 中的 vCore vs vCPU vs core?

[英]Kubernetes CPU allocation: is vCore vs vCPU vs core in Azure?

I am running a Java application on an Azure Kubernetes node with a Standard_D8s_v3 VM.我正在使用 Standard_D8s_v3 VM 的 Azure Kubernetes 节点上运行 Java 应用程序。 I am unsure about CPU allocation for a kubernetes deployment.我不确定 kubernetes 部署的 CPU 分配。 This mentions that 1 CPU is equals to 1 Azure vCore. 提到 1 个 CPU 等于 1 个 Azure vCore。 However the Azure VM specs mentions that Standard_D8s_v3 has 8 vCPUs (not vCores).但是 Azure VM 规范提到 Standard_D8s_v3 有 8 个 vCPU(不是 vCore)。 What is the difference between vCPU and vCore? vCPU 和 vCore 有什么区别?

Here you can see that the ratio of a Ds_v3 VM vCPU to cores (not vCores) is 2:1 due to Hyperthreading. 在这里您可以看到由于超线程,Ds_v3 VM vCPU 与核心(不是 vCore)的比率为 2:1。 Which means that 2 vCPUs are needed for the same performance of 1. Is vCore == core?这意味着需要 2 个 vCPU 才能获得与 1 相同的性能。vCore == 核心吗? If so, my assumption is that I should double the size of the VM.如果是这样,我的假设是我应该将 VM 的大小加倍。

Or, should I assume that 1 kubernetes CPU is equals to 1 vCPU?或者,我应该假设 1 个 kubernetes CPU 等于 1 个 vCPU?

Correct, 1 Kubernetes CPU equals 1 vCPU.正确,1 个 Kubernetes CPU 等于 1 个 vCPU。

For example i am using Standard_D4s_v3 nodes which have 4 vCPU according to here .例如,根据此处,我使用具有 4 个 vCPU 的Standard_D4s_v3节点。

When i do当我做

kubectl get nodes
kubectl describe node <node-name>

i can see this我可以看到这个

Capacity:
  cpu:                            4
Allocatable:
  cpu:                            3860m

Here is also good explanation whats the difference between a Core and vCPU on Azure .这里也很好地解释了Azure上的核心和 vCPU 之间的区别。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM