CPU slots
When creating a resource group whose resources will be used for slot-based scheduling, you must decide how many slots are to be assigned to each host.
Assigning slots to hosts is a critical function that serves to match host resources with the expected workload. If a host is too heavily loaded, performance suffers. If it is underutilized, resources are wasted. Generally, as a starting point, one slot per CPU is allocated for each service instance.
- A 1-to-1 mapping exists between small workload units and slots.
- The value for the number of CPUs per host is automatically detected during installation.
- If you want to change the value of the number of slots per CPU, specify it on the workload management side (outside of EGO).
- You can set the slots per host either at the resource group level or at the individual host level. Be aware though that if the individual host value differs from the resource group level, the host-level setting overrides the group-level setting.
- If hosts are overburdened, decrease the number of slots that are assigned to them.
- If hosts are underutilized, add more slots to them.
Expression guidelines
Define the number of slots per host as an expression on the cluster management console. Here are the expression guidelines:
- All valid resource requirement expressions are supported, for example, (a*b), (a/b), (a+b), where a and b are resource names, or integer or decimal values.
- The resource can be one of the following types of static resources:
- host type defined in the HostType section of the ego.shared file. The type is evaluated to 1 if it matches the host, otherwise 0.
- number of processors (nprocs)
- number of cores (ncores)
- maximum memory (maxmem)
Slot configuration at host level
When assigning slots to hosts, you can optionally specify a number of slots for each host in a resource group that is tailored to the individual host’s attributes.
Take advantage of this flexibility when you want to configure a different number of slots for each host in a group with heterogeneous hosts. Heterogeneous hosts are defined as hosts having a non-uniform number of processors, cores, and other attributes within a resource group or cluster. For such hosts, you can define the number of slots based on resource attributes (for example, the number of processors per host or the amount of maximum memory per host), which may differ among hosts.
Without this option, you must list all the hosts one by one in the resource group in order to set the number of slots per host in a heterogeneous cluster, which could reduce the cluster’s expandability and increase the burden of managing the cluster.
- number of CPUs (By default, the number of CPUs = number of cores (per processor) * the number of processors. However, depending on the configuration of the EGO_DEFINE_NCPUS parameter in ego.conf, the number of CPUs can equate to other CPU resources, such as the number of processors or threads.)
- number of processors
- number of cores
- maximum memory.
You can also configure the host attribute as a factor in a simple expression to derive a new value for host slots. For example, the number of host slots is equal to the number of cores multiplied by two.
For enhanced flexibility, use advanced expressions to define the number of slots per host; for example, define the number of slots based on the type of host operating system.
If the individual host value of slots per host differs from the resource group value, the host-level setting overrides the group-level setting. For example, if there are 10 hosts in a resource group and you choose to set five slots per host, you would normally expect to see 50 slots listed within the Member Host Summary (Found Set) section of a resource group's properties on the cluster management console. However, if you see a different number showing in the summary (for example, 45), then it means that an administrator has manually overridden the settings for one or more hosts.
Note though that in some cases, even if an administrator has not manually changed the number of slots per host, you may still see an unexpected number in the Member Hosts Summary. This may indicate that certain hosts within this particular resource group are double-allocated, meaning they are allocated to more than one resource group. In cases of double-allocation, the sum of the allocated slots displays in the Member Hosts Summary, not the number of slots for this resource group alone. It is advised not to double-allocate slots.