Deploy a virtual machine with a minimum affinity score
The affinity score measures how well the assigned resources of a virtual machine are aligned. An affinity score of 100 indicates optimal locality and performance. The affinity scores decrease as the processor and memory resources are distributed across multiple chips, modules, or drawers. The distribution of resources might degrade the performance of the virtual machine.
Overview
In PowerVM®, the affinity score ensures that the deployed virtual machines achieve optimal processor and memory placement within the host system. The partition affinity score is a unit-less value in the range 0-100. An affinity score of 100 indicates best possible performance of the virtual machine and a score of 0 indicates that the assigned resources of a virtual machine are maximally spread. By setting a minimum affinity score, administrators can prevent suboptimal virtual machine placements that might impact the workload performance.
None– No action is taken. The virtual machine is deployed, migrated, or restarted regardless of the affinity score.Warn– An alert is issued by PowerVM that the affinity score is less than the required minimum affinity score specified during the deployment request. However, the operation is performed regardless of the affinity score. The same alert is displayed in the UI of PowerVC.Fail– The virtual machine is not deployed, migrated, or restarted if the minimum affinity score is not met. However, during deployment, PowerVC retries to deploy the virtual machine on two other viable hosts if available. If none of the hosts meets the required affinity score, the deployment fails.
Effect of minimum affinity score in PowerVC
- Deployment or activation of virtual machines
- If the affinity score of the virtual machines that must be deployed or activated is less than
the minimum required affinity score, the following actions are performed based on the specified
action parameter:
Fail- The deployment fails if the minimum affinity score is not met.Warn- The virtual machine is deployed regardless of the affinity score. However, if the affinity score is less than the required minimum affinity score, PowerVC displays a warning in the PowerVC GUI. Also, a warning message is added in the event log file.None- The virtual machine is deployed regardless of affinity score.
- Live Partition Mobility (LPM)
-
When a running virtual machine is migrated to another host with LPM, the current configuration of the virtual machine takes effect, which includes the affinity score and the specified action.
Fail- The migration is blocked if the affinity score of the target host is less than the required minimum affinity score. The operation fails and a failure message is shown.Warn- The migration completes, but a warning is logged and displayed in the PowerVC interface.None- The migration completes regardless of affinity score.
- Remote restart
- When PowerVC uses remote restart to
recover a virtual machine, the following actions are performed based on the affinity score of the
virtual machine and the action specified:
Fail- The virtual machine is not activated on the target host if the minimum affinity is not met. The virtual machine is evacuated to the target host but is not booted.Warn- The virtual machine is restarted and activated, but a warning is logged and displayed in the PowerVC interface.None- The remote restart completes regardless of affinity score.
- The minimum affinity score is enforced to active workloads (running virtual machines). For inactive virtual machine migrations, the check is performed on first activation at the target host.
- During host evacuation that is triggered by maintenance mode or automated recovery (ARR),
virtual machines are migrated according to their configured affinity score actions. The virtual
machines with action field as
Failare processed first, followed by the virtual machines with action fieldWarn. Finally, the virtual machines with action fieldNoneare processed. However, during manual remote restart, the administrator must select and move the virtual machines based on their affinity score actions.
Configure minimum affinity score and action
The minimum affinity score and the action can be configured for Power11 or later systems with PowerVC 2.3.2 or later.
- Configure during deployment
- Perform the following steps to configure the minimum affinity score and action during the deployment of the virtual machine:
- In PowerVC GUI, select .
- In the Miscellaneous tab, set the required minimum affinity score and the required action under the Affinity Score and Action fields.
For more technical details and usage examples, see Power 11 Minimum Affinity Scoring.