C H A P T E R  5

Advance Reservations

Advance Reservation (AR) is a feature of some queuing software systems but not yet present in Sun Grid Engine release 6.1. (If you are using a later release of Sun Grid Engine, check whether that version includes an Advance Reservation feature that can be used with Sun Shared Visualization software.) See the Sun Shared Visualization 1.1 Release Notes for more information.

Topics discussed in this chapter include:

Advance Reservation Overview

The Advance Reservation requirement is to schedule compute and visualization resources at a time when the computer resources and the persons to use the resources are both available. The Advance Reservation server makes this possible. Reservations must not be scheduled to conflict with each other (by oversubscribing available resources), nor to conflict with other Sun Grid Engine uses of the same resources.

A user can reserve specified resources at a given time, for a given duration. Once confirmed, the resources are available to that user’s Sun Grid Engine jobs during that given reservation period. Jobs intended to run during the reservation period can be submitted to Sun Grid Engine (as with the Sun Grid Engine qsub command) right after the reservation is confirmed, or anytime before the end of the reserved period.

Using the Advance Reservation Feature

To start the AR client, use the bin/runar script with either the Reserve (for command line) or ReserveGUI (for GUI) argument:

client% $SGE_ROOT/ar/bin/runar [arguments]

To simplify operations, you can create an alias containing the complete path to the runar script in a single command. For example, the following command creates an alias called argui that starts an AR GUI client:

client% alias argui ’$SGE_ROOT/ar/bin/runar ReserveGUI’

Reserve AR Command-Line Client

The initial AR client is a command-line interface that connects with the AR server and handle reservations for the execution host. Any Sun Grid Engine user can run the AR client.

procedure icon  To Start the AR Client

single-step bullet  Type:

client% $SGE_ROOT/ar/bin/runar Reserve [options]...

The following table describes some options for the runar Reserve command:

TABLE 5-1 runar Reserve Options




Prints a description of the command-line options and formats.

-serverHost ARserver

Name of host that is running the Advance Reservation server software. The default serverHost is configured by the Advance Reservation server administrator.

-host execHost
-hostname execHost

The execution host on which you want your reservation. Default is the first execution host configured on this AR server.

-a mmddHHMM

Sets the reservation start date and time in the form of mmddHHMM (2-digit month, date, hour, and minute).

-duration HH:MM

Sets the reservation duration in the form of hours and minutes.

-l resourceList

Sets the reservation’s resource list. Multiple resources can be comma-separated.

-M EmailAddress

Introduces your email address. Mail will be sent if the reservation is confirmed. See the -m option.

-m specifier [minutes]

Specifies when email is sent to the address given by the -M option, using a string made of any of these characters:

  • r minutes - A number of minutes before the beginning of the reservation. The number of minutes follows the specifier string.
  • b - at the beginning of the reservation
  • e - at the end of the reservation
  • a - if the reservation is aborted

Example: -M myname@myhost -m ra 30
This combination of options reminds 30 minutes before the reservation and also if the reservation is aborted.

-N Name

Name of reservation or project.


Lists all reservations for the user issuing the command.


Deletes the key or queue for the reservation.


Lists all resources that are requestable on any host.

For example:

runar Reserve -a 12250730 -duration 1:30:0 -l graphics=1,slots=1

In this example, there is a reservation for 7:30 am on December 25, with a duration of one hour and 30 minutes. The resources required are one graphics resource and one slot.

Note - slots must be plural, even if the value is 1.

If successful, the command prints a Confirmed reservation, and issues a key or queue name. For example, queue=shefali1163187511986. The queue name is very important, as it is the handle used to submit jobs to the reservation’s queue.

Reserve GUI Client

procedure icon  To Start the AR GUI Client

single-step bullet  Type:

client% $SGE_ROOT/ar/bin/runar ReserveGUI [options]...

No options are normally required. The following GUI is displayed.


The New tab enables scheduling of a new reservation. TABLE 5-2 describes the purpose of each field under the New tab.

TABLE 5-2 Field Descriptions



Connection: Server Name

Host running the AR server, a name is normally obtained from the server’s AR configuration file.

Reservation Title

A name for the particular reservation.


Date for the reservation to start.

Start Time

Time at which the reservation starts.


The length of the reservation, in hours and minutes.


The name of the execution host on which you want the reservation.


Sun Grid Engine resources to reserve.

Reservation Queue

Upon successful reservation submission and approval, this field has the assigned reservation queue name. This name is needed to submit jobs that use the reserved resources.

Email Address

Optional email address where a confirmation email can be sent. The mail message also contains the reservation’s queue name.

Send Email

Specifies when email messages will be sent:

  • When the reservation is confirmed.
  • At the beginning of the reservation.
  • At the end of the reservation’s duration.
  • If the reservation is deleted.
  • A number of minutes before the reservation starts.

procedure icon  To See Pending Reservations

1. Click on the List/Delete tab.

2. Type the user name where prompted, if not already provided.

Otherwise, reservations for all users will be displayed



TABLE 5-3 describes the headings under the List/Delete tab.

TABLE 5-3 Advance Reservation List Heading Descriptions




The name of the reserved execution host.

Queue Name

The name that identifies the reservation and is needed to submit jobs that use the reserved resources.

You can copy the queue name to the clipboard for pasting into another window or command line, such as when submitting a job to the reservation’s queue.


Date for the reservation to start.


Time at which the reservation starts.


The length of the reservation, in hours, minutes, and seconds.


Sun Grid Engine resources to reserved.


The name of the user who requested the reservation.


Normally one of these values: QueueMade, (resources) Reserved, Started, Finished, or (resources) Returned.

procedure icon  To Delete a Reservation

1. Select the respective queue name from the list.

2. Click the Delete Reservation button.

Submitting a Job to an Advance Reservation

One or more jobs can be submitted to an Advance Reservation queue, using the reservation’s queue name. You can copy the queue name from a reservation confirmation (or from the list of reservations) and paste the name into the command line. For example:

qsub -q shefali1163187511986 -l graphics=1 my_gfx_script 

If a reservation has only the default one slot, only one job can run at a time on that queue. However, additional jobs can be enqueued (without -now set to y).

When the reservation period (start time + duration) ends, any running job on the reservation’s queue is stopped. A Sun Grid Engine administrator can alter the job to continue or to use a different queue. The administrator can configure a period after the reservation’s finish time (default: 12 hours), which determines when the queue is deleted. Any job remaining on the queue after that time is killed.