I migrated VC 1.4.1 to VC 2.0.1 patch 2. 4 and ESX 2.5.4 ESX server attached to it.
Is it always possible to choose CPU affinity with VC2 and ESX 2.5.4 ?
When editing VM setting I not the option to do this.
Any ideas ?
VC under some circumstances prohibits the usage of CPU affinity settings.
One example is fully automated DRS.
I saw :(( The only wait to do this is to modify the vmx file manually.
This could break DRS and HA !
Actually we have only ESX 2.5.4 running with VC 2.0.1, so I think we cannot use DRS and HA ?
it could break vMotion too (if your hosts have different numbers of CPUs / cores)
Until now we reserved the CPU0 only for the COS. Each VM has a cpu affinity set to "1,2,3,4,5,6,7".
Is it a good practice to do this ? Or it is better to have no affinity ?
I wouldn't do this (and I don't think this is a good practice).
You simply waste processing power on CPU0 by doing this.
In your case I wouldn't set any affinity at all.
I don't really which one, but I think I read it in a VMware document. Anyway that is a lesser issue.
Thank you for your help
if you set the cpu affinity to "1,2,3,4,5,6,7" for example, you will definitely break HA.
I hade old VMs with cpu affinity set, and HA never worked correctly until we removed the affinity.
I will remember this information when ESX server will at 3.x.
Since you are not running any ESX 3 hosts I wouldn't worry about breaking HA. There are several other ways you can set affinity either temporarily or permanently (i.e. the setting survives a reboot).
To set affinity from the command line you can echo the settings into the proc files. You need to know the vmid of the guest you are changing to do this. I find it by doing:
The setting will revert to whats in the configuration file when the guest reboots. To make the setting persistent you would have to edit the .vmx file to change the affinity there.
You can also set the affinity through the guest property page in the MUI
You could probably set affinity through the MUI. I've had issues trying to increase shares or reserver CPU on my esx 2.5.3 hosts managed by VC 2.0.1. I've been able to make those changes in the MUI, but you need to be careful about using the MUI and VC to manage a host a the same time.
However, I would recommend not using affnity at all. If I'm concerned about a particular virtual machine's cpu performance, I'll reserver some cpu cycles or increase it's shares. If you are running a VI3 Cluster with DRS you don't even see the affinity options! Running on standalone hosts, you can do it.
In fact, do some tests with and without affinity settings, and tell me if it makes any difference. I think you'll find that it's increased work for you to manage affinity and it gives you little to no performance increase for the VM. I'd much rather use DRS/reservations/shares to manage cpu resources!
I agree with you. The only way I used CPU affinity is to make sure the COS never run out of CPU0. We have script running on the console for statistics output.
In ESX 3 we will not have this concern so we will not used CPU affinity at all.