Managing HP Serviceguard for Linux Ninth Edition, April 2009

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 137).
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.
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 131) 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.
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
Package Configuration Planning 129