LSF Version 7.3 - Administering Platform LSF
Administering Platform LSF 335
Resource Preemption
License Preemption Example
Configuration
This example uses LicenseA as name of preemption resource.
lsf.shared Add the resource to the Resource section.
Begin Resource
RESOURCENAME TYPE INTERVAL INCREASING DESCRIPTION
LicenseA Numeric 60 N (custom application)
...
End Resource
lsf.cluster.cluster_name
Add the resource to the ResourceMap section
Begin ResourceMap
RESOURCENAME LOCATION
LicenseA [all]
...
End ResourceMap
lsb.params Add the resource to the list of preemption resources.
...
PREEMPTABLE_RESOURCES = LicenseA
...
lsb.queues Define a higher priority queue to be a PREEMPTIVE queue by adding one line in
the queue definition.
Begin Queue
QUEUE_NAME=high
PRIORITY=40
...
PREEMPTION=PREEMPTIVE
DESCRIPTION=jobs may preempt jobs in lower-priority queues
...
End Queue
Configure a job control action in a lower priority queue, let SIGTSTP be sent when
the SUSPEND action is called, we assume your application can catch the signal
SIGTSTP and release the resource (license) it used, then suspend itself. You should
also make sure that your application can catch the signal SIGCONT while it is
suspended, and consume (check out) the resource (license) again.
Begin Queue
QUEUE_NAME=low
PRIORITY=20
...
JOB_CONTROLS=SUSPEND[SIGTSTP] RESUME[SIGCONT] TERMINATE[SIGTERM]