Managing HP Serviceguard A.12.00.00 for Linux, June 2014

If some packages consume more resources than others, you can use the weight_name and
weight_value parameters to override the default value (1) for some or all packages. For example,
suppose you have three packages, pkg1, pkg2, and pkg3. pkg2 is about twice as
resource-intensive as pkg3 which in turn is about one-and-a-half times as resource-intensive as
pkg1. You could represent this in the package configuration files as follows:
For pkg1:
weight_name package_limit
weight_value 2
For pkg2:
weight_name package_limit
weight_value 6
For pkg3:
weight_name package_limit
weight_value 3
Now node1, which has a CAPACITY_VALUE of 10 for the reserved CAPACITY_NAME
package_limit, can run any two of the packages at one time, but not all three. If in addition
you wanted to ensure that the larger packages, pkg2 and pkg3, did not run on node1 at the
same time, you could raise the weight_value of one or both so that the combination exceeded
10 (or reduce node1's capacity to 8).
4.9.10.3.2 Points to Keep in Mind
The following points apply specifically to the Simple Method (page 119). Read them in conjunction
with the Rules and Guidelines (page 124), which apply to all weights and capacities.
If you use the reserved CAPACITY_NAME package_limit, then this is the only type of
capacity and weight you can define in this cluster.
If you use the reserved CAPACITY_NAME package_limit, the default weight for all packages
is 1. You can override this default in the package configuration file, via the weight_name
and weight_value parameters, as in the example above.
(The default weight remains 1 for any package to which you do not explicitly assign a different
weight in the package configuration file.)
If you use the reserved CAPACITY_NAME package_limit, weight_name, if used, must
also be package_limit.
You do not have to define a capacity for every node; if you don't, the node is assumed to
have unlimited capacity and will be able to run any number of eligible packages at the same
time.
If you want to define only a single capacity, but you want the default weight to be zero rather
than 1, do not use the reserved name package_limit. Use another name (for example,
resource_quantity) and follow the Comprehensive Method. This is also a good idea if
you think you may want to use more than one capacity in the future.
To learn more about configuring weights and capacities, see the documents listed under For More
Information (page 124).
4.9.10.4 Comprehensive Method
Use this method if the Simple Method (page 119) does not meet your needs. (Make sure you have
read that section before you proceed.) The comprehensive method works best if packages consume
differing amounts of computing resources, so that simple one-to-one comparisons between packages
are not useful.
120 Planning and Documenting an HA Cluster