Resources when Executing Objects: Agent Workload Balancing

resources,workload balancing,agent workload balancing,agent resources>

By default, Jobs and File Transfers are processed without Agent limitations. However, different tasks contain different statements, some of them being CPU consuming or having long runtimes. The Automation Engine has a resource concept that considers the Agent workload during processing.

Agents have a specified resource pool. With this concept, it is possible to define how many resources should be consumed during the execution of a Job or a File Transfer. As a developer and object designer, you assign resources to objects on their Attributes Page in the Consume <x> resources field.

The resource concept does not specifically refer to CPU time or memory. The values that are specified as resources are abstract values which intend to provide a high level of flexibility for your configuration.

How Agent Workload Balancing Works

resources,workload balancing,agent workload balancing,agent resources>

A task starts when the Agent has sufficient resources to execute it. If it runs into insufficient resources, the status of the task changes to Waiting for resource. The task is executed when resources are available again. If there are several tasks waiting, the Automation Engine Priority when Executing Objects decides which one should be processed first.

Example

An Agent has 100 resources available for Job executions. Three Jobs should be started.

  • Job A requires ten resources and can be executed.
  • Job B requires 50 resources and can also be started. 60 of the 100 resources are now used and 40 are still available.
  • Job C requires 50 resources but cannot be executed because there are not enough resources. Its status changes to Waiting for resource.

Tasks that are waiting can be started at any time using either the Ignore Agent Resource command in the Tasks window or the MODIFY_UC_OBJECT script function. The current resources of the Agent are then ignored. Task resources are consumed and the Agent maximum resource value is exceeded in the short term.

Notes:

  • Consumed resources are released when the task has ended.
  • The resources of an Agent are valid for all Clients, because the same Agent can be used in several Clients.
  • Resource consumption can also be allocated for Jobs that are started by a Remote Task Manager object.
  • For File Transfers, source and destination agents must have sufficient resources. Otherwise the File Transfer cannot be executed.

To Use the Automation Engine Resource Concept

By default, agents do not verify the resource settings of Jobs and File Transfers. If you intend to use the Automation Engine resource concept, you must first specify how many resources the Agents should provide:

  1. Log in to Client 0.
  2. Open the UC_HOSTCHAR_DEFAULT - Host Characteristics variable or any other Agent characteristics of your Agents if you use different variables.
  3. Enter the resources the Agent should provide in the WORKLOAD_MAX_FT and WORKLOAD_MAX_JOB keys.

    Entering -1 means that the resource setting of Jobs and File Transfers is ignored. It applies for the resource consumption of Jobs and File Transfers. This value can be changed as follows:

    1. Open the UC_SYSTEM_SETTINGS variable ( UC_SYSTEM_SETTINGS - Systemwide Settings).
    2. Modify the values for the WORKLOAD_DEFAULT_FT and WORKLOAD_DEFAULT_JOB keys if a different default value should be specified.

Note: The resource consumption of Jobs and File Transfers that should not use the default value can be specified in the object Attributes Page. If you enter 0, the default value of the UC_SYSTEM_SETTINGS variable is used.

Special Case: Maximum Number of Tasks that Can Run Simultaneously

resources,workload balancing,agent workload balancing,agent resources>

The Automation Engine resource concept can also be used to limit the number of tasks that may run simultaneously on an Agent.

As an administrator user, you can ensure that all Jobs and File Transfers consume resources of value 1 by specifying it in the UC_SYSTEM_SETTINGS variable. The default value of the variable is used only if Job and File Transfer objects have the value "0" specified as resource consumption. For more information, see UC_SYSTEM_SETTINGS - Systemwide Settings.

Now enter the maximum number of parallel tasks as the resource value in the variables for host (Agent) characteristics.

Each job and file transfer consumes one resource during its execution. Thus, the Agent resource value acts as the maximum number of tasks running in parallel.

Script Elements Associated to Agent Workload Balancing

resources,workload balancing,agent workload balancing,agent resources>
  • :PUT_ATT
    Changes the value of an attribute during generation

  • :SET_UC_SETTING
    Changes system settings during system operation

  • GET_ATT
    This function returns the values of a task's attributes during generation

  • GET_UC_SETTING
    Reads current system settings

  • MODIFY_UC_OBJECT
    Modifies the attribute of an activated object

See also:

Controlled Computer Restart - Best Practices