Using Serviceguard Node Capacities and Package Weights, April 2009

11
Use case 3: Using multiple Capacities or Weights
If you do not wish to assign an overall capacity to nodes, you can assign multiple capacities. The
following shows an example using memory and processor capacities.
Say that you have a cluster with the following specification:
Two node cluster which consists of node1 with 650M of memory and 2 processors and node2 with
600M of memory and 1 processor. We assume that node1 and node2 use identical processors.
Therefore, node1 has twice as much capacity for processor as node2.
Three packages: pkg1, pkg2, and pkg3 with priorities 10, 20, 30 respectively.
Pkg1 requires 400M of memory and 0.6 of processor capacity.
Pkg2 requires 200M of memory and 0.6 of processor capacity.
Pkg3 requires 100M of memory and 0.2 of processor capacity.
Node1 is the primary node for all packages
All packages are configured to run on both nodes.
You can assign capacities and weights as follows:
You need to choose a unit of memory capacity to represent a certain amount of actual memory. For
example, for each Mbyte of memory, you can assign one unit of memory capacity. This means
node1’s memory capacity will be 650 and the memory weight for pkg1, pkg2, and pkg3 will be
400, 200, and 100 respectively.
You can enter the values for the processor capacity and weight as described above or choose, for
example, 10 to represent 1 processor. We will the set processor capacity of node1 to 20 and
node2 to 10. This means that the processor weight of pkg1, pkg2, and pkg3 will be 6, 6, and 2
respectively.
Based on the above configuration, pkg1, pkg2, and pkg3 combined require 700 of memory capacity
and 14 of processor capacity. To run all three packages at the same time, a node must meet the
requirement for both memory and processor capacities. This means that node1 cannot run these
packages at the same time; while the node has sufficient processor capacity for the three packages, it
does not have enough memory capacity. Since node1 is the primary node for all three packages, the
highest priority packages, pkg1 and pkg2 will run on node1 and pkg3 will run on node2. If node1
fails, pkg1 and pkg3 will run on node2. Even though pkg2 is higher priority than pkg3, there is not
sufficient processor capacity on node2 to run both pkg1 and pkg2 at the same time (although there is
enough memory capacity for both).