You can enable the automatic distribution of resource group load across nodes by setting load limits. You can configure a set of load limits for each cluster node. You assign load factors to resource groups, and the load factors correspond to the defined load limits of the nodes. The default behavior is to distribute resource group load evenly across all the available nodes in the resource group's node list.
The resource groups are started on a node from the resource group's node list by the RGM so that the node's load limits are not exceeded. As resource groups are assigned to nodes by the RGM, the resource groups' load factors on each node are summed up to provide a total load. The total load is then compared against that node's load limits.
A load limit consists of the following items:
A user-assigned name.
A soft limit value – You can temporarily exceed a soft load limit.
A hard limit value – Hard load limits can never be exceeded and are strictly enforced.
You can set both the hard limit and the soft limit in a single command. If one of the limits is not explicitly set, the default value is used. Hard and soft load limits for each node are created and modified with the clnode create-loadlimit, clnode set-loadlimit, and clnode delete-loadlimit commands. See the clnode(1CL) man page for more information.
You can configure a resource group to have a higher priority so that it is less likely to be displaced from a specific node. You can also set a Preemption_mode property to determine if a resource group will be preempted from a node by a higher-priority resource group because of node overload. A Concentrate_load property also allows you to concentrate the resource group load onto as few nodes as possible. The default value of the concentrate_load property is FALSE by default.
In the following example command, the zone-cluster name is zc1 The sample property is called mem_load and has a soft limit of 11 and a hard load limit of 20. Hard and soft limits are optional arguments and default to unlimited if you do not specifically define them. See the clnode(1CL) man page for more information.
# clnode create-loadlimit -p limitname=mem_load -Z zc1 \ -p softlimit=11 -p hardlimit=20 node1 node2 node3
In the following example command, the load factors are set on the two resource groups, rg1 and rg2. The load factor settings correspond to the defined load limits of the nodes.
# clresourcegroup set -p load_factors=mem_load@50,factor2@1 rg1 rg2
You can also perform this step during the creation of the resource group with the clresourceroup create command. See the clresourcegroup(1CL) man page for more information.
# clresourcegroup remaster rg1 rg2
This command can move resource groups off their current master to other nodes to achieve uniform load distribution.
# clresourcegroup set -p priority=600 rg1
The default priority is 500. Resource groups with higher priority values get precedence in node assignment over resource groups with lower priorities.
# clresourcegroup set -p Preemption_mode=No_cost rg1
See the clresourcegroup(1CL) man page for more information on the HAS_COST, NO_COST, and NEVER options.
# cluster set -p Concentrate_load=TRUE
A strong positive or negative affinity takes precedence over load distribution. A strong affinity can never be violated, nor can a hard load limit. If you set both strong affinities and hard load limits, some resource groups might be forced to remain offline if both constraints cannot be satisfied.
The following example specifies a strong positive affinity between resource group rg1 in zone cluster zc1 and resource group rg2 in zone cluster zc2.
# clresourcegroup set -p RG_affinities=++zc2:rg2 zc1:rg1
# clnode status -Z all -v
The output includes any load limit settings that are defined on the node.