Creating multidimensional resource groups

Follow these steps to create multidimensional resource groups to associate with your resource plan.

Before you begin

You must have Resource Group Manage permission to create resource groups.

Procedure

You can create multidimensional resource groups from the cluster management console or from the egosh command line.

  • To create a multidimensional resource group from the cluster management console, follow these steps:
    1. From the Dashboard, select Resources > Resource Planning (Multidimensional) > Resource Groups.
    2. Select Global Actions > Create a Resource Group.
    3. Specify a name for the multidimensional resource group. Resource group names 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 resource group name must begin with a letter.
      • 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 for the resource group.
    5. For the Resource Selection Method, make your choice:
      • Choose Static (List of Names) to select specific hosts to belong to this resource group.
      • Choose Dynamic (Requirements) to select hosts that vary according to which of them meets requirements you specify. This is the default option.

        If you choose this option, hosts are dynamically added to the resource group while the requirement itself is static. 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, any new hosts added to the cluster that meet the resource requirement for the resource group are automatically added to the resource group. For example, you can specify a dynamic resource group with the (static) 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 afterward that meet this requirement also become members.

    6. Under Filter display of member hosts , select how you would like to filter your host list:
      • All hosts gives you a list of all hosts that belong to your cluster. You cannot specify any resource requirements.
      • Hosts filtered by resource requirement lets you filter your hosts and display a list of candidates for your resource group based on a set of resource requirements; for example, enter select(maxmem>400) to select hosts with a maximum RAM of 400 MB.
      Notes:
      1. 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. 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)
        docker Docker-enabled hosts select(docker_enabled)
      2. 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).
      3. 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.
    7. If you have specified a resource requirement or modified one, click Refresh Host List to get an accurate list of hosts.
    8. Expand the Member hosts section if necessary.
      • If you selected to filter hosts by All hosts, the list of hosts provided is all the hosts in your cluster.
      • If you selected Hosts filtered by resource requirement, a list of hosts that currently fulfill the requirements you specified in the resource requirement string section display.
    9. Review your member hosts and select the hosts you want using the check boxes.

      If your host list is long, it may go on for several pages. You can select hosts and click Create at any time and then add more hosts from other pages. Make sure you save before navigating to another page.

      Once you have selected a member host, filter the list again with a different resource requirement. The hosts highlighted and check marked are your member hosts.

      By default, if you select no member hosts, all hosts in your cluster are added to this resource group when you create it. Further, if you do not select a host, the resource group type switches from Static to Dynamic.

    10. Click Check for overlaps.

      Hosts must not overlap between resource groups. 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.

    11. Click Create.
  • To create a multidimensional resource group from the command line, use the egosh resourcegroup -MDS add group_name command. For more information, see resourcegroup.

Results

Once the resource group is created, the ResourceGroups.xml configuration file at $EGO_CONFDIR will include your new multidimensional resource group. For example:
<ResourceGroup ResourceGroupName="MDSResGroup">
    <ResourcePlugins>
        <Plugin Name="dynamic"/>
    </ResourcePlugins>
    <SchedulerPluginName>md</SchedulerPluginName>
</ResourceGroup>

What to do next

For multidimensional scheduling, you can specify multiple resource groups in one resource plan. If you want to create additional resource groups, repeat this task. Then, create a new resource plan with the multidimensional resource groups you created; see Creating a multidimensional resource plan.