TedH256
Expert
Expert

Best Practice statement from VMware regarding VM CPU Affinity settings?

Jump to solution

I am creating documentation/policies documentation for my company, and am required to find official VMware statements regarding any best practices that I assert.

After studying up on CPU Affinity, it is clear that there are very narrow use-cases when using this feature may be appropriate, and so I would like to say that as a best practice it should be avoided unless there are very specific requirements.

However - while I can find plenty of discussions from bloggers (Dennman and Epping among others) I don't see any official statement about CPU affinity in any VMware document - neither a KB or either the CPU Scheduling and Performance or Performance Best Practices white/tech papers.

Anyone know of a specific reference that speaks to whether or not to use this setting, or that gives clearly delineated use-cases?

0 Kudos
1 Solution

Accepted Solutions
TedH256
Expert
Expert

I guess I found one - it's old, and it does not come out directly to say "the best practice is not to use this" but it comes pretty close:

http://www.vmware.com/pdf/vi3_35/esx_3/r35u2/vi3_35_25_u2_resource_mgmt.pdf


Pg 133:

“Potential Issues with Affinity Virtual machine affinity assigns each virtual machine

to processors in the specified affinity set. Before using affinity, consider the following

issues:

  • For multiprocessor systems, ESX Server systems perform automatic load balancing. Avoid manual specification of virtual machine affinity to improve the scheduler’s ability to balance load across processors.
  • Affinity can interfere with the ESX Server host’s ability to meet the reservation and shares specified for a virtual machine.
  • Because CPU admission control does not consider affinity, a virtual machine with manual affinity settings might not always receive its full reservation.
  • Virtual machines that do not have manual affinity settings are not adversely affected by virtual machines with manual affinity settings.
  • When you move a virtual machine from one host to another, affinity might no longer apply because the new host might have a different number of processors.
  • The NUMA scheduler might not be able to manage a virtual machine that’s already assigned to certain processors using affinity. See Chapter 10, “Using NUMA Systems with ESX Server,” on page 157 for additional information on using NUMA with ESX Server hosts.
  • Affinity can affect an ESX Server hostʹs ability to schedule virtual machines on multicore or hyperthreaded processors to take full advantage of resources shared on such processors.”

View solution in original post

0 Kudos
1 Reply
TedH256
Expert
Expert

I guess I found one - it's old, and it does not come out directly to say "the best practice is not to use this" but it comes pretty close:

http://www.vmware.com/pdf/vi3_35/esx_3/r35u2/vi3_35_25_u2_resource_mgmt.pdf


Pg 133:

“Potential Issues with Affinity Virtual machine affinity assigns each virtual machine

to processors in the specified affinity set. Before using affinity, consider the following

issues:

  • For multiprocessor systems, ESX Server systems perform automatic load balancing. Avoid manual specification of virtual machine affinity to improve the scheduler’s ability to balance load across processors.
  • Affinity can interfere with the ESX Server host’s ability to meet the reservation and shares specified for a virtual machine.
  • Because CPU admission control does not consider affinity, a virtual machine with manual affinity settings might not always receive its full reservation.
  • Virtual machines that do not have manual affinity settings are not adversely affected by virtual machines with manual affinity settings.
  • When you move a virtual machine from one host to another, affinity might no longer apply because the new host might have a different number of processors.
  • The NUMA scheduler might not be able to manage a virtual machine that’s already assigned to certain processors using affinity. See Chapter 10, “Using NUMA Systems with ESX Server,” on page 157 for additional information on using NUMA with ESX Server hosts.
  • Affinity can affect an ESX Server hostʹs ability to schedule virtual machines on multicore or hyperthreaded processors to take full advantage of resources shared on such processors.”
0 Kudos