VMware Hypervisor CPU Distribution


I installed vmware hypersivor on physical machine with 2 Processors each having 8 cores.

In the summary its showing as follows:

Processor Sockets: 2
Cores per Socket: 8
Logical Processors: 32
Hyperthreading: Active

So now when creating virtual machine I get two options for allocating cpu which are as follows:
Number of virtual sockets
Number of cores of sockets
Total number of cores---- is what comes from above two options and each above option drop down box gives upto 32

So If I want to create a virtual machine with 6 core then how is the actual cpu distributed from phyiscal side, vmware host side and virtual machine side. Also how to assign cpu for virtual machine by number of virtual sockets or number of cores of sockets.

Please elaborate in a nutshell.
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.

GG VPCommented:
So it goes like this,

Processor's physically present - 2
Number of cores in each processor - 8

Total number of cores : 2 x 8 = 16 cores

Hyperthreading active : 16 x 2 = 32 cores
VMware virtualizes your physical CPUs and hands out (timeslices of) vCPUs to VMs. By saying that a particular VM needs 6 vCPUs, you are placing a scheduling constraint so that the VM will be given a timeslice with 6 cores/hyperthreads simultaneously available. Nearly all of the time, these will all run on the same physical CPU because of advantages of shared access to caches and other considerations.

By default, each vCPU is a single virtual socket with a single core. This gives the scheduler the most flexibility to make suitable decisions. There may be software licensing situations, though, where it is necessary to increase the number of cores per socket. Usually this doesn't affect performance but it's possible to create situations where the mismatch between the vCPU assignments and the actual hardware can get you into trouble.

Here are a few references that may help to clarify things...

Configuring Multicore Virtual CPUs

Does corespersocket Affect Performance?

The CPU Scheduler in VMware vSphere® 5.1

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
GG VPCommented:
In addition to jmcg comment,

start with 1 vCPU, it is more than sufficient for most of the workloads. If you want to increase the vCPU count, then the application should be able to utilize the multiple vCPUs, applications like Exchange, SQL effectively use multiple vCPUs.

As a thumb of rule, start with 1 vCPU, monitor the performance and if necessary, increase the vCPU.
IT Pros Agree: AI and Machine Learning Key

We’d all like to think our company’s data is well protected, but when you ask IT professionals they admit the data probably is not as safe as it could be.

Yes, agreed. It takes a lot of experience and detailed knowledge of your workload to outsmart - as in "do better than" - the scheduler's behavior. Even then, you need to do pretty careful experiments and observations to make sure your theories actually prove out in better performance.
srinivas2324Author Commented:
vCPU's here is core or socket.

If I am selecting virtual sockets as 10 and cores of socket as 1 then I will be getting total 10 cores right. In that case if my windows server standard R2 is limited to 4 sockets so how will vmware distribute here.
GG VPCommented:
From VMware documentation,

Setting the number of cores per CPU in a virtual machine (1010184)

Some operating system SKUs are hard-limited to run on a fixed number of CPUs.

For example, Windows Server 2003 Standard Edition is limited to run on up to 4 CPUs. If you install this operating system on an 8-socket physical box, it runs on only 4 of the CPUs.The operating system takes advantage of multi-core CPUs so if your CPUs are dual core, Windows Server 2003 Standard Edition runs on up to 8 cores, and if you have quad-core CPUs, it runs on up to 16 cores, and so on.

Virtual CPUs (vCPU) in VMware virtual machines appear to the operating system as single core CPUs. So, just like in the example above, if you create a virtual machine with 8 vCPUs (which you can do with vSphere) the operating system sees 8 single core CPUs.If the operating system is Windows 2003 Standard Edition (limited to 4 CPUs) it only runs on 4 vCPUs.

Note: Remember that 1 vCPU maps onto a physical core not a physical CPU, so the virtual machine is actually getting to run on 4 cores.

Further reading:

vCPU configuration. Performance impact between virtual sockets and virtual cores?
PberSolutions ArchitectCommented:
No comment has been added to this question in more than 21 days, so it is now classified as abandoned.

I have recommended this question be closed as follows:

-- jmcg (https:#a40644075)
-- GG VP (https:#a40648971)

If you feel this question should be closed differently, post an objection and the moderators will review all objections and close it as they feel fit. If no one objects, this question will be closed automatically the way described above.

Experts-Exchange Cleanup Volunteer
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.