This is an article gleaned from an exhaustive TechNet forum post. This covers the basics and depth of virtual CPU, CPU sharing / time slicing, and should aid in the understanding of how hypervisors present CPUs
to virtual machines.
This has been formatted in a Q and A type of format to divide the topics and group items.
From what i am reading it seems like it should use all 8 cores, although from what i am reading in other parts of this forum it doesn't.
I understand that the virtual cores are basically an allocation of time to the entire 8 cores?
I just have a software developer telling me that his software will only use 4 cores if presented with the 4 virtual CPU.
I said yes it will seem that way to the OS, but under that it will be actually using all 8 cores as the load is spread across them all.
Am i correct in that assumption?
All 8 physical cores are used, however the VM can only be allocated a (current) maximum of 4 vCPUs.
A physical core gets divided into 8 vCPUs (these are technically logical processors and therefore represent processing time on the physical stack with a maximum of 8 concurrent threads executing on a physical
processor at any one moment in time).
As threads execute (vCPUs are used) they are cycled around the physical CPUs.
It is possible for a VM to get 'stuck' on a single physical CPU. Applications like CPUBurn never stop processing and maximize the threads within the VM. The result is that the execution never has a breakpoint
and therefore the hypervisor never gets a chance to cycle the work to the next processor. This is an example of a 'bad' application that does not virtualize well.