you wanted to ensure that the larger packages, pkg2 and pkg3, did not run on node1 at the same time, you could raise the weight_value of one or both so that the combination exceeded 10 (or reduce node1's capacity to 8).

Points to Keep in Mind

The following points apply specifically to the Simple Method (page 145). Read them in conjunction with the Rules and Guidelines (page 150), which apply to all weights and capacities.

If you use the reserved CAPACITY_NAME package_limit, then this is the only type of capacity and weight you can define in this cluster.

If you use the reserved CAPACITY_NAME package_limit, the default weight for all packages is 1. You can override this default in the package configuration file, via the weight_name and weight_value parameters, as in the example above.

(The default weight remains 1 for any package to which you do not explicitly assign a different weight in the package configuration file.)

If you use the reserved CAPACITY_NAME package_limit, weight_name, if used, must also be package_limit.

You do not have to define a capacity for every node; if you don't, the node is assumed to have unlimited capacity and will be able to run any number of eligible packages at the same time.

If you want to define only a single capacity, but you want the default weight to be zero rather than 1, do not use the reserved name package_limit. Use another name (for example resource_quantity) and follow the Comprehensive Method. This is also a good idea if you think you may want to use more than one capacity in the future.

To learn more about configuring weights and capacities, see the documents listed under For More Information (page 150).

Comprehensive Method

Use this method if the Simple Method (page 145) does not meet your needs. (Make sure you have read that section before you proceed.) The comprehensive method works best if packages consume differing amounts of computing resources, so that simple one-to-one comparisons between packages are not useful.

IMPORTANT: You cannot combine the two methods. If you use the reserved capacity package_limit for any node, Serviceguard will not allow you to define any other type of capacity and weight in this cluster; so you are restricted to the Simple Method in that case.

Defining Capacities

Begin by deciding what capacities you want to define; you can define up to four different capacities for the cluster.

You may want to choose names that have common-sense meanings, such as “processor”, “memory”, or “IO”, to identify the capacities, but you do not have to do so. In fact it could be misleading to identify single resources, such as “processor”, if packages really contend for sets of interacting resources that are hard to characterize with a single name. In any case, the real-world meanings of the names you assign to node capacities and package weights are outside the scope of Serviceguard. Serviceguard simply ensures that for each capacity configured for a node, the combined weight of packages currently running on that node does not exceed that capacity.

For example, if you define a CAPACITY_NAME and weight_name processor, and a CAPACITY_NAME and weight_name memory, and a node has a processor capacity of 10 and a memory capacity of 1000, Serviceguard ensures that the combined processor weight of packages running on the node at any one time does not exceed 10, and that the combined memory weight does not exceed 1000. But Serviceguard has no knowledge of the real-world

146 Planning and Documenting an HA Cluster

Page 146
Image 146
HP Serviceguard manual Comprehensive Method, Points to Keep in Mind, Defining Capacities