Simple Method

Use this method if you simply want to control the number of packages that can run on a given node at any given time. This method works best if all the packages consume about the same amount of computing resources.

If you need to make finer distinctions between packages in terms of their resource consumption, use the Comprehensive Method (page 146) instead.

To implement the simple method, use the reserved keyword package_limit to define each node's capacity. In this case, Serviceguard will allow you to define only this single type of capacity, and corresponding package weight, in this cluster. Defining package weight is optional; for package_limit it will default to 1 for all packages, unless you change it in the package configuration file.

Example 1

For example, to configure a node to run a maximum of ten packages at any one time, make the following entry under the node's NODE_NAME entry in the cluster configuration file:

NODE_NAME node1

. . .

CAPACITY_NAME package_limit

CAPACITY_VALUE 10

Now all packages will be considered equal in terms of their resource consumption, and this node will never run more than ten packages at one time. (You can change this behavior if you need to by modifying the weight for some or all packages, as the next example shows.) Next, define the CAPACITY_NAME and CAPACITY_VALUE parameters for the remaining nodes, setting CAPACITY_NAME to package_limit in each case. You may want to set CAPACITY_VALUE to different values for different nodes. A ten-package capacity might represent the most powerful node, for example, while the least powerful has a capacity of only two or three.

NOTE: Serviceguard does not require you to define a capacity for each node. If you define the CAPACITY_NAME and CAPACITY_VALUE parameters for some nodes but not for others, the nodes for which these parameters are not defined are assumed to have limitless capacity; in this case, those nodes would be able to run any number of eligible packages at any given time.

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

Package Configuration Planning 145

Page 145
Image 145
HP Serviceguard Simple Method, Nodename node1 Capacityname packagelimit, Weightname packagelimit weightvalue, For pkg2