hi,
when the workload is high (the average cpus load >80%) then is better to run any VM on a certain cpu -affinity.right?
by pinning the VM to certain cpu ->affinity.
I wouldn't use an affinity "just because" a VM uses a lot of CPU.
If you did use an affinity for that VM, vSphere won't hold those CPU cores for exclusive use - it may still schedule other VMs on those cores unless you set affinity on all your other VMs to tell the scheduler not to use those cores for others.
So, if all you did was give that 1 VM an affinity, you may find it performs worse than before as you are restricting the CPU scheduler in the hypervisor.
Never mind the technical challenges highlights in those articles I linked to, it's just an administrative pain.
Is that average CPU of a VM or Hosts? If you reserve 100% of a core(s) to a single VM then youre going to waste a % of those cores which could impact your other VMs
I would use reservations over affinity.
Here's why:
Beating a dead horse - using CPU affinity - frankdenneman.nl
i talk about host utilization.if cpus average load is hight that is better to use cpu reservation.right?
or if i do not need drs then i use cpu affinity.right?
I wouldn't use an affinity "just because" a VM uses a lot of CPU.
If you did use an affinity for that VM, vSphere won't hold those CPU cores for exclusive use - it may still schedule other VMs on those cores unless you set affinity on all your other VMs to tell the scheduler not to use those cores for others.
So, if all you did was give that 1 VM an affinity, you may find it performs worse than before as you are restricting the CPU scheduler in the hypervisor.
Never mind the technical challenges highlights in those articles I linked to, it's just an administrative pain.
