hi there,
We are looking at virtualizing a DB server. The product vendor seems to be a bit anxious to do this.
The DB is postgres by the way.
Can someone tell me how it works in this situation:
I have two quad core CPU on the ESX server and my VM has two vcpu. How do the virtual cpus relate ro the physical and logical cores
and how do they use them?
I personally never had to create a VM that required more than one CPU so my knowledge us not up to scratch.
If you have an easy to understand document let me know. I would like to understand how logical cpu schedule their resources
etc.
vCPU did have the relation tie together with the physical number of cores on your current CPU in the ESX servers. In most of the case, I will suggest to keep it by default, unless you would need further performance tuning, you can select specify cores to handle the Vcpu on your VM, as well as the change on the share value, resource allocation and reservation.
Hello,
Per time slice for each VM, there is a 1 to 1 mapping between vCPU and Core.
Best regards,
Edward L. Haletky
VMware Communities User Moderator
====
Author of the book 'VMWare ESX Server in the Enterprise: Planning and Securing Virtualization Servers', Copyright 2008 Pearson Education.
SearchVMware Blog: http://itknowledgeexchange.techtarget.com/virtualization-pro/
Blue Gears Blogs - http://www.itworld.com/ and http://www.networkworld.com/community/haletky
As well as the Virtualization Wiki at http://www.astroarch.com/wiki/index.php/Virtualization
I have two quad core CPU on the ESX server and my VM has two vcpu. How do the virtual cpus relate ro the physical and logical cores and how do they use them?
Each vCPU is (more or less) equivalent to one pCore. The vmkernel will try to coschedule all vCPUs for a given VM on the same physical socket in order to maximize cache utilization. Your VM will see that it has two CPUs and will see the actual physical processor, so, in your case, it will show that it has two quad-core CPUs; however, it will have access to only two core's worth of capacity.
I personally never had to create a VM that required more than one CPU
This is true for many people - you're just one of the few who has actually done what they should have done and truly allocated only one vCPU
Ken Cline
Technical Director, Virtualization
TVAR Solutions, A Wells Landers Group Company
VMware Communities User Moderator
Thanks Ken,
In this situation, the VM would be the only one on the ESX box (for starters anyway).
So this means that 6 out of 8 logical would be unused?
And if my VM performs poorly I would need to add more vCPU because the
original 2 vCPU would not be able to use more logical cores?
Is that right?
cheers
In this situation, the VM would be the only one on the ESX box (for starters anyway).
So this means that 6 out of 8 logical would be unused?
By VMs, yes. There is always some overhead capacity used by the vmkernel to manage the environment - but in general, you're right.
And if my VM performs poorly I would need to add more vCPU because the original 2 vCPU would not be able to use more logical cores?
Correct. A single vCPU can NEVER use more than a single pCore's worth of capacity.
Ken Cline
Technical Director, Virtualization
TVAR Solutions, A Wells Landers Group Company
VMware Communities User Moderator
I understand this threat is quite old and hope that people here still around.
Does this 1vCPU map to 1pCPU still apply in vSphere 4.1?
Let's take a look in this example, assuming the application can understand multi-thread or multi-core processing.
What if the physical host has 32 cores processor (eg. 2Ghz each core). Can the VM (with 8 vCPU assigned) improved performance by utilizing the rest of the 24 available cores or it will always tide 1vCPU with 1 core/pCPU at any time? Assuming there is only 1VM running in this physical host. Can the VM run more than 16 Ghz (8 vCPU x 2Ghz) in total at any one time?
Regards,
J.