HCL Workload Automation, Version 9.4

< Previous

Performing load balancing based on available free memory

In this scenario, an optimization policy is defined to balance the distribution of a set of jobs between resources based on total physical memory available on each resource.

Business Goal

A company wants to set up job definitions for a group of jobs that must run at about the same time on similar AIX® computers. To ensure that the jobs are efficiently distributed between available resources, each job definition includes an optimization objective to maximize the free physical memory. When the jobs are submitted, a policy is applied to distribute the jobs between the available resources according to the amount of free physical memory on each resource. All matching resources are considered and the load is balanced proportionally between them, using a policy that allocates more jobs to those resources having higher amounts of free physical memory.

This policy is applicable when a set of jobs are clearly affected by a specific type of resource (CPU usage, available memory, available disk space) and are to be run with a high degree of parallelism.

  • The administrator has a set of jobs that must be run on AIX machines and that have specific physical memory requirements. This requires that the job is sent to a machine with low physical memory utilization. Several computers are available, each with an equivalent software configuration but with differences in hardware characteristics and actual load. He creates a job definition for each of the jobs and specifies that the job must run on AIX, has an objective of type Balance load between resources by optimization objective and should be optimized with the policy Maximize FreePhysicalMemory.
  • The administrator uses theDynamic Workload Console to submit or schedule the jobs for submission.

Roles

This section lists the user roles needed to run the scenario:
dynamic workload broker Developer
Defines the jobs using the Job Brokering Definition Console
dynamic workload broker Operator
Monitors and controls the jobs that have been submitted.
HCL Workload Automation Job Scheduler
Manages Tivoli® Workload Scheduler workload by submitting and monitoring jobs.

Software requirements

The following software must be installed and configured, before running this scenario:
  • A HCL Workload Automation version 8.5.1 network with the dynamic scheduling capability.
  • Optionally, Dynamic Workload Console version 8.5.1.

Setting up the environment

To run this scenario you must install or upgrade to HCL Workload Automation version 8.5.1. Complete the tasks described in Setting up your environment for dynamic scheduling.

Running the Scenario

To create a job definition that uses optimization policies, perform the following steps:

Procedure

  1. In the Job Brokering Definition Console select File > New > Job brokering definition and create a new job definition named jobBalancedbyAvailRAM. The job definition opens at the Overview page with the job name assigned.
  2. Open the Application page and define the required information for the application that the job is to run. In the Type field select Executable. In this definition, the variable myApp is used to identify the executable myExecutable as shown in the sample JSDL file.
  3. Open the Resources page and select the Software Requirements tab.
  4. Create an operating system requirement, as follows:
    1. In the Candidate Operating Systems pane, click Add. The Operating System Details dialog box is displayed.
    2. In the Type field, select AIX and click OK.
  5. Open the Optimization page and specify an optimization objective, as follows:
    1. In the Type menu, select Balance load between resources by optimization objective.
    2. In the Resource Type menu, select Operating System.
    3. In the Resource Property menu, select Free Physical Memory.
    4. In the Optimization Objective menu, select Maximize.
  6. Select File > Save to save the job definition file.
  7. Select the new JSDL and upload it to the server by clicking on the corresponding icon.
  8. Submit the job proceeding in one of the following ways, depending on whether you want to submit it as a broker job or by using a Tivoli Workload Scheduler job definition.
    • Log in to the Dynamic Workload Console and choose the Tivoli Dynamic Workload Broker portfolio option.
      • Select Definitions > Jobs . Optionally specify search criteria and click Search. Select the job definition that you created in the previous steps.
      • To run the job, select Submit and click Go.
    • Log in to the Dynamic Workload Console and choose the Tivoli Workload Scheduler portfolio option.
      • Select Workload > Design > Create Workload Definitions. In the Workload Designer, create a new broker job definition filling in the required fields as appropriate. In the Workload Broker Job Name field, type the name of the JSDL file you created in the previous steps.
      • Submit the HCL Workload Automation job by selecting Workload > Submit > Submit Predefined Jobs.
      You can also add the job to an existing job stream , or submit the job using the jobsubmit command. For further information about the dynamic workload broker command-line interface, see HCL Workload Automation: Scheduling Workload Dynamically.

Expected Results

When the jobs are submitted, they are sent to the available computers in proportion to the amount of available free physical memory. If, for example, the snapshot of the currently available free physical memory is the following:
Table 1. Available Free Physical memory on eligible target AIX computers
Computer A Computer B Computer C
2048 Mbytes 3072 Mbytes 512 Mbytes
and 11 jobs are submitted within a time slot, the following proportional distribution can occur:
Table 2. Job distribution on targets
Computer A Computer B Computer C
4 jobs 6 jobs 1 job

Sample Configuration file

The JSDL file created for this scenario has the following syntax:
<?xml version="1.0" encoding="UTF-8"?>
<jsdl:jobDefinition xmlns:jsdl="http://www.ibm.com/xmlns/prod/scheduling/1.0/jsdl" 
  xmlns:jsdle="http://www.ibm.com/xmlns/prod/scheduling/1.0/jsdle" 
   name="jobBalancedbyAvailRAM">
  <jsdl:variables>
    <jsdl:stringVariable name="myApp">sleep</jsdl:stringVariable>
  </jsdl:variables>
  <jsdl:application name="executable">
    <jsdle:executable interactive="false" path="${myApp}">
      <jsdle:arguments>
        <jsdle:value>30</jsdle:value>
      </jsdle:arguments>
    </jsdle:executable>
  </jsdl:application>
  <jsdl:resources>
    <jsdl:candidateOperatingSystems>
      <jsdl:operatingSystem type="AIX"/>
    </jsdl:candidateOperatingSystems>
  </jsdl:resources>
  <jsdl:optimization name="JPT_JSDLOptimizationPolicyType">
    <jsdl:objective propertyObjective="maximize" 
      resourcePropertyName="FreePhysicalMemory" resourceType="OperatingSystem"/>
  </jsdl:optimization>
</jsdl:jobDefinition>
< Previous