LSF Version 7.3 - Administering Platform LSF
Administering Platform LSF 337
Resource Preemption
Memory Preemption Example
Configuration
This example uses pre_mem as the name of the preemption resource.
lsf.shared Add the resource to the Resource section.
Begin Resource
RESOURCENAME TYPE INTERVAL INCREASING DESCRIPTION
pre_mem Numeric 60 N (external memory usage reporter)
...
End Resource
lsf.cluster.cluster_n
ame
Add the resource to the "ResourceMap" section.
Begin ResourceMap
RESOURCENAME LOCATION
pre_mem ([hostA] [hostB] ... [hostX])
#List the hosts where you want memory preemption to occur.
...
End ResourceMap
lsb.params Add the resource to the list of preemption resources.
...
PREEMPTABLE_RESOURCES=pre_mem
...
lsb.queues Define a higher-priority queue to be the PREEMPTIVE queue by adding one line
in the queue definition.
Begin Queue
QUEUE_NAME=high
PRIORITY=40
...
PREEMPTION=PREEMPTIVE
DESCRIPTION=preempt jobs in lower-priority queues
...
End Queue
Configure a job control action in a lower-priority queue, and let SIGTSTP be sent
when the SUSPEND action is called. This assumes your application can catch the
signal SIGTSTP and release (free) the resource (memory) it used, then suspend
itself. You should also make sure that your application can catch the signal
SIGCONT while it is suspended, and consume the resource (memory) again.
Begin Queue
QUEUE_NAME=low
PRIORITY=20
...
JOB_CONTROLS=SUSPEND[SIGTSTP] RESUME[SIGCONT] TERMINATE[SIGTERM]