LSF Version 7.3 - Administering Platform LSF
License Preemption Example
336 Administering Platform LSF
DESCRIPTION=jobs preempted by jobs in higher-priority queues
...
End Queue
ELIM Write an ELIM to report the current available number of Application A licenses.
This ELIM starts on the master host.
Operation
Check how many
LicenseA resources
are available
Check the number of LicenseA existing in the cluster by using bhosts -s
LicenseA
. In this example, 2 licenses are available.
bhosts -s LicenseA
RESOURCE TOTAL RESERVED LOCATION
LicenseA 2 0.0 hostA hostB ...
Using up all
LicenseA resources
Submit 2 jobs to a low-priority queue to consume those 2 licenses.
bsub -J first -q low -R "rusage[LicenseA=1:duration=2]" your_app
bsub -J second -q low -R "rusage[LicenseA=1:duration=2]" your_app
After a while, those jobs are running and the LicenseA resource is used up.
bjobs
JOBID USER STAT QUEUE FROM_HOS EXEC_HOST JOB_NAME SUBMIT_TIME
201 you RUN low hostx hostA /first Aug 23 15:42
202 you RUN low hostx hostB /second Aug 23 15:43
bhosts -s LicenseA
RESOURCE TOTAL RESERVED LOCATION
LicenseA 0 2.0 hostA hostB ...
Preempting a job
for the LicenseA
resource
Submit a job to a high-priority queue to preempt a job from a low-priority queue
for the resource
LicenseA.
bsub -J third -q high -R "rusage[LicenseA=1:duration=2]" your_app
After a while, the third job is running and the second job is suspended.
bjobs
JOBID USER STAT QUEUE FROM_HOST EXEC_HOST JOB_NAME SUBMIT_TIME
203 you RUN high hostx hostA /third Aug 23 15:48
201 you RUN low hostx hostA /first Aug 23 15:42
202 you SSUSP low hostx hostB /second Aug 23 15:43
bhosts -s LicenseA
RESOURCE TOTAL RESERVED LOCATION
LicenseA 0 2.0 hostA hostB ...