Understanding vCores and vCPUs

Hi there Experts,

I have one Intel Xeon with 4-Cores

Assuming that I assign 4 vCPUs to one VM
and all vCPUs have 100 load this theoretically
would bound all the cores of the Physical CPU?

If 1 Physical core is equal to 1 vCPU
1 vCore is equal to half vCPU or half Physical core?
What is the actual match between Physical and Virtual?

Thanks in Advance,
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Andrew Hancock (VMware vExpert / EE MVE^2)VMware and Virtualization ConsultantCommented:
1 vCPU = 1 physical core of the physical host processor, (in simplicity!).

BUT, the hypervisor scheduler can move the process from one core to another core, throughout the execution of the VM.

So it might not be the same core all the time.

In your example, if you have a non-hyperthreaded, actual 4 core processor, you will have access to 4 vCPU.

But many VMs can share a core, and you can have 5-6 VMs per physical core of a processor.

vSMP (virtual SMP) can affect virtual machine performance, when adding too many vCPUs to virtual machines that cannot use the vCPUs effectly, e.g. Servers than can use vSMP correctly :- SQL Server, Exchange Server.

This is true, many VMware Administrators, think adding lots of processors, will increase performance - wrong! (and because they can, they just go silly!). Sometimes there is confusion between cores and processors. But what we are adding is additional processors in the virtual machine.

So 4 vCPU, to the VM is a 4 Way SMP (Quad Processor Server), if you have Enterprise Plus license you can add 8, (and only if you have the correct OS License will the OS recognise them all).

If applications, can take advantage e.g. Exchange, SQL, adding additional processors, can/may increase performance.

So usual rule of thumb is try 1 vCPU, then try 2 vCPU, knock back to 1 vCPU if performance is affected. and only use vSMP if the VM can take advantage.

Example, VM with 4 vCPUs allocated!

My simple laymans explaination of the "scheduler!"

As you have assigned 4 vCPUs, to this VM, the VMware scheulder, has to wait until 4 cores are free and available, to do this, it has to pause the first cores, until the 4th is available, during this timeframe, the paused cores are not available for processes, this is my simplistic view, but bottom line is adding more vCPUs to a VM, may not give you the performance benefits you think, unless the VM, it's applications are optimised for additional vCPUs.

See here

see here


also there is a document here about the CPU scheduler



Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
Leon KammerCommented:
As far as I know Hyper-V does not affinitise vCPUs to CPU cores.

We have 8 times more vCPUs than physical cores on two of our machines. Last time I checked the recommendation was maximum 12 vCPUs per core, but that could have changed.

Every single time a thread runs, no matter what it is, it drives the CPU at 100%, and when you see it at 100%, it means that the CPU was completely active across the measured span of time. 20% means it was running a process 1/5th of the time and 4/5th of the time it was idle.
Hyper-V will pre-empt it when it’s another thread’s turn and it is possible to have multiple 100% CPU threads running on the same system and some threads will simply let their time slice go by, freeing it up so other threads get CPU access more quickly.

Hope this helps.
mamelasAuthor Commented:
Thank you both for your answers!
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today

From novice to tech pro — start learning today.