Enabling AdaptiveHA for a service group

AdaptiveHA enables VCS to make dynamic decisions about failing over an application to the biggest available system.

To enable AdaptiveHA for a service group

  1. Ensure cluster attribute Statistics is set to Enabled. You can check by using the following command,
    # haclus -display|grep statistics
     

    You cannot edit this value at run time.

  2. Set the Load of the service group in terms of CPU, Memory, or Swap in absolute units. The unit can be of any following values:
    • CPU, MHz, or GHz for CPU

    • GB or MB for Memory

    • GB or MB for Swap

    If you set FailOverPolicy to BiggestAvailable for a service group, you must specify the load values in terms such as, 1 CPU, 1GB RAM, and 1GB SWAP, in the Load service group attribute. You only need to specify those resources that are used by the service group. For example, if the service group does not use the Swap resource, only specify the CPU and Memory resources in the Load attribute.

  3. Check the default value of the MeterWeight attribute at the cluster level. If the attribute does not meet the service group's meter weight requirement, then set the MeterWeight at the service group level.
  4. Set or edit the values for the following service group attributes in main.cf:
    • Modify the values of Load and MeterWeight as decided in the preceding steps.

    • Set the value of FailOverPolicy to BiggestAvailable.

      You can set or edit the service group level attributes Load, MeterWeight, and FailOverPolicy during run time.

After you complete the above steps, AdaptiveHA is enabled. The service group follows the BiggestAvailable policy during a failover.

The following table provides information on various attributes and the values they can take to enable AdaptiveHA:

Table: Attributes and values for enabling AdaptiveHA

Use-case

Attribute values to be set

To turn on host metering

Set the cluster attribute Statistics to MeterHostOnly.

To turn off host metering

Set the cluster attribute Statistics to Disabled.

To turn on host metering and forecasting

Set the cluster attribute Statistics to Enabled.

To enable hagrp -forecast CLI option

Set the cluster attribute Statistics to Enabled and also set the service group attribute Load based on your application's CPU, Mem or Swap usage.

To check the meters supported for a given host

Verify the value of cluster attribute HostAvailableMeters.

To enable host metering, forecast, and policy decisions using forecast

Perform the following actions:

  • Set the cluster attribute Statistics to Enabled

  • Set the service group attribute FailOverPolicy to BiggestAvailable.

  • Set service group attribute Load based on your application's CPU, Mem or Swap usage.

  • Optionally, set the service group attribute MeterWeight.

To change metering or forecast frequency

Set the MeterInterval and ForecastCycle keys in the cluster attribute MeterControl accordingly.

To check the available capacity and its forecast

Use the following commands to check values for available capacity and its forecast:

  • # hasys -value <system_name> AvailableCapacity

  • # hasys -value <system_name> HostAvailableForecast

To check if the metering and forecast is up-to-date

Use the following command:

# hasys -value <system_name> MeterRecord

See Cluster attributes.

See Service group attributes.