VMware Cloud Community
Eriser04
Contributor
Contributor

Benefits of multicore vs multi virtual socket

Hello Everyone,

vSphere 5 now allows you to configure the number of virtual sockets vs number of cores per socket, but I see very little documentation on the benefit of doing one vs the other besides licensing restrictions. I understand the whole concept of the old ways and how 1 core = 1vCPU which means server 2003 can only have 4 cores etc, but what I'm looking for is someone can explain the benefit from a CPU scheduling point of view. Does the hypervisor care if I assign 1 virtual socket and 4 cores vs 4 virtual sockets and 1 core?  Will I gain a performance increase or decrease by doing one method verses another? Does this only matter for applications that can benefit from multiple threads?

If someone could shed some light on this topic I think that would be a real benefit to the community.

Thanks,

Eric

0 Kudos
6 Replies
suhag79
Hot Shot
Hot Shot

don't think it will impact on performance....but still not sure....

0 Kudos
PduPreez
VMware Employee
VMware Employee

Hi Eric

There are no performance benefit from configuring more cores per vCPU.

Like you mentioned, the main reason for this added feature is physical CPU constraints and Licensing for certain Apps

The only enhancement in Scheduling in vSphere 5 is this : Performance vSphere 5.0

Intel SMT–related CPU scheduler enhancements

Intel SMT architecture exposes two hardware contexts from a single core. The benefit of utilizing two hardware contexts ranges from 10% to 30% in improved application performance, depending on the workloads. In vSphere 5.0, the VMware® ESXi™ CPU scheduler’s policy is tuned for this type of architecture to balance between maximum throughput and fairness between virtual machines. In addition to the number of performance optimizations made around SMT CPU scheduling in vSphere 4.1 (running the VMware ESXi hypervisor architecture), we have further enhanced the SMT scheduler in VMware ESXi 5.0 to ensure high efficiency and performance for mission-critical applications.

To answer your question:

Does the hypervisor care if I assign 1 virtual socket and 4 cores vs 4 virtual sockets and 1 core?  Will I gain a performance increase or decrease by doing one method verses another? Does this only matter for applications that can benefit from multiple threads?

Each vCPU or vCore addresses a Physical core, so it is all the same to the hypervisor

There is no performance increase/decrease either way

Multiple thread Apps are based on Physical CPUs, so either config on Virtual machines will have the same performance

And remember, always start with 1 vCPU Smiley Wink

Also see this Discussion

Please award points if this is helpful/correct :smileycool:

0 Kudos
chriswahl
Virtuoso
Virtuoso

I'd like to point out that this is not a new feature of vSphere 5, it's just that there is now an easy spot in the GUI to configure it. This has been around for a while to assist with applications that looked at sockets for licensing. Smiley Wink

In vSphere 4 you had to use a configuration parameter. See KB 1010184 "Setting the number of cores per CPU in a virtual machine"

VCDX #104 (DCV, NV) ஃ WahlNetwork.com ஃ @ChrisWahl ஃ Author, Networking for VMware Administrators
0 Kudos
RobBerginNH
Enthusiast
Enthusiast

I just tested two different 4 vCPU VMs.

VM #1 = 4 vCPU with the cpuid.coresPerSocket set to 1

VM #2 = 4 vCPU with the cpuid.coresPerSocket set to 2

And VM #2 was 2x faster (scored a 7530) vs. VM#1 (3778).

So I get that it doesn't make the physical cores any faster - but it does let a 4 vCPU hit 8 cores where the default is 4 vCPU hitting 4 cores.

So I think its faster (the VM) - not the cores.

0 Kudos
LondonD
Contributor
Contributor

Hi

It would be 2x faster because VM#2 has 2x more cores.

You are literally testing a 4 vCPU VM against a 8 vCPU VM

It looks like the question here was about the same amount of cores but different vCPU setup

Witht the following setup you will get the same performance:

VM #1 = 4 vCPU with the cpuid.coresPerSocket set to 1

VM #2 = 2 vCPU with the cpuid.coresPerSocket set to 2

0 Kudos
RobBerginNH
Enthusiast
Enthusiast

Agreed - so in my environment - I leave behind 70-80% of the CPU and run out of RAM - so I add more RAM to my hosts and try to use more CPU (which is perfectly aligned with Vmware's revenue strategy for vSphere 5 - add all the memory you want - and of course - add the software licensing with it).

But I digress.

But if you doubled the multiplier - its a little difficult to manage - but you can drive up CPU utilization (maybe?) but you will alter your density numbers.

With VMs being 1 vCPU : 1 Core vs a VM being 8 vCPU : 2 core or 8 vCPU : 4 core - not all VMs will be equal which can skew reporting.

But if definitely a way to increase performance on a CPU bound VM.

0 Kudos