How many vCPUs can I have?
-
I suggest always setting a minimum of 2 vCPUs to allow access in case of a runaway thread within the guest.
When it comes to performance there are two boundaries to keep in mind:
1: Processor Physical Core Count
2: Memory per memory controller (NUMA Node)Our rule of thumb for #1 is # physical cores (pCores) -1
Our rule of thumb for #2 is a bit more flexible as a VM may not start if too much vRAM is assigned and it is bound by a NUMA boundary.
A performance hit can be had by too many vCPUs and vRAM assigned that crosses NUMA boundaries (can be set in the VM's properties). In both cases, bits are bounced around either between physical CPUs or between memory banks within each NUMA node. That bouncing around is lost CPU cycles right there.
-
@PhlipElder said in How many VCPU’s can I have?:
When it comes to performance there are two boundaries to keep in mind:
1: Processor Physical Core CountOur rule of thumb for #1 is # physical cores (pCores) -1
This should be by thread, not core count. In the AMD world, they are one and the same. In the Intel world, they are not, but are close. In the Power, ARM, and Sparc worlds, they can be wildly divergent.
-
@PhlipElder said in How many VCPU’s can I have?:
Our rule of thumb for #2 is a bit more flexible as a VM may not start if too much vRAM is assigned and it is bound by a NUMA boundary.
A performance hit can be had by too many vCPUs and vRAM assigned that crosses NUMA boundaries (can be set in the VM's properties). In both cases, bits are bounced around either between physical CPUs or between memory banks within each NUMA node. That bouncing around is lost CPU cycles right there.
With good awareness you can manage this pretty well by mapping out possible RAM bank overruns, or just using NUMA affinity. But that becomes more complex.
-
NUMA issues is a key reason why we often recommend a single proc with more cores than two procs with fewer cores each. No NUMA.
-
@scottalanmiller said in How many VCPU’s can I have?:
NUMA issues is a key reason why we often recommend a single proc with more cores than two procs with fewer cores each. No NUMA.
Don't some of the modern CPUs have multiple memory controllers per CPU thus multiple NUMA Nodes per CPU? I've seen drawings for such but not encountered in servers as of yet.
-
@PhlipElder said in How many VCPU’s can I have?:
@scottalanmiller said in How many VCPU’s can I have?:
NUMA issues is a key reason why we often recommend a single proc with more cores than two procs with fewer cores each. No NUMA.
Don't some of the modern CPUs have multiple memory controllers per CPU thus multiple NUMA Nodes per CPU? I've seen drawings for such but not encountered in servers as of yet.
They might, I've not seen it yet either.
-
TL;DR 20
-
-
The maximum you CAN have is 240 vCPUs per VM, which is a limitation of Hyper-V Server 2016.
-
@Obsolesce said in How many VCPU’s can I have?:
The maximum you CAN have is 240 vCPUs per VM, which is a limitation of Hyper-V Server 2016.
That said, Hyper-V will tell you that the percent of total system CPU resources given to a VM will be 100% if you allocate the same number of total threads you have to a VM.
-
@Obsolesce said in How many VCPU’s can I have?:
The maximum you CAN have is 240 vCPUs per VM, which is a limitation of Hyper-V Server 2016.
How did you determine that Hyper-V is involved?
-
-
@scottalanmiller said in How many VCPU’s can I have?:
@Obsolesce said in How many VCPU’s can I have?:
The maximum you CAN have is 240 vCPUs per VM, which is a limitation of Hyper-V Server 2016.
How did you determine that Hyper-V is involved?
Lots of good stuff there.
-
@Obsolesce said in How many VCPU’s can I have?:
@scottalanmiller said in How many VCPU’s can I have?:
@Obsolesce said in How many VCPU’s can I have?:
The maximum you CAN have is 240 vCPUs per VM, which is a limitation of Hyper-V Server 2016.
How did you determine that Hyper-V is involved?
Yes, we know Hyper-V's limits, but how did you know that he has Hyper-V in the first place? I've done a text search and until you said it, it was never mentioned in the thread.
-
@scottalanmiller said in How many VCPU’s can I have?:
@Obsolesce said in How many VCPU’s can I have?:
@scottalanmiller said in How many VCPU’s can I have?:
@Obsolesce said in How many VCPU’s can I have?:
The maximum you CAN have is 240 vCPUs per VM, which is a limitation of Hyper-V Server 2016.
How did you determine that Hyper-V is involved?
Yes, we know Hyper-V's limits, but how did you know that he has Hyper-V in the first place? I've done a text search and until you said it, it was never mentioned in the thread.
It's like Apple or Arch Linux... if someone is using it, they WILL tell you. That he didn't say he was, tells me he's using Hyper-V.
-
@Obsolesce said in How many VCPU’s can I have?:
@scottalanmiller said in How many VCPU’s can I have?:
@Obsolesce said in How many VCPU’s can I have?:
@scottalanmiller said in How many VCPU’s can I have?:
@Obsolesce said in How many VCPU’s can I have?:
The maximum you CAN have is 240 vCPUs per VM, which is a limitation of Hyper-V Server 2016.
How did you determine that Hyper-V is involved?
Yes, we know Hyper-V's limits, but how did you know that he has Hyper-V in the first place? I've done a text search and until you said it, it was never mentioned in the thread.
It's like Apple or Arch Linux... if someone is using it, they WILL tell you. That he didn't say he was, tells me he's using Hyper-V.
So your hypothesis is that a lack of pertinent information means it is a Microsoft user?
-
@scottalanmiller said in How many VCPU’s can I have?:
@Obsolesce said in How many VCPU’s can I have?:
@scottalanmiller said in How many VCPU’s can I have?:
@Obsolesce said in How many VCPU’s can I have?:
@scottalanmiller said in How many VCPU’s can I have?:
@Obsolesce said in How many VCPU’s can I have?:
The maximum you CAN have is 240 vCPUs per VM, which is a limitation of Hyper-V Server 2016.
How did you determine that Hyper-V is involved?
Yes, we know Hyper-V's limits, but how did you know that he has Hyper-V in the first place? I've done a text search and until you said it, it was never mentioned in the thread.
It's like Apple or Arch Linux... if someone is using it, they WILL tell you. That he didn't say he was, tells me he's using Hyper-V.
So your hypothesis is that a lack of pertinent information means it is a Microsoft user?
Am I wrong?
-
@Obsolesce said in How many VCPU’s can I have?:
@scottalanmiller said in How many VCPU’s can I have?:
@Obsolesce said in How many VCPU’s can I have?:
@scottalanmiller said in How many VCPU’s can I have?:
@Obsolesce said in How many VCPU’s can I have?:
@scottalanmiller said in How many VCPU’s can I have?:
@Obsolesce said in How many VCPU’s can I have?:
The maximum you CAN have is 240 vCPUs per VM, which is a limitation of Hyper-V Server 2016.
How did you determine that Hyper-V is involved?
Yes, we know Hyper-V's limits, but how did you know that he has Hyper-V in the first place? I've done a text search and until you said it, it was never mentioned in the thread.
It's like Apple or Arch Linux... if someone is using it, they WILL tell you. That he didn't say he was, tells me he's using Hyper-V.
So your hypothesis is that a lack of pertinent information means it is a Microsoft user?
Am I wrong?
Just making sure that I understood you.
Although in these cases, I would say that VMware is just as likely.
-
My rule of the thumb is start with 1 vCPU if it's Linux vm, 2 vCPUs if it's Windows, unless you enjoy Windows updates or Antivirus scans taking hours to complete....
-
@marcinozga said in How many VCPU’s can I have?:
My rule of the thumb is start with 1 vCPU if it's Linux vm, 2 vCPUs if it's Windows, unless you enjoy Windows updates or Antivirus scans taking hours to complete....
This is how I do it too. Unless it's something that does nothing 99.99999% of the time like a license server on Windows.