Variable configuration is used to automatically change LSF configuration based on time windows. It is supported in the following files:
You define automatic configuration changes in configuration files by using if-else constructs and time expressions. After you change the files, reconfigure the cluster with the badmin reconfig command.
The expressions are evaluated by LSF every 10 minutes based on mbatchd start time. When an expression evaluates true, LSF dynamically changes the configuration based on the associated configuration statements. Reconfiguration is done in real time without restarting mbatchd, providing continuous system availability.
In the following examples, the #if, #else, #endif are not interpreted as comments by LSF but as if-else constructs.
# Example: limit usage of hosts in 'license1' group and time based configuration# - 10 jobs can run from normal queue# - any number can run from short queue between 18:30 and 19:30# all other hours you are limited to 100 slots in the short queue# - each other queue can run 30 jobsBegin LimitPER_QUEUE HOSTS SLOTS # Examplenormal license1 10# if time(18:30-19:30)short license1 -#elseshort license1 100#endif(all ~normal ~short) license1 30End Limit
The if-else construct can express single decisions and multi-way decisions by including elif statements in the construct.
The syntax for constructing if-else expressions is:
The #endif part is mandatory and the #else part is optional.