Configure resource provisioning policies
LSF resource connector provides built in policies for limiting the number of instances to be launched and the maximum number of instances to be created. The default plugin framework is a single python script that communicates via stdin and stdout in JSON data structures. LSF resource connector provides an interface for administrators to write their own resource policy plugin.
Example policies
- Step index and step time determine how many instances to launch at a time. The StepValue parameter specifies step index and step time. For example, the "StepValue": "10:10" means that the resource connector launches no more than 10 instances every 10 minutes.
- Maximum number of instances (per account, per template, per provider) at any given time is specified by the MaxNumber parameter.
To enable this feature, rename the example_policy_config.json file under the LSF_TOP/conf/resource_connector directory to policy_config.json and set the cluster administrator as the file owner.
Resource policy plug in interface
You should not change the default resource policy plugin files (Main.py and Log.py in the LSF_TOP/LSF_VERSION/resource_connector/policy directory). Instead, you can create you own script or binary executable file and specify the path of that script in the UserDefinedScriptPath parameter in the policy_config.json. The default policy script provided by LSF runs your script and uses the demand calculated by your script to create hosts for the cluster.
- The demand target requested by the cluster.
- The current allocation of hosts.
- The outstanding requests that have been made but not yet filled.
- The number of reclaimed hosts.