Minimum Affinity Score
With the introduction of Power11, two new attributes have been added related to partition scoring, a minimum desired affinity score and an action to the taken at boot or for Live Partition Mobility (LPM) when the current affinity score is less than the minimum specified score. The actions supported are to ignore the low score, warn at boot/LPM or fail boot/LPM.
Affinity Score
PowerVM uses a 0–100 affinity score to rate how well a partition's processors and memory are aligned with respect to NUMA (Non-Uniform Memory Access). A score of 100 means the resources (CPU and memory) are optimally assigned. If resources are spread across more chips, Dual Chip Modules (DCMs), or CEC drawers than required, the score is reduced based on how far they deviate from the ideal placement. Lower scores indicate less efficient resource locality, which can affect performance.
Minimum Affinity Score
The HMC has added two partition attributes that define the minimum score and the action to take when the current affinity score is less than the minimum affinity score. The minimum affinity score can be any value from 0-100. A minimum of 0 indicates that there is no required minimum for the partition (this is the default value). The actions to take if the current affinity score is less than the minimum score are:
1. None- is the default setting and indicates no action is to be taken if the current affinity score is less than the specified minimum affinity score.
2. Warn- indicates that on partition activation, Live Partition Mobility (LPM) or Remote Restart to another server, the HMC will report that the operation was completed successfully but the current affinity score was below the minimum affinity score.
3. Fail- If "Fail" is set as the action when a partition's current affinity score is below the minimum Affinity score then
-
-
- Activation, LPM, or Remote Restart will fail, and an error message is shown on HMC.
- If activation is initiated by the hypervisor (e.g., timed power on), failure generates a system reference code.
Configuration using HMC GUI
Configuration using HMC CLI
1. Display partition’s Minimum affinity score
lssyscfg -r lpar -m system -F name,lpar_id,min_affinity_score
2. Display partition’s Minimum Affinity score action
lssyscfg -r lpar -m system -F name,lpar_id,min_affinity_score_action
3. Change/Modify the Minimum Affinity score
chsyscfg -m system -r lpar -i "lpar_id=xx,min_affinity_score=<0-100>"
4. Change/modify the minimum affinity score action
chsyscfg -m system -r lpar –i "lpar_id=xx,min_affinity_score_action=<None/warn/fail>"
Partition Activation
If the Minimum Affinity score action is set to Fail and if the minimum Affinity score cannot be achieved, the partition will not activate and
- Activation from the HMC will display an error message
- Activation via Hypervisor will fail with a system reference code
If the Minimum Affinity score action is set to Warn and if the minimum Affinity score cannot be achieved, the partition will still be activated and:
- Activation from the HMC will display a warning message
- Activation via Hypervisor will not report any error
Recovery Steps if Affinity Score does not meet the minimum for partition activation
- Alter the amount of processor or memory assigned to the partition
- Run HMC optmem to improve the affinity score of the partition(s)
Live partition mobility Behavior with Minimum Affinity score
During active migration, if the current affinity score on the target does not meet the defined minimum, and the action is set to Fail:
The migration will fail and HMC will display an error message from HMC GUI
During active migration, if the current affinity score on the target does not meet the defined minimum, and the action is set to Warn a warning is issued, migration should be successful and HMC will display the following warning message from CLI:
migrlpar -o m -m <source-server> -t <target-server> -p partition1 -v
Warnings: HSCLCB03 Partition partition1 has been activated, however the current affinity score of the partition is xx, which does not meet the minimum affinity score of 100 that is configured for the partition.
Inactive partition mobility
Migrations that are performed when the partition is powered off (inactive partition mobility) do not check the affinity score. When the partition is activated on the target server, the activation may warn/fail if the minimum affinity score cannot be achieved.
Remote Restart Behavior with Minimum Affinity Score
If the Minimum Affinity score action set to Fail and target system does not meet the minimum affinity score during a Remote Restart (RR), the partition will undergo a successful remote restart (migrate to the target server). However, the partition activation will fail, and the HMC will display an error when the partition is activated on the target system.
Recovery Steps if Affinity Score does not meet the minimum for migration/Remote Restart
- Change the configuration of other partition on target system prior to migration to free up resources.
- Change the action to None or Warn, perform the migration and then use the HMC command optmem command to re-align the resources for all the partitions on the target system.
- May be required to change partitions on the target to free up resources and run optmem after the migration in some situations
Summary
Minimum affinity scoring and defined actions (None, Warn, Fail) help enforce placement standards during operations like activation, LPM, and Remote Restart. If the minimum score isn't met and action is set to Fail, the operation is blocked unless resolved via optmem or partition reconfiguration.
Contacting the PowerVM Team
Have questions for the PowerVM team or want to learn more? Follow our discussion group on LinkedIn IBM PowerVM or IBM Community Discussions