Job templates are used for two primary purposes: (1) to provide a means of
generically matching and categorizing jobs, and (2) to provide a means of
setting arbitrary default attributes for certain jobs. Job templates can be used in
many aspects of scheduling but they are most commonly applied in the areas of Dynamic Jobs and Peer Based Grid usage policies. Job templates are defined using the JOBCFG configuration parameter.
11.10.2 Job Template Extension Attributes
When creating a job template, any attribute acceptable within the WIKI command language can be used. In addition, job templates can use any of the following extension attributes:
Number of application tasks to allocate at each allocation adjustment.
ALLOCSYNCTIME
[[[DD]:HH]:MM]:SS
Time indicating maximum duration Moab will wait before forcing allocation decisions via provisioning or other steps.
NOTE: By default, when de-allocating resources, Moab does not re-assign resources from one service to another until the service/job initially assigned the resources reports successful de-allocation via the workload query response.
Moab forces the de-allocation of resources assigned to webdb if the application does not release them within 4 minutes of a de-allocation request. For the sirius application, Moab forces de-allocation if not released by the application within 20 seconds of a de-allocation request.
CLASS
<CLASS>[,<CLASS>]...
Class credentials associated with job. Used in job template matching.
Minimum and maximum backlog for application within job. In the case of dynamic jobs, Moab allocates/deallocates resources as needed to keep the job within the target range.
Minimum and maximum load for application within job. In the case of dynamic jobs, Moab allocates/deallocates resources as needed to keep the job within the target range.
Minimum and maximum response time for application within job. In the case of dynamic jobs, Moab allocates/deallocates resources as needed to keep the job within the target range.
Minimum and maximum throughput for application within job. In the case of dynamic jobs, Moab allocates/deallocates resources as needed to keep the job within the target range.
<ALLOCATIONTIME>[,<DEALLOCATIONTIME>] where values are specified using the format [[[DD:]HH:]MM:]SS
Amount of time an application performance target must be exceeded before Moab adjusts the resource allocation of a dynamic job. By default, Moab allocates/deallocates resources as soon as a performance target violation is detected.
Additional resources are allocated to the pdb service for any performance slow-down lasting more than 10 seconds. Excess resources are deallocated if they are not required for at least 15 minutes. The TARGETVIOLATIONTIME parameter allows management of workload spikes to be adjusted based on workload priority, allocation overhead, and other system characteristics.
The JOBMATCHCFG parameter allows relationships to be established between a number of job templates. With this parameter, five types of templates can be specified as described in the following table:
Attribute
Description
JMAX
A potential job is rejected if it has matching attributes set or has resource requests that exceed those specified in this template.
JMIN
A potential job is rejected if it does not have matching attributes set or has resource requests that do not meet or exceed those specified in this template.
JDEF
A matching job has the specified attributes set as defaults but all values can be overridden by the user if the matching attribute is explicitly set at job submission time.
JSET
A matching job has the specified attributes forced to these values and these values override any values specified by the submittor at job submission time.
JSTAT
A matching job has its usage statistics reported into this template.
11.10.4 Resource Manager Templates
Job templates can also be applied to resource managers modifying attributes of jobs submitted to, migrated to, or routed through specified resource manager interfaces. In particular the RMCFG attributes MAX.JOB, MIN.JOB, SET.JOB, and DEFAULT.JOB can be used. However, the meanings of resource manager job templates are slightly different than their JOBMATCHCFG counterparts as described in the following table.
Attribute
Description
MAX.JOB
A potential job is not allowed to access the resource manager if it has matching attributes set or has resource requests that exceed those specified in this template.
MIN.JOB
A potential job is not allowed to access the resource manager if it does not have matching attributes set or has resource requests that do not meet or exceed those specified in this template.
DEFAULT.JOB
A job associated with this resource manager has the specified attributes set as defaults but all values can be overridden by the user if the matching attribute is explicitly set at job submission time.
SET.JOB
A job associated with this resource manager has the specified attributes forced to these values and these values override any values specified by the submittor at job submission time.
11.10.5 Job Template Examples
Job templates can be used for a wide range of purposes including enabling automated learning, setting up custom application environments, imposing special account constraints, and applying group default settings. The following examples highlight some of these uses:
11.10.5.1 Example 1: Setting Up Application-Specific Environments
11.10.5.2 Example 2: Applying Job Preferences and Defaults
11.10.5.3 Example 3: Applying Resource Constraints to Fuzzy Collections
In the following example, a job template match is set up. Using
the JOBMATCHCFG parameter, Moab is configured to apply all attributes of
the inter.set job template to all jobs that match the constraints of
the inter.min job template. In this example, all interactive jobs
are assigned the ignpolicies flag that allows them to ignore active,
idle, system, and partition level policies. Interactive jobs are also locked into the test standing reservation and thus only allowed to run on the associated nodes.
11.10.5.4 Example 4: Resource Manager Templates
In the following exmple, interactive jobs are not allowed to enter through this resource manager and any job that does route in from this resource manager interface has the preemptee flag set.
11.10.5.5 Example 5: Size Based Prioritization
In the following example, jobs requesting over 3,000 processors have their priority increased by 10,000. Jobs requesting between 1,024 and 2,999 processors have their priority increased by 2,000.
11.10.6 Viewing/Managing Job Templates
Job templates can be viewed using the command mdiag -j as in the following example: