Managing HP Serviceguard for Linux, Tenth Edition, September 2012

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 141) 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 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.
Package Configuration Planning 139