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

    Define at least one key for 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:

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 any host or cluster node

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

The metering value is up-to-date when the difference between GlobalCounter and AvailableGC is less than or equal to 24.

The forecasting value is up-to-date when the difference between GlobalCounter and AvailableGC is less than or equal to 72.

See Cluster attributes.

See Service group attributes.

See ???.