Using Serviceguard Node Capacities and Package Weights, April 2009
7
run. So, pkg1 and pkg5 will run on node2. If pkg1 depends on pkg4 and pkg5, pkg1 cannot run on
node2 because this node can not run three packages. If this is the case, node2 will run pkg2 and
pkg3 which are the next highest priority packages.
Use case 2: Limiting package load/weight on a node
In this example, different packages require different amounts of the system's resources. You need to
estimate the overall resource requirement for packages relative to one another and also resource
capacity for cluster nodes relative to one another.
Say that you have a cluster with the following specification:
• Two node cluster which consists of a large system (node1) and a smaller system (node2). You
estimate that node1 has twice the amount of resources for running packages than node2.
• You have 5 packages: pkg1, pkg2, pkg3, pkg4 and pkg5 with priorities 10, 20, 30, 40, 50
respectively.
• All packages are configured to run on both nodes.
• You estimate that:
– pkg2, pkg3, pkg4 require the same amount of resources in order to run and therefore “weigh”
the same.
– pkg1 requires twice the amount of resources pkg2 requires.
– pkg5 requires half the amount of resources pkg2 requires.
• If all packages are running, you would like node1 to carry twice as much package load as node2.
If node1 fails, you would like pkg1 to run on node2.
There are many ways to assign capacities and weights to achieve the desired behavior. Three
solutions are presented below:
Solution 1
We can assign a weight of 10 to pkg5, which consumes the least resources, a weight of 20 to pkg2,
pkg3, and pkg4, and a weight of 40 to pkg1. This means node2 needs a capacity of 40 in order to
run pkg1 and node1 will have a capacity of 80. We can use the reserved capacity
package_limit for this configuration. Since for capacity package_limit, the default weight for
packages is 1, we need to override the weight for all packages.