RC_TEMPLATE_BY_RESREQ_ORDER

Syntax

RC_TEMPLATE_BY_RESREQ_ORDER=resource1:resource2:...

Description

Applicable as of Fix Pack 15. LSF decides on which LSF resource connector template (provider_templates.json file) to use based on criteria defined in the templates. LSF chooses the first template that satisfies the job:
  • The first criteria LSF uses is the priority value in the templates. LSF uses the template with the highest priority. For example, a priority value of 30 is chosen before a priority value of 20.
  • If LSF cannot choose a template based on priority (priority values are the same in the templates, or a value is not defined and defaults to a priority of 0), then:
    • Starting in Fix Pack 15, if you set the new RC_TEMPLATE_BY_RESREQ_ORDER parameter in the lsb.params configuration file, LSF looks for a template by an ordered set of resource requirements.
    • If you do not have the RC_TEMPLATE_BY_RESREQ_ORDER parameter configured, then LSF moves to the templateId value in the templates, and selects a template by alphabetical order.

Use the RC_TEMPLATE_BY_RESREQ_ORDER parameter so that LSF orders the templates by an ordered set of resource requirements. Separate each resource with a colon (:) as the value for the RC_TEMPLATE_BY_RESREQ_ORDER parameter. You can use any of the numeric consumable properties defined in the attributes section of the resource connector template as a resource for the RC_TEMPLATE_BY_RESREQ_ORDER parameter. For example, specifying RC_TEMPLATE_BY_RESREQ_ORDER=maxmen:slots tells LSF to first check the maxmem attribute in each template, and then prioritize templates based on maxmem values in descending order; that is, templates with higher maxmem values (such as 30720) are prioritized before templates with lower maxmem values (such as 20480). Next, if the maxmem values are same for all templates, then LSF compares their slots values in descending order.

To have LSF check resource requirement values in ascending order, precede the resource requirement with a minus sign (-). For example, RC_TEMPLATE_BY_RESREQ_ORDER=-maxmem:-slots tells LSF to prioritize templates with lower maxmem and slots values than templates with higher values.
Note: LSF will only order templates based on the values in the attributes section of your resource connector template. The values will not be changed. Even if the configured resource is increased or decreased in LSF, LSF always orders in ascending order if you specify a minus sign, and in descending order if not specified with a minus sign.
The badmin rc view -c templates command displays templates using the order defined by the RC_TEMPLATE_BY_RESREQ_ORDER parameter.
Tip: When defining resources in a template's attributes section and for the RC_TEMPLATE_BY_RESREQ_ORDER parameter, as a best practice, only use LSF built-in resources or the resources defined in the lsf.shared configuration file. Otherwise, the resources will not be generated in the VM created from this template and LSF job submissions.

After configuring the RC_TEMPLATE_BY_RESREQ_ORDER parameter, run the badmin mbdrestart command to apply your changes.

Default

RC_TEMPLATE_BY_RESREQ_ORDER=-maxmem:-slots, so that LSF picks templates with the least amount of memory and slots.