Hi all,
Excuse my lack of details regarding version information - if this question cannot be answered without details I am missing, please let me know.
We are in the situation where we have one server with dual quad-core processors (8 virtual processors). If we were to have ONE vmware machine running on that box, would it actually use the full processing power of the box, or would it be limited to 4 cores (i.e. 1 CPU)?
I have been told that while during the install of the machine we will have to specify a maximum of 4 cores to be allocated, it doesn't make sense that the other 4 cores (if not used) will simply be sat there doing nothing - surely I'm mistaken?
Regards,
Stu
Currently you're limited to 4 virtual CPUs per VM.
You would be able to create a VM with 1, 2 or 4 virtual CPUs. At most a vCPU will run at the full speed of a single CPU core, so with 4 vCPUs a VM could use 4 physical CPU cores. By default ESX will take care of CPU scheduling, so your 4 CPU VM would run on any 4 available CPU cores. It wouldn't be tied to a specifc 4 CPU cores or to a specific CPU. At this point ESX does not aggregate CPU resources into a "super" CPU, so if you only have a single VM on this host with 4 vCPUs, then half of the cores would be used.
I have been told that while during the install of the machine we will have to specify a maximum of 4 cores to be allocated, it doesn't make sense that the other 4 cores (if not used) will simply be sat there doing nothing - surely I'm mistaken?
This isn't quite correct. With ESX starter edition, you'll limited to using 4 physical CPUs, but you would only have 2 physical CPUs (each with 4 cores). Perhaps the reference was to virtual CPUs in the VM. As mentioned, by default ESX will run the vCPUs for a VM on which ever CPU cores happen to be free so the VM won't be tied to a specifc CPU or CPU cores. You can override that and specify which CPU cores the VM should run on, but you should have a good reason to do that. Also, it is ideal to start with 1 single CPU VM and increase to 2 or 4 if needed. Many VMs with multiple vCPUs can lead to CPU scheduling problems because ESX has to find 2 or 4 CPU cores that are free at the exact same time. Not a problem if you only have a few VMs with dual vCPUs, but as that count increases it becomes harder to find 2 or 4 CPU cores that are free at the same time.
Ok, here is a real basic description of how it works. Each VM can have anywhere from 1 to 4 virtual CPUs. Each virtual CPU, when the VMware scheduler decides that it is that vCPUs turn, will run on one physical CPU. In this context a physical core is a CPU. At any given time only 1 vCPU is running on 1 pCPU, remember x86 is not parallel processing. The VMware scheduler is what decided when each vCPU runs, and on what pCPU it runs on, and for how long based on all the various parameters such as utilization (demand for CPU cycles from the VM), and all the various resource controls such as min/max settings, shares, processor affinity, etc.
So to be even more basic, a VM with 1 virtual CPU could use up to 100% of one physical CPU (in this case 1 core, not all 4 cores in the physical socket). If you assign the VM 4 virtual CPUs then it could use up to 100% (assuming there was no contention for resources) of 4 physical CPU cores.
Don Pomeroy
VMware Communities User Moderator
Ok, here is a real basic description of how it works. Each VM can have anywhere from 1 to 4 virtual CPUs. Each virtual CPU, when the VMware scheduler decides that it is that vCPUs turn, will run on one physical CPU. In this context a physical core is a CPU. At any given time only 1 vCPU is running on 1 pCPU, remember x86 is not parallel processing. The VMware scheduler is what decided when each vCPU runs, and on what pCPU it runs on, and for how long based on all the various parameters such as utilization (demand for CPU cycles from the VM), and all the various resource controls such as min/max settings, shares, processor affinity, etc.
So to be even more basic, a VM with 1 virtual CPU could use up to 100% of one physical CPU (in this case 1 core, not all 4 cores in the physical socket). If you assign the VM 4 virtual CPUs then it could use up to 100% (assuming there was no contention for resources) of 4 physical CPU cores.
Don Pomeroy
VMware Communities User Moderator
"If you assign the VM 4 virtual CPUs then it could use up to 100% (assuming there was no contention for resources) of 4 physical CPU cores." - by the sounds of that my worry was correct - I'll actually have 8 vCPUs (4 per pCPU), but one VM will only ever use a maximum of 4vCPUs. I take it there is no way to assign 8 vCPUs to one VM?
There isn't - thats why you shoudl be running more than 1 VM per host ![]()
--matt
Currently you're limited to 4 virtual CPUs per VM.
No that's not right, 4 cores is only HALF the machine. you would need 2 VM with 4 vCPU each to fully utilize that box.
If you have an application that actually needs 8 CPUs (cores) to function properly then it is probably not a good candidate for virtualization at this time. Would you mind telling us what the application is, I am curious.
Thanks
Don Pomeroy
VMware Communities User Moderator
Just to clarify, the ESX Host can utilize both quad core procs and distribute load as needed. Any individual Guest can only use a maximum of 4 cores at any given time. I am unsure why you would virtualize any server requiring more than four cores to run. Can you specify your scenario so we can make sure we are speaking in the smae terms?
I am beginning to believe that people just configure stuff just because it's there, if for no other reason than to see if it will work. I really believe people like to push the limits, just because. No other reason than just to see what stuff does.
I think its more clicking buttons and using numbers rather than curiousity.. you know the one that killed that cat ![]()
Many thanks everyone!
To be honest this isn't a real-world scenario - more of an investigation into this solution and it's bad points.
The whole discussion started with the scenario "If we removed all VM's from this box, but left one remaining, would it run incredibly quickly?". The answer is "yes", but it would in effect only be utilising half the processing power of the box.
Many thanks for everyone's time and assistance!
