Using Serviceguard Node Capacities and Package Weights, April 2009

2
Introduction
Currently, when selecting a node on which to place a package, Serviceguard does not take into
account the resource capacity of the node or the amount of node resources that the package requires.
All packages are assumed to use the same amount of the node's resources and all nodes are assumed
to have infinite capacity for running packages. For example, say that you have a two node cluster,
consisting of a large system and a smaller system. 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 the critical
packages to run on the smaller system. Currently, there is no mechanism for configuring Serviceguard
to achieve this behavior.
Serviceguards new node capacity and package weight feature will address this problem. Nodes can
be configured to support a certain capacity. Packages can be configured to have a certain weight.
Serviceguard will take into account the weight of the package and the capacity of the node when
selecting a node to place the package.
Scope
This document describes how you can configure and use the node capacity and package weight
feature. It provides an overview of the feature and several use cases. For a complete description of
rules and restrictions, please refer to the manpage for the cmquerycl(1m) and cmmakepkg(1m)
commands. For further discussion see the Managing Serviceguard manual.
Overview
Serviceguards new node capacity and package weight feature allows you to configure the nodes to
support a certain capacity and packages to have a certain weight. The package weight is the amount
of node capacity that the package uses. The package weight, the capacity of the nodes configured to
run the package, and the priorities and package dependencies determine where the packages should
be placed.
A package can have multiple weights and a node can have multiple capacities. This allows you to
identify and limit different types of resource on a given node, and to quantify the usage of each of
these types of resource by a given package. Each weight/capacity pair has a name; you can define
up to four names (that is, four types of capacity and corresponding weight) per cluster.
If any capacity is defined for a node, Serviceguard will never permit the combined weight of the
packages running on the node to exceed the capacity. If a package fails over, it can move only to a
node that has capacity for it. If a package has same_node dependencies on other packages, the
node must have capacity for both the package and its dependencies. A lower-priority package can
be halted to make room for a higher-priority package.
Figure 1 below shows a node and three packages with pkg1 and pkg2 running on the node. Node1
has a foo1 capacity of 70 and a foo2 capacity of 30. The boxes on the right of the drawing show
the weight for each capacity for pkg1, pkg2, and pkg3. The combined weight of pkg1 and pkg2 is
40 for the foo1 capacity and 25 for the foo2 capacity. Therefore, node1 has 30 of foo1 capacity
and 5 of foo2 capacity available to run other packages. This means that pkg3 cannot run on node1;
while the node has sufficient foo1 capacity remaining to run pkg3 (which has foo1 weight of 20), it
does not have enough foo2 capacity (the package needs 10 and the node has only 5 to spare).