Avatar of Mystical_Ice
Mystical_Ice
 asked on

vmware - how dedicate a CPU core to a virtual machine

Hi
I know this is NOT best-practice, but we are working with Microsoft to troubleshoot a performance issue at a client, and one of the troubleshooting steps is to dedicate a CPU core/socket/vcpu to a particular VM.  The host the VM is running on is not oversubscribed, and while I know it's possible to set "CPU Affinity" to lock a VM to a particular core (or multiple logical cores), I don't believe setting CPU affinity on one VM prevents other VMs from using the same core.  We want to isolate a VM to a particular core and not allow other VMs to use it.

Again, I realize this is not best practice, and would not be a long-term solution, but for troubleshooting it is something we need to attempt.

Is there a way to do this?
VMwareVirtualization

Avatar of undefined
Last Comment
Andrew Hancock (VMware vExpert PRO / EE Fellow/British Beekeeper)

8/22/2022 - Mon
DLeaver

Do you need the load on the remaining cores that are not assigned to affinity?...

If not then use affinity as mentioned and then apply a DRS anti-affinity rule to force the VM's of that host for the duration of the testing.  This would rely on the remaining hosts having the capacity to run with effectively one less host - albeit short term.
ASKER CERTIFIED SOLUTION
Andrew Hancock (VMware vExpert PRO / EE Fellow/British Beekeeper)

THIS SOLUTION ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
See Pricing Options
Start Free Trial
GET A PERSONALIZED SOLUTION
Ask your own question & get feedback from real experts
Find out why thousands trust the EE community with their toughest problems.
Mystical_Ice

ASKER
does a reservation guarantee a particular socket, or just MHZ?
Andrew Hancock (VMware vExpert PRO / EE Fellow/British Beekeeper)

A reservation guarantees a resource, e.g. it's completely ring fenced, so resources cannot be taken away.

e.g. CPU Cycles.
Experts Exchange has (a) saved my job multiple times, (b) saved me hours, days, and even weeks of work, and often (c) makes me look like a superhero! This place is MAGIC!
Walt Forbes