Windows VMs and CPU Cores vs Threads

ChrisReeve

Explorer
Joined
Feb 21, 2019
Messages
91
Hi

I am trying to run WIndows 10 as a VM on my freeNAS box. While setting up the VM, I have started with adding the two tunables (hw.vmm.topology.cores_per_package and hw.vmm.topology.cores_per_core to match my CPU, and E5-2650 v2 (8C/16T)

My question is, when I choose a number of virtual CPU cores to assign to a VM, am I assigning cores, or threads? I am asking because, lets say I assign 4 cores to my VM, it still only shows up as 1 socket, and 4 cores in Windows Task Manager. Are these 4 actual cores, which are NOT HyperThreaded, or are they two physical cores, with 4 threads available?
 

Jessep

Patron
Joined
Aug 19, 2018
Messages
379
I can't speak to FreeNAS, other virtualisation technology doesn't separate "physical" from "hyper-threaded" when assigning resources they are simply vCPU.

In ESXi or Hyper-V you would have 16 vCPU, however in most cases you can over subscribe by 4X as VM are rarely maxing the CPU and even if they peak it's seldom at the same time.

However you should assign the minimum number of vCPU needed for the task as assigning more can actually slow down your VM. If you assign 12 of 16 vCPU the VM will wait until 12 vCPU are free at the same time to assign for that task. Blocks of 2 or 4 vCPU will be more common and less likely to have delays.

Also don't assign more than one physical CPU worth of vCPU (likely less) as you will take a performance hit if you have to cross the NUMA boundary (between sockets).
 
Top