Dynamic node priority policies

The default node priority policy is the order in the participating nodelist. However, can have a takeover node selected dynamically, according to the value of a specific system property at the time of failure.

Dynamic Node Priority entails the selection of a node that acquires the resource group based on values of system attributes calculated at run time. These values are obtained by querying the RMC subsystem. In particular, one of the following attributes can be chosen for Dynamic Node Priority:

  • cl_highest_free_mem - select the node with the highest percentage of free memory
  • cl_highest_idle_cpu - select the node with the most available processor time
  • cl_lowest_disk_busy - select the disk that is least busy

The PowerHA® SystemMirror® cluster manager queries the RMC subsystem every three minutes to obtain the current value of attributes on each node and distributes them cluster wide. The interval at which the queries of the RMC subsystem are performed, 3 minutes, is not user configurable. During a fallover event of a resource group with Dynamic Node Priority configured, the most recently collected values are used in the determination of the best node to acquire the resource group.

Table 1. Collected values
PowerHA SystemMirror RMC Resource Manager Attribute
cl_highest_free_mem IBM®.Host PgSpFree
cl_highest_idle_cpu IBM.Host PctTotalTimeIdle
cl_lowest_disk_busy IBM.PhysicalVolume PvPctBusy

The RMC resource monitor on a node may be queried to obtain the current values of these attributes:

lsrsrc -Ad IBM.Host
lsrsrc -Ad IBM.PhysicalVolume
Note: If you have defined a resource group over multiple sites (using the PowerHA SystemMirror Enterprise Edition software) and a dynamic node priority policy is configured for the group, you will receive this warning when verification runs:
"Warning:
Dynamic Node Priority is configured in a resource group 
with nodes in more than one site. The priority calculation may 
fail due to slow communication, in which case the default node 
priority will be used instead."
You can choose Dynamic node priority based on the user defined property by selecting one of the following attributes:
cl_highest_udscript_rc
cl_lowest_nonzero_udscript_rc

When you select one of the these criteria, you must also provide values for the DNP script path and DNP timeout attributes for a resource group. When the DNP script path attribute is specified, the given script is invoked on all nodes and return values are collected from all nodes. The failover node decision is made by using these values and the specified criteria. If you choose the cl_highest_udscript_rc attribute, collected values are sorted and the node which returned the highest value is selected as a candidate node to failover. Similarly, if you choose the cl_lowest_nonzero_udscript_rc attribute, collected values are sorted and the node which returned lowest nonzero positive value is selected as a candidate node to failover. If the return value of the script from all nodes are same or zero, the default node priority will be considered. PowerHA verifies the script existence and the execution permissions during verification.

When you select a timeout value, ensure that it is within the time period for running and completing a script. If you do not specify a timeout value, a default value that is equal to the config_too_long time is specified. If you provide a timeout value that is greater than the default allowed timeout value, PowerHA sets the value to the default timeout value and creates the following warning message:
warning: The parameter "SDNP_SCRIPT_TIMEOUT" value specified is greater than the Maximum allowed timeout value. will use " 360."
Note: In the preceding warning message, 360 seconds is the config_too_long attribute time that is currently set in the cluster.
Do the following to specify these values:
  1. From the command line, enter smit sysmirror.
  2. In SMIT, select Cluster Applications and Resources > Resource Groups > Change/Show Resources and Attributes for a Resource Group
  3. Select the resource group with the failover policy of Failover Using Dynamic Node Priority.
The following reminders apply when writing DNP scripts:
  • Script return values are considered for DNP calculation.
  • A return value of zero on a node indicates that the node is not a candidate node to failover.
  • A return value greater than zero on a node indicates that the node can be one of the candidate node.