Each resource group in a set of resource groups might impose the same load on the cluster. In this situation, by distributing the resource groups evenly among cluster nodes, you can balance the load on the cluster.
To distribute a set of resource groups evenly among cluster nodes, declare on each resource group a weak negative affinity for the other resource groups in the set.
# scrgadm -c|-a -g source-rg -y RG_affinities=neg-affinity-list
Specifies the resource group that is the source of the weak negative affinity. This resource group is the resource group on which you are declaring a weak negative affinity for other resource groups.
Specifies a comma-separated list of weak negative affinities between the source resource group and the resource groups that are the target of the weak negative affinity. The target resource groups are the resource groups for which you are declaring a weak negative affinity.
By declaring a weak negative affinity on one resource group for other resource groups, you ensure that a resource group is always brought online on the most lightly loaded node in the cluster. The fewest other resource groups are running on that node. Therefore, the smallest number of weak negative affinities are violated.
This example shows the commands for modifying resource groups rg1, rg2, rg3, and rg4 to ensure that these resource groups are evenly distributed among the available nodes in the cluster. This example assumes that resource groups rg1, rg2, rg3, and rg4 exist.
# scrgadm -c -g rg1 RG_affinities=-rg2,-rg3,-rg4 # scrgadm -c -g rg2 RG_affinities=-rg1,-rg3,-rg4 # scrgadm -c -g rg3 RG_affinities=-rg1,-rg2,-rg4 # scrgadm -c -g rg4 RG_affinities=-rg1,-rg2,-rg3