Creating a resource group by resource requirement

Follow these steps to create a resource group by specifying resource requirements.

Before you begin

  • You must be a cluster administrator or have the Resource Groups Manage permission.
  • You must have already added most of your hosts to the cluster.

About this task

Create new resource groups from the cluster management console to ensure your consumers have the appropriate group of compute hosts available to them. Often resource groups are the easiest way of creating a homogeneous group of hosts for a consumer (for example, all Linux® machines).

Remember: When you create a resource group based on resource requirement (dynamic resource group using resource requirements), you do not select specific member hosts. If new hosts that meet those requirements are later added to the cluster, they are automatically (dynamically) added to the resource group.
The resource requirement can include resource attributes (both built-in and external) that change dynamically. When you create a resource group, hosts in the cluster are evaluated based on the value of dynamic resource attributes and added to the resource group if they meet the resource requirement; new hosts that join the cluster later are evaluated based on the value of dynamic resource attributes and added to a resource group accordingly. If any host’s dynamic resource attributes change later, the host is not re-evaluated and regrouped based on the new value, except in the following cases:
  • If periodic updating of resource group membership status is enabled (EGO_ENABLE_RG_UPDATE_MEMBERSHIP=Y and EGO_RG_UPDATE_MEMBERSHIP_INTERVAL=time_in_seconds in the ego.conf file) (see the ego.conf reference).

    When resource group membership status is periodically updated, it is recommended that you do not include dynamic resource attributes whose values change frequently (such as the built-in load indices) in the resource requirement. Such dynamic resources may cause frequent regrouping, leading to frequent reclaims at the same time.

  • If resource group membership update is manually triggered with the egosh resource updaterg command (see the resource).

To create a resource group for multidimensional scheduling, see Creating multidimensional resource groups.

Procedure

  1. From the cluster management console, select Resources > Resource Planning (Slot) > Resource Groups.
  2. Click Global Actions > Create a Resource Group.
  3. Specify a resource group name. The name must adhere to the following naming rules:
    • The name must be unique.
    • The resource group name must not use the same name as the resource plan name.
    • The name can only contain the following characters: 0-9, a-z, A-Z, -, or _.
    • The name can be a maximum of 64 characters long.
  4. (Optional) Include a description (up to 200 characters) for the resource group.
  5. Specify how many slots per host you would like to have the system count.

    Select the following expression to allocate, as a starting point, one slot per CPU for each service instance: Number of slots per host is equal to Number of CPUs * 1.

    For expression guidelines, refer to CPU slots.

    The maximum number of slots per host is 9999.

  6. For the Resource Selection Method, leave the default value Dynamic (Requirements).

    Dynamic means that the member hosts of this resource group vary according to the hosts that meet that requirement. Some commonly used requirements to create a dynamic resource group include operating system, the number of CPUs, and maximum memory.

    When you create a dynamic resource group, new hosts that meet the resource requirement you specify when they join the cluster are automatically added to the resource group. For example, you can specify a dynamic resource group with the requirement of select(maxmem>400) and any existing hosts in the cluster that meet this requirement when you create the resource group become members; any new hosts added to the cluster that meet this requirement also become members.

  7. Under Filter display of member hosts > Hosts to Show in List, select Hosts filtered by resource requirement.
  8. Specify the resource requirement that members of this group must meet; for example, enter select(LINUX86).
    Notes:
    1. The expression you enter is evaluated against each host in the cluster. If a host is found to satisfy the stated resource requirement (if it returns true/non-zero), then the host is added to the host group.
    2. Use the syntax from the select string to specify your resource requirements. You do not need to use XML equivalents in the cluster management console.
      Table 1. Selection strings for specifying resource requirements
      Resource Requirement Description Example
      maxmem The maximum RAM available select(maxmem>400)
      maxswp The maximum swap space select(maxswp>600)
      maxtmp The maximum temporary space select(maxtmp>100)
      ncpus The number of CPUs select(ncpus==1)
      type The type of host select(LINUX86)
      ndisks Number of disks select(ndisks>1)
    3. Ensure that you enter a resource requirement expression that relates to the host and that can be used during evaluation (for example, maximum memory requirement or maximum swap space).
    4. If you specify a Windows host name, it must be the full name, not the short name.
    Tip: Use the command egoconfig addresourceattr to add a custom tag to any hosts and then specify that tag when creating a resource group. See the reference for more information.

    By default, if you specify no resource requirement, all hosts in your cluster are added to this resource group when you create it.

  9. Click Refresh Host List and expand the Member hosts section if necessary.

    A preview list of hosts that currently fulfill the requirements you specified in the resource requirement string section displays. This member list is dynamic and reflects the hosts that are currently on your cluster that meet this criteria. If hosts are added or deleted that meet the requirement you specified, they are automatically added or removed from this list.

  10. Review your member hosts.

    If you do not like the list of hosts found, refine your resource requirement selection string and try again.

  11. Click Check for overlaps.

    Hosts must not overlap resource groups. Resource groups are used to plan resource distribution in your resource plan. Having overlaps causes the hosts to be double-counted (or more) in the resource plan, resulting in recurring under-allocation of some consumers.

    If any hosts overlap, remove them from this resource group or remove them from the overlapping resource group. The exception is with hosts listed in InternalResourceGroup. Although all hosts in the cluster are listed here, they are not “double-counted” in the resource plan.

  12. Click Create.

What to do next

You now need to update your resource plan based on this new resource group. The number of slots available for your new resource group in the resource plan is automatically detected from what you specified in your resource group.