SSM balanced slot allocation

IBM® Spectrum Symphony uses resources more efficiently if workloads among hosts are balanced and a cluster has no idle slots or hosts. To balance workloads, use the SSM balance allocation between hosts (ssmBalanceAllocationBetweenHosts) attribute.

The ssmBalanceAllocationBetweenHosts attribute configures the session manager (SSM) policy to dispatch tasks among hosts in a balanced manner. This attribute depends on the preStartApplication attribute and the minimum services scheduling policy. Through the preStartApplication attribute, the SSM requests slots and starts service instances (SIs) when the SSM is enabled. All SIs must be ready before you submit a session for this attribute. Furthermore, when the minimum services scheduling policy allocates the slots to the sessions, it first selects the host that has the most idle slots in its list before tasks are dispatched to it.

For example, assume that you have two hosts, Host1 and Host2. Both Host1 and Host2 have two slots. When you submit a session with two running tasks and ssmBalanceAllocationBetweenHosts is enabled, IBM Spectrum Symphony balances the tasks between Host1 and Host2. However, if the ssmBalanceAllocationBetweenHosts attribute is not enabled, both tasks might be dispatched to Host1 but Host2 remains idle.

Total slots in each host

When the SSM dispatches tasks, IBM Spectrum Symphony computes the percentage of idle slots in a host. Based on the idle slot percentage, the SSM dispatches tasks to the host with the largest idle slot percentage first. If two hosts have the same the idle slot percentage, the SSM selects one host randomly. The SSM uses the following equation to determine the idle slot percentage:
slot idle percentage = idle slots / total slots

Resource group filter

Each session can optionally use the resourceGroupFilter attribute to specify a resource group filter. A resource group filter acts as a hard requirement on the types of resources that a session can use. They make certain types of resources ineligible for the session. The SSM is always bound by the number and the type of resources it has. If sessions specify a resource group filter, the tasks cannot be balanced between the ineligible hosts for the session.

For example, assume that you have two hosts, Host1 and Host2. Both Host1 and Host2 have two slots. In addition, you configure two resource groups, RG1, and RG2. Host1 is assigned to RG1 and Host2 is assigned to RG2. You submit a session with five running tasks, and the resource group filter of the session is RG1. Because the resource group is RG1, all five tasks are dispatched to Host1. However, Host2 remains idle.