Using Serviceguard Node Capacities and Package Weights, April 2009

9
Solution 2
This solution takes advantage of the fact that the default package weight for the reserved capacity
package_limit is 1. We can assign a weight of 0.5 to pkg5, which consumes the least resources,
a weight of 1 to pkg2, pkg3, and pkg4, and a weight of 2 to pkg1. This means node2 needs a
capacity of 2 in order to run pkg1, and node1 will have a capacity of 4. Since we are using the
default package weight for pkg2-pkg4, we do not need to assign weights to pkg2-pkg4 in the
package configuration file. We only need to override the weight for pkg1 and pkg5.
The following table shows portions of the configuration files for the cluster, pkg1, and pkg5.
Table 5: Configuration for solution 2
Cluster
configuration file:
Node capacity
definition
CLUSTER_NAME cluster_22
...
#
# node1 has capacity value of 4 for package_limit
#
NODE_NAME node1
...
CAPACITY_NAME package_limit
CAPACITY_VALUE 4
#
# "node2" has capacity value of 2 for package_limit
#
NODE_NAME node2
...
CAPACITY_NAME package_limit
CAPACITY_VALUE 2
Package
configuration file
for pkg1:
Weight definition
package_name pkg1
...
weight_name package_limit
weight_value 2
Package
configuration file
for pkg5:
Weight definition
package_name pkg5
...
weight_name package_limit
weight_value 0.5