Navindu09
Navindu09

Reputation: 3

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. I am unsure about CPU allocation for a kubernetes deployment. This mentions that 1 CPU is equals to 1 Azure vCore. However the Azure VM specs mentions that Standard_D8s_v3 has 8 vCPUs (not vCores). What is the difference between vCPU and vCore?

Here you can see that the ratio of a Ds_v3 VM vCPU to cores (not vCores) is 2:1 due to Hyperthreading. Which means that 2 vCPUs are needed for the same performance of 1. Is vCore == core? If so, my assumption is that I should double the size of the VM.

Or, should I assume that 1 kubernetes CPU is equals to 1 vCPU?

Upvotes: 0

Views: 4507

Answers (2)

user3167419
user3167419

Reputation: 49

The CPU resource is measured in CPU units. One CPU, in Kubernetes, is equivalent to:

1 AWS vCPU
1 GCP Core
1 Azure vCore
1 Hyperthread on a bare-metal Intel processor with Hyperthreading

Upvotes: 0

Philip Welz
Philip Welz

Reputation: 2817

Correct, 1 Kubernetes CPU equals 1 vCPU.

For example i am using Standard_D4s_v3 nodes which have 4 vCPU according to here.

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.

Upvotes: 0

Related Questions