Managing HP Serviceguard A.12.00.00 for Linux, June 2014
4.9.10.1 Package Weights and Node Capacities
You define a capacity, or capacities, for a node (in the cluster configuration file), and corresponding
weights for packages (in the package configuration file).
Node capacity is consumed by package weights. Serviceguard ensures that the capacity limit you
set for a node is never exceeded by the combined weight of packages running on it; if a node's
available capacity will be exceeded by a package that wants to run on that node, the package
will not run there. This means, for example, that a package cannot fail over to a node if that node
does not currently have available capacity for it, even if the node is otherwise eligible to run the
package — unless the package that wants to run has sufficient priority to force one of the packages
that are currently running to move; see “How Package Weights Interact with Package Priorities
and Dependencies” (page 125).
4.9.10.2 Configuring Weights and Capacities
You can configure multiple capacities for nodes, and multiple corresponding weights for packages,
up to four capacity/weight pairs per cluster. This allows you considerable flexibility in managing
package use of each node's resources — but it may be more flexibility than you need. For this
reason Serviceguard provides two methods for configuring capacities and weights: a simple method
and a comprehensive method. The subsections that follow explain each of these methods.
4.9.10.3 Simple Method
Use this method if you simply want to control the number of packages that can run on a given
node at any given time. This method works best if all the packages consume about the same amount
of computing resources.
If you need to make finer distinctions between packages in terms of their resource consumption,
use the Comprehensive Method (page 120) instead.
To implement the simple method, use the reserved keyword package_limit to define each
node's capacity. In this case, Serviceguard will allow you to define only this single type of capacity,
and corresponding package weight, in this cluster. Defining package weight is optional; for
package_limit it will default to 1 for all packages, unless you change it in the package
configuration file.
4.9.10.3.1 Example 1
For example, to configure a node to run a maximum of ten packages at any one time, make the
following entry under the node's NODE_NAME entry in the cluster configuration file:
NODE_NAME node1
. . .
CAPACITY_NAME package_limit
CAPACITY_VALUE 10
Now all packages will be considered equal in terms of their resource consumption, and this node
will never run more than ten packages at one time. (You can change this behavior if you need to
by modifying the weight for some or all packages, as the next example shows.) Next, define the
CAPACITY_NAME and CAPACITY_VALUE parameters for the remaining nodes, setting
CAPACITY_NAME to package_limit in each case. You may want to set CAPACITY_VALUE to
different values for different nodes. A ten-package capacity might represent the most powerful
node, for example, while the least powerful has a capacity of only two or three.
NOTE: Serviceguard does not require you to define a capacity for each node. If you define the
CAPACITY_NAME and CAPACITY_VALUE parameters for some nodes but not for others, the nodes
for which these parameters are not defined are assumed to have limitless capacity; in this case,
those nodes would be able to run any number of eligible packages at any given time.
4.9 Package Configuration Planning 119