Using Serviceguard Node Capacities and Package Weights, April 2009

6
package_limit capacity
Serviceguard supports a capacity with the reserved name package_limit. This can be used to limit
the number of packages that can run on a node. If you use package_limit, you cannot define any
other capacities for this cluster, and the default weight for all packages is always 1. Note that the
capacity package_limit is case sensitive and must be entered in lower case. For more information,
see the Managing Serviceguard manual.
The following use cases illustrate how the capacity/weight parameters can be used.
Use case 1: Limiting number of packages on a node
Say that you have a cluster with the following specification:
A two node cluster which consists of a large system (node1) and a smaller system (node2).
You have 5 packages. pkg1, pkg2, pkg3, pkg4 and pkg5 with priorties10, 20, 30, 40, and 50
respectively.
All packages are configured to run on both nodes.
All packages consume roughly the same amount of resources and therefore "weigh" the same.
You would like all packages to be able to run on the large system at the same time. However, if the
large node fails, you would like only two packages to run on the smaller system.
You can use the reserved capacity package_limit to set a limit on the number of packages that
can run on node2 at the same time. In this example, you set the capacity package_limit to 2 for
node2 and you do not set any limit on node1.
The following table shows the relevant portion of the cluster configuration file for the above
specification.
Table 3: Configuration for Use Case 1 example
Cluster
configuration file:
Node capacity
definition
CLUSTER_NAME cluster_11
...
#
# No capacity limit for node1. This node
can
# run all packages configured to run on the
node.
#
NODE_NAME node1
...
#
# node2 can run only two packages
#
NODE_NAME node2
...
CAPACITY_NAME package_limit
CAPACITY_VALUE 2
When you use the reserved capacity package_limit, Serviceguard sets the default weight to 1 for
all packages. So, you do not need to set a weight for any package in the package configuration file.
If node1 fails, the package priority and dependencies determine which packages will run on node2.
Serviceguard will give preference to running the higher priority packages. In this example, pkg1 and
pkg2 are the highest priority packages. Since node2 has capacity for two packages, if pkg1 and
pkg2 have no dependencies, they will be placed on node2 regardless of which packages were
running on this node previously. If pkg1 has a dependency on pkg5, pkg1 needs pkg5 in order to