VMware Cloud Community
Andrej201110141
Contributor
Contributor

Question regarding physical CPU presentation to VM

I have a question regarding physical CPU presentation to a VM.

Our VMware infrastructure has two servers each with four quad core amd cpu (16 cores alltogether).

We have a VM that had 1 virtual CPU. After the CPU became the botleneck we added another virtual CPU.

My question is how the CPUs are presented to a VM:

  • I already read through VMware ESX architecture guides and I understood that when VM has 1 CPU it can use 1 a whole physical CPU.

  • Now in practice it seems that VM can only use a single core (not all four) from the physical CPU?

When VM uses a single core each on a different physical CPUs it means that we need two per CPU licenses (for our database software) but actualy only uses 1/2 CPU - two different cores (each on seperate physical CPU, each CPU has four cores).

Any ideas?

Thanks,

Andrej

Tags (1)
0 Kudos
13 Replies
AndreTheGiant
Immortal
Immortal

If that is so it is not optimal for our case because we have a database that is licensed per CPU. When it uses a single core each on a different physical CPUs. That means that we need two per CPU licenses (for our database software) but only use 1/2 CPU - two cores (each on seperate physical CPU, each CPU has four cores).

Do you have Oracle?

The physical CPU is the one in the socket.

The virtual CPU could be one or more core (also from different socket).

You can "set" with core to use using CPU Affinity (in VM properties), but this will create big problem with VMotion.

Andre

**if you found this or any other answer useful please consider allocating points for helpful or correct answers

Andrew | http://about.me/amauro | http://vinfrastructure.it/ | @Andrea_Mauro
0 Kudos
acnsys
Enthusiast
Enthusiast

Access to the physical CPU is handled by the ESX Server scheduler.

The vmkernel schedules CPU cycles across all available CPU's, the Service console always operates on CPU0 but this also shares VM resource.

With affinity you can dedicate a CPU to a VM, but this limits things like vmotion.

I think MS is licensing the PHYSICAL processor, not the virtual: http://communities.vmware.com/message/215331

Gabrie1
Commander
Commander

In the VMware Kernel, the scheduler knows the difference about cores and cpu's. Normally when you assing 2 vCPU's to a VM, this means two cores. In ESX 3.5 the scheduler will in 99% of all cases make sure that the cores needed for the 2 vCPU's are run on the same physical cpu. In other words, with a dual socket quad core system, when running a dual cpu VM, both virtual cpu's of that VM will always run together on the same physical CPU.

But..... this is of no interest to the company you are buying licenses from.They will often tell you that you just have to license the number of cpu's the VM could possibly run on.

Gabrie

http://www.GabesVirtualWorld.com
Andrej201110141
Contributor
Contributor

Thanks.

We are using Virtual Center and need the VMotion functionality. So setting the affinity is out of the question. Smiley Sad

We use three instances of MS SQL server (two 2008 enterprise and one 2005 standard).

The SQL Server 2008 enterprise per processor licese that we use can be licenced per one CPU as long as it runs on one physical CPU (vCPUs do not matter, number of instances also does not).

Is there some written info about VMware vCPUs prefering running on the same physical CPU? It would realy help... I looked but did not find it yet.

Thanks so far

Andrej

0 Kudos
AllenU
Contributor
Contributor

I am facing almost the same question but a very small case. I have two phy. cpu with quad core on each on ESXi. I only run one guest OS on it and assign 4 vCPUs on that guest OS. I discover from the performance inside VI. It utlizies only 4 cores. Now I am facing bottleneck. Is there anyone who faces the same problem?

0 Kudos
Andrej201110141
Contributor
Contributor

I think this is the newest document about SQL Server 2008 licensing:

Chapter VIRTUALIZATION AND MULTI-INSTANCING

andrej

0 Kudos
acnsys
Enthusiast
Enthusiast

As said Gabrie the scheduler knows the difference between CPUs and cores, so when u assign 4 vCPUs to a guest it will have access to 4 cores, not 4 CPUs

0 Kudos
AllenU
Contributor
Contributor

THX, but is there any ways to increase the cpu power?

0 Kudos
Andrej201110141
Contributor
Contributor

Yes, you can set the minimum CPU power for a VM to a higher frequency than that of a single core. (we have 4 cores each of 3GHz - together 12GHz).

So we set the minimum power of CPU power to two cores (6GHz).... and the whole virtualization host got unstable.... we got errors and reboots in the production enviroment....

Unfortunately this was not the solution.

Andrej

0 Kudos
acnsys
Enthusiast
Enthusiast

There is no settings for minimum CPU power, i guess you mean reservation & limit?

0 Kudos
Andrej201110141
Contributor
Contributor

Yes I meant reservation...

Andrej

0 Kudos
acnsys
Enthusiast
Enthusiast

reservation is only useful when you see ressources contention (High CPU ready time or Memory Balloon usage). It wont make the VM faster.

0 Kudos
AllenU
Contributor
Contributor

But Is it anyway to make the guest OS full utlizing all the physical CPU?

Does buying ESX license help????

0 Kudos