Learn more about Platform products at http://www.platform.com

[ Platform Documentation ] [ Title ] [ Contents ] [ Previous ] [ Next ] [ Index ]



Advance Reservation


Contents

[ Top ]


About Advance Reservation

Advance reservations ensure access to specific hosts during specified times. An advance reservation is essentially a lock on a number of processors.

Each reservation consists of the number of processors to reserve, a list of hosts for the reservation, a start time, an end time, and an owner. You can also specify a resource requirement string instead of or in addition to a list of hosts.

During the time the reservation is active, only users or groups associated with the reservation have access to start new jobs on the reserved hosts. The reservation is active only within the time frame specified, and any given host may have several reservations in place, some of which may be active at the same time.

When an advance reservation becomes active, LSF attempts to start all jobs that reference the reservation. By default, jobs that are already running on the hosts may continue, even though they do not reference the reservation. However, if a job that references a reservation is pending because the host has reached its job slot limit, LSF frees up a job slot on the host by suspending one of the jobs that does not reference the reservation. This is the only case where advance reservation overrides another LSF job scheduling policy.

LSF treats advance reservation like other deadlines, such as dispatch windows or run windows; LSF does not schedule jobs that are likely to be suspended when a reservation becomes active. Jobs referencing the reservation are killed when the reservation expires. LSF administrators can prevent running jobs from being killed when the reservation expires by changing the termination time of the job using the reservation (bmod -t) before the reservation window closes.

Reservations can also be created for system maintenance. If a system reservation is active, no other jobs can use the reserved hosts, and LSF does not dispatch jobs to the specified hosts while the reservation is active.

Only LSF administrators or root can create or delete advance reservations. Any LSF user can view existing advance reservations.

[ Top ]


Configuring Advance Reservation

Advance reservation plugin

To enable advance reservation in your cluster, configure the advance reservation scheduling plugin schmod_advrsv in lsb.modules.

Configuring lsb.modules

Begin PluginModule
SCH_PLUGIN               RB_PLUGIN                SCH_DISABLE_PHASES
schmod_default              ()                              ()
schmod_advrsv               ()                              ()
End PluginModule

Advance reservation license

Advance reservation requires the lsf_sched_advance_reservation license feature in your license file and LSF_Sched_Advance_Reservation configured in the PRODUCTS line of lsf.cluster.cluster_name.

Allowing users to create advance reservations

Advance reservation user policies

By default, only LSF administrators or root can add or delete advance reservations. To allow other users to use brsvadd to create advance reservations and brsvdel to delete advance reservations, use the ResourceReservation section of lsb.resources to configure advance reservation policies for users.

ResourceReservation section (lsb.resources)

A ResourceReservation section specifies:

Each advance reservation policy is defined in a separate ResourceReservation section, so it is normal to have multiple ResourceReservation sections in lsb.resources.

Examples

The not operator (~) does not exclude LSF administrators from the policy.

USER_ADVANCE_RESERVATION is obsolete (lsb.params)

USER_ADVANCE_RESERVATION in lsb.params is obsolete in LSF Version 6.0. Use the ResourceReservation section configuration in lsb.resources to configure advance reservation policies for your cluster.

[ Top ]


Using Advance Reservation

Advance reservation commands

Use the following commands to work with advance reservations:

brsvadd

Add a reservation

brsvdel

Delete a reservation

brsvs

View reservations

Adding and removing reservations

By default, only LSF administrators or root can add or delete advance reservations.

brsvadd command

Use brsvadd to create new advance reservations. You must specify the following for the reservation:

The brsvadd command returns a reservation ID that you use when you submit a job that uses the reserved hosts. Any single user or user group can have a maximum of 100 reservation IDs.

Specifying hosts for the reservation

Use one or both of the following brsvadd options to specify hosts for which processors are reserved:

Adding a one-time reservation (-b and -e)

Use the -b and -e options of brsvadd to specify the begin time and end time of a one-time advance reservation. One-time reservations are useful for dedicating hosts to a specific user or group for critical projects.

The day and time are in the form:

[[[year:]month:]day:]hour:minute

with the following ranges:

You must specify at least hour:minute. Year, month, and day are optional. Three fields are assumed to be day:hour:minute, four fields are assumed to be month:day:hour:minute, and five fields are year:month:day:hour:minute.

If you do not specify a day, LSF assumes the current day. If you do not specify a month, LSF assumes the current month. If you specify a year, you must specify a month.

You must specify a begin and an end time. The time value for -b must use the same syntax as the time value for -e. It must be earlier than the time value for -e, and cannot be earlier than the current time.

Examples

Adding a recurring reservation (-t)

Use the -t option of brsvadd to specify a recurring advance reservation. The -t option specifies a time window for the reservation. Recurring reservations are useful for scheduling regular system maintenance jobs.

The day and time are in the form:

[day:]hour[:minute]

with the following ranges:

Specify a time window one of the following ways:

You must specify at least the hour. Day of the week and minute are optional. Both the start time and end time values must use the same syntax. If you do not specify a minute, LSF assumes the first minute of the hour (:00). If you do not specify a day, LSF assumes every day of the week. If you do specify the day, you must also specify the minute.

When the job starts running, the run limit of the reservation is set to the minimum of the job run limit (if specified), the queue run limit (if specified), or the duration of the reservation time window. LSF administrators can prevent running jobs from being killed when the reservation expires by changing the termination time of the job using the reservation (bmod -t) before the reservation window closes.

Examples

Removing an advance reservation (brsvdel)

Use brsvdel to delete reservations. Specify the reservation ID for the reservation you want to delete. For example:

% brsvdel user1#0
Reservation user1#0 is being deleted

You can only delete one reservation at a time.

For more information

See Time Syntax and Configuration for more information about specifying time windows in LSF.

Viewing reservations

brsvs command

Use brsvs to show current reservations:

% brsvs
RSVID       TYPE    USER   NCPUS      RSV_HOSTS           TIME_WINDOW
user1#0     user    user1   1024     hostA:1024   11/12/6/0-11/12/8/0
user2#0     user    user2   1024     hostA:1024           12:0-14:0 *
groupA#0   group   groupA   2048     hostA:1024         3:0:0-3:3:0 *
                                     hostB:1024
system#0     sys   system   1024     hostA:1024       5:18:0-5:20:0 *

In the TIME_WINDOW column:

Showing a weekly planner (brsvs -p)

Use brsvs -p to show a weekly planner for specified hosts using advance reservation. The all keyword shows the planner for all hosts with reservations. MAX indicates the configured maximum number of job slots for the host.

% brsvs -p all
RSVID       TYPE    USER   NCPUS      RSV_HOSTS           TIME_WINDOW
user1#0     user    user1   1024     hostA:1024   11/12/6/0-11/12/8/0
user2#0     user    user2   1024     hostA:1024           12:0-14:0 *
groupA#0   group   groupA   2048     hostA:1024         3:0:0-3:3:0 *
                                     hostB:1024
system#0     sys   system   1024     hostA:1024       5:18:0-5:20:0 *

HOST: hostA  (MAX = 1024)
Week: 11/11/2004 - 11/17/2004
Hour:Min     Sun     Mon     Tue     Wed     Thu     Fri     Sat
-------------------------------------------------------------------
0:0          0       0       0       1024    0       0       0
0:10         0       0       0       1024    0       0       0
0:20         0       0       0       1024    0       0       0
...
2:30         0       0       0       1024    0       0       0
2:40         0       0       0       1024    0       0       0
2:50         0       0       0       1024    0       0       0
3:0          0       0       0       0       0       0       0
3:10         0       0       0       0       0       0       0
3:20         0       0       0       0       0       0       0
...
5:30         0       0       0       0       0       0       0
5:40         0       0       0       0       0       0       0
5:50         0       0       0       0       0       0       0
6:0          0       1024    0       0       0       0       0
6:10         0       1024    0       0       0       0       0
6:20         0       1024    0       0       0       0       0
...
7:30         0       1024    0       0       0       0       0
7:40         0       1024    0       0       0       0       0
7:50         0       1024    0       0       0       0       0
8:0          0       0       0       0       0       0       0
8:10         0       0       0       0       0       0       0
8:20         0       0       0       0       0       0       0
...
11:30        0       0       0       0       0       0       0
11:40        0       0       0       0       0       0       0
11:50        0       0       0       0       0       0       0
12:0         1024    1024    1024    1024    1024    1024    1024
12:10        1024    1024    1024    1024    1024    1024    1024
12:20        1024    1024    1024    1024    1024    1024    1024
...
13:30        1024    1024    1024    1024    1024    1024    1024
13:40        1024    1024    1024    1024    1024    1024    1024
13:50        1024    1024    1024    1024    1024    1024    1024
14:0         0       0       0       0       0       0       0
14:10        0       0       0       0       0       0       0
14:20        0       0       0       0       0       0       0
...
17:30        0       0       0       0       0       0       0
17:40        0       0       0       0       0       0       0
17:50        0       0       0       0       0       0       0
18:0         0       0       0       0       0       1024    0
18:10        0       0       0       0       0       1024    0
18:20        0       0       0       0       0       1024    0
...
19:30        0       0       0       0       0       1024    0
19:40        0       0       0       0       0       1024    0
19:50        0       0       0       0       0       1024    0
20:0         0       0       0       0       0       0       0
20:10        0       0       0       0       0       0       0
20:20        0       0       0       0       0       0       0
...
23:30        0       0       0       0       0       0       0
23:40        0       0       0       0       0       0       0
23:50        0       0       0       0       0       0       0

HOST: hostB  (MAX = 1024)
Week: 11/11/2004 - 11/17/2004
Hour:Min     Sun     Mon     Tue     Wed     Thu     Fri     Sat
-------------------------------------------------------------------
0:0          0       0       0       1024    0       0       0
0:10         0       0       0       1024    0       0       0
0:20         0       0       0       1024    0       0       0
...
2:30         0       0       0       1024    0       0       0
2:40         0       0       0       1024    0       0       0
2:50         0       0       0       1024    0       0       0
3:0          0       0       0       0       0       0       0
3:10         0       0       0       0       0       0       0
3:20         0       0       0       0       0       0       0
...
23:30        0       0       0       0       0       0       0
23:40        0       0       0       0       0       0       0
23:50        0       0       0       0       0       0       0

bjobs command

Use bjobs -l to show the reservation ID used by a job:

% bjobs -l
Job <1152>, User <user1>, Project <default>, Status <PEND>, 
Queue <normal>, Reservation <user1#0>, Command <myjob>

Mon Nov 12 5:13:21: Submitted from host <hostB>, CWD 
</home/user1/jobs>;

Submitting and modifying jobs using advance reservations

Submitting and running jobs (bsub -U)

Use the -U option of bsub to submit jobs with a reservation ID. For example:

%bsub -U user1#0 myjob

The job can only use hosts reserved by the reservation user1#0. By default, LSF selects only hosts in the reservation. Use the -m option to specify particular hosts within the list of hosts reserved by the reservation; you can only select from hosts that were included in the original reservation.

If you do not specify hosts (bsub -m) or resource requirements (bsub -R), the default resource requirement is to select hosts that are of any host type (LSF assumes "type==any" instead of "type==local" as the default select string.)

A job can only use one reservation. There is no restriction on the number of jobs that can be submitted to a reservation; however, the number of slots available on the hosts in the reservation may run out. For example, reservation user2#0 reserves 1024 slots on hostA. When all 1024 slots on hostA are used by jobs referencing user2#0, hostA is no longer available to other jobs using reservation user2#0. Any single user or user group can have a maximum of 100 reservation IDs.

Jobs referencing the reservation are killed when the reservation expires. LSF administrators can prevent running jobs from being killed when the reservation expires by changing the termination time of the job using the reservation (bmod -t) before the reservation window closes.

Modifying jobs (bmod -U)

Administrators can use the -U option of bmod to change a job to another reservation ID. For example:

%bmod -U user1#0 1234

To cancel the reservation, use the -Un option of bmod. For example:

%bmod -Un 1234

Changing job termination time (bmod -t)

Before the reservation window closes, administrators can use the -t option of bmod to change the termination time of a running job that is using the reservation. This prevents the job from being killed when the reservation expires; it does not extend the actual reservation window. For example:

%bmod -t 15:0 1234

You must set LSB_MOD_ALL_JOBS=Y in lsf.conf to use bmod -t for advance reservations.

IMPORTANT

bmod -t will not change the termination time of a pending job.

Job resource usage limits

A job using a reservation is subject to all job resource usage limits. If a limit is reached on a particular host in a reservation, jobs using that reservation cannot start on that host.

Preemption and fairshare

Higher priority jobs can only preempt other jobs that use the same reservation. In fairshare, a lower priority job can run as long as no other higher priority share holders can access the same reservation as the lower priority job.

Forcing a job to run before a reservation is active

LSF administrators can use brun to force jobs to run before the reservation is active, but the job must finish running before the time window of the reservation expires.

For example, if the administrator forces a job with a reservation to run one hour before the reservation is active, and the reservation period is 3 hours, a 4 hour run limit takes effect.

Advance reservations across clusters

You can create and use advance reservation for the MultiCluster job forwarding model. To enable this feature, you must upgrade all clusters to LSF Version 6.0 or later.

See the Using Platform LSF MultiCluster for more information.

Viewing historical accounting information for advance reservations

bacct -U

Use the -U option of the bacct command to display accounting information about advance reservations. bacct -U displays information similar to the brsvs command:

Example

% bacct -U user1#2
Accounting for:
  - advanced reservation IDs: user1#2,
  - advanced reservations created by user1,
-----------------------------------------------------------------------------
RSVID       TYPE      CREATOR    USER    NCPUS       RSV_HOSTS     TIME_WINDOW
user1#2     user        user1   user1      1           hostA:1    9/16/17/36-
9/16/17/38
SUMMARY:
Total number of jobs:          4
Total CPU time consumed:     0.5 second
Maximum memory of a job:     4.2 MB
Maximum swap of a job:       5.2 MB
Total duration time:            0 hour    2 minute    0 secon

[ Top ]


[ Platform Documentation ] [ Title ] [ Contents ] [ Previous ] [ Next ] [ Index ]


      Date Modified: January 12, 2004
Platform Computing: www.platform.com

Platform Support: support@platform.com
Platform Information Development: doc@platform.com

Copyright © 1994-2004 Platform Computing Corporation. All rights reserved.