Platform LSF Administration Guide Version 6.2

Memory Reservation for Pending Jobs
Administering Platform LSF
346
See “Examples” on page 346 for examples of jobs that use memory reservation.
How memory reservation for pending jobs works
Amount of
memory reserved
The amount of memory reserved is based on the currently available memory when the
job is pending. For example, if LIM reports that a host has 300 MB of memory available,
the job submitted by the following command:
%
bsub -R "rusage[mem=400]" -q reservation my_job
will be pending and reserve the 300 MB of available memory. As other jobs finish, the
memory that becomes available is added to the reserved memory until 400 MB
accumulates, and the job starts.
No memory is reserved if no job slots are available for the job because the job could not
run anyway, so reserving memory would waste the resource.
Only memory is accumulated while the job is pending; other resources specified on the
rusage string are only reserved when the job is running. Duration and decay have no
effect on memory reservation while the job is pending.
How long memory is reserved (MAX_RESERVE_TIME)
Reserved memory expires at the end of the time period represented by the number of
dispatch cycles specified by the value of MAX_RESERVE_TIME set on the
RESOURCE_RESERVE parameter. If a job has not accumulated enough memory to
start by the time MAX_RESERVE_TIME expires, it releases all its reserved memory so
that other pending jobs can run. After the reservation time expires, the job cannot
reserve slots or memory for one scheduling session, so other jobs have a chance to be
dispatched. After one scheduling session, the job can reserve available resources again
for another period specified by MAX_RESERVE_TIME.
Examples
lsb.queues
The following queues are defined in lsb.queues:
Begin Queue
QUEUE_NAME = reservation
DESCRIPTION = For resource reservation
PRIORITY=40
RESOURCE_RESERVE = MAX_RESERVE_TIME[20]
End Queue
Assumptions
Assume one host in the cluster with 10 CPUs and 1 GB of free memory currently
available.
Sequential jobs
Each of the following sequential jobs requires 400 MB of memory and will run for 300
minutes.
Job 1:
%
bsub -W 300 -R "rusage[mem=400]" -q reservation myjob1
The job will start running, using 400M of memory and one job slot.
Job 2:
Submitting a second job with same requirements will get the same result.
Job 3: