Managing Advance Reservations

Searching Sun Grid Engine 6.2

Sun Grid Engine Information Center
Administering Sun Grid Engine
Index


Managing Advance Reservations

About Advance Reservations

An advance reservation is a reservation (possibly independent of a particular job) that a user or administrator can request and the scheduler can create. This reservation causes the associated resources to be reserved for the specified user, administrator, or job. An advance reservation might limit a particular resource capability over a defined time interval. The actual resource is likely obtained by the requestor (scheduler) from the resource owner through a negotiation process.

You might better understand the concept of an advance reservation if you think about a travel reservation system. Using the Sun Grid Engine resource reservation capability, all passengers are guaranteed to get on a plane flight in the order in which the passengers arrive at the airport. What you really want is to be able to reserve your flights in advance so that you can arrange your specific flight schedule before you arrive at the airport. Grid Engine enables you to make those arrangements in advance based on an allocation scheme that the scheduler uses.

Capabilities

An advance reservation is defined by the following:

  • A start time, which is defined using the standard date-time format
  • An end time, which is either defined using the standard date-time format or computed from the start time plus a duration value

Advance Reservation States

Grid Engine supports the following advance reservation states:

State Description
w Waiting - Granted but start time not reached
r Running - Start time reached
x Exited - End time reached and doing cleanup
d Deleted - Manual deletion
W Warning - AR became invalid but AR start time is not reached
E Error - AR became invalid and AR start time is reached

Using QMON for Advance Reservations

How to Create Advance Reservations Using QMON

  1. On the QMON main control window, click the Advance Reservation icon.
    QMON icon for Advance Reservation that looks somewhat like a wheel.

  2. To define the advance reservation, click the Submit button.
    The AR Definition window appears, as shown in this example.
    "Picture of QMON AR Definition window

  3. Define the time at which the advance reservation will start.
    Tip
    If you do not provide a start time, the advance reservation starts as soon as you submit the definition.


  4. Define the time at which the advance reservation will end or provide a duration.
    Note
    A duration or end time is the only required parameter for an advance reservation.


  5. (Optional) Provide additional parameters as desired.
    For more information about the possible parameters, click the Help button in the QMON window or see the qrsub(1) man page.

  6. When you are satisfied with the parameters for your advance reservation, click the Submit AR button.
    If you see an error similar to the following, confirm that the user who is running QMON is in the arusers access list.

How to View Advance Reservations Using QMON

  1. On the QMON main control window, click the Advance Reservation icon.
    The AR Control dialog box lists any defined advance reservations that are available. To sort your advance reservations, click twice on the column heading that you would like to sort by.
    "Picture of QMON AR Control window

    By default, the columns shown in the Advance Reservation Control view are the following:
    • ARId – The Advance Reservation Id
    • ARName – The name of the Advance Reservation
    • Owner – The owner of the Advance Reservation
    • State – The state of the Advance Reservation (see Advance Reservation States)
    • StartTime – The time the Advance Reservation becomes active
    • EndTime – The time the Advance Reservation ends
    • Duration – The duration of the Advance Reservation
  2. To add or remove non-default attributes to the display, click the Customize button.
    The AR Customize dialog box appears.
    Picture of QMON AR Control Customize helper dialog

  3. Select the attributes that you would like to display.

  4. Click Cancel, Save, or Ok to exit the AR Customize dialog box.
    • Cancel dismisses any changes.
    • Ok makes the changes active as long as QMON is running.
    • Save makes the changes available permanently.

How to Delete Advance Reservations Using QMON

  1. On the QMON main control window, click the Advance Reservation icon.

  2. On the AR Control window, select one or more advance reservations.

  3. Click the Delete button.
Note
If jobs are running in the specific advance reservation, the request to delete fails. To force the advance reservation to delete anyhow, select the Force checkbox, then click Delete again.

Configuring Advance Reservations

User Access

The ability to create an advance reservation is limited to members of the arusers list.
The arusers list is created during Grid Engine installation. Only the Grid Engine administration user and those people explicitly included in the list can create advance reservations.

How to Enable a User to Create Advance Reservations

  1. To add a specific user to the access list from the command line, type a command similar to the following example:
    # qconf -au username-to-add arusers
    

    You should see a confirmation message similar to the following:

    added "username-to-add" to access list "arusers"
    
Tip
You can also perform this task from the QMON graphical interface. For information, see How to Configure User Access Lists with QMON.

ARCo Queries for Advance Reservations

The Accounting and Reporting Console (ARCo) provides several queries that specifically apply to advance reservations:

  • Accounting per AR
  • Advanced Reservation Attributes
  • Advanced Reservation Log
  • Advanced Reservation Time Usage
  • Advanced Reservation by User
  • Number of Jobs Completed per AR

For more information about ARCo, see Accounting and Reporting Console (ARCo).

Advance Reservation Command Reference

The following Grid Engine commands enable you to manage advance reservations. In addition, many standard Grid Engine commands supply information about your Advance Reservations. For example, the qsub command now includes a switch -ar that lets you specify the advance reservation into which to submit a specific job.

qrsub

Use the qrsub command to create an advance reservation and submit it to the Sun Grid Engine queuing system.

You may define default request files (analogous to sge_request for qsub) that can contain any of the possible command line options. The file names are $SGE_ROOT/$SGE_CELL/common/sge_ar_request (global defaults file) and $HOME/.sge_ar_request (user private defaults file).

Options

Many of the options for qrsub are the same as those for qsub. For more information, see the submit(1) man page.

Option Description
-a date_time Start time in [[CC]YY]MMDDhhmm[.SS] format
-A account_string AR name in accounting record
-ckpt ckpt_name Reserves in queue with ckpt method
-d time Specifies the duration of the advance reservation in TIME format. See the queue_conf(5) man page for a format description. The use of this switch is optional if the start time with the -a option and the end time with the -e option is requested.
-e date_time Specifies the end time for the advance reservation in [[CC]YY]MMDDhhmm[.SS] format. The use of this switch is optional if the start time with the -a option and the duration with the -d option is requested.
-he yes/no Specifies the behavior when the advance reservation goes into error state. A hard error means that no jobs using the reservation will be scheduled as long as the AR is in error state. If soft error is specified, the reservation stays usable with the remaining resources. By default, the soft error handling is used.
-help Displays command usage help
-l resource_list Requests the specified resources
-m b/e/a/n Defines or redefines under which circumstances mail is to be sent to the advance reservation owner or to the users defined with the -M option. The option arguments have the following meaning:
  • b – Mail is sent at the beginning of the AR
  • e – Mail is sent at the end of the AR
  • a – Mail is sent when the AR when goes into error state or is valid again
  • n – No mail is sent
-masterq wc_queue_list Binds master task to one or more queues
-now Reserves in queues with qtype interactive
-M user[@host],... Notifies these email addresses
-N name AR name
-w e/v Validates availability of AR request, default e
-pe pe_name slot_range Reserves slot range for parallel jobs
-q wc_queue_list Reserves one or more specific queues
-u user|access_list[,user|access_list...] Specifies the access list for the new advance reservation. Only users defined in this list are allowed to request the AR handle for their jobs. By default only the user who requested the AR has access. An access list is differentiated from a user name by prefixing the group name with an @ sign.

qrsub Examples

The following example reserves an slot in the queue all.q on host1 or host2 or host3.

qrsub -q "*@host1,*@host2,*@host3" -u $user -a 01121200 -d 1:0:0

The following example reserves 4 slots on a host with arch=sol-sparc64.

qrsub -pe alloc_pe_slots 4 -l a=sol-sparc64 -u $user -a 01121200 -d 1:0:0

qrdel

Use the qrdel command to delete an advance reservation. The qrdel command requires at least one advance reservation identifier, which can be either an AR-ID (number) or an AR name. The qrdel command deletes ARs in the order in which their identifiers are presented.

Jobs referring to a advance reservation that is tagged for deletion will also be removed. Only if all jobs referring an AR are removed from the Sun Grid Engine database, the reservation also will be removed.

Options

Options Description
-f Forces the deletion of ARs with jobs referring to the AR. The jobs are deleted from the list of jobs registered at sge_qmaster(8) even if the sge_execd(8) controlling the jobs does not respond to the delete request by the sge_qmaster(8).
-u wc_user_list Deletes all ARs that belong to the specified users
ar_list Deletes all ARs given in list
-help Displays command usage

Example

The following example deletes the advance reservation 193.

qrdel 193

qrstat

Use the qrstat command to view the current status of the granted Sun Grid Engine advance reservations. You can get information about specific ARs or users. Without any options, qrstat displays an overview of all reservations.

Options

Option Description
-ar ar_list Shows advance reservation information for all ARs contained in the ar_list. The ar_list can contain advance reservation IDs, names, or patterns.
-u user_list Displays information only for those ARs being requested by one of the users from the given list. The string $user is a placeholder for the current user name. An asterisk can be used as user name wild-card to request any users ARs be displayed.
-explain Displays the reason for a advance reservation error state.
Possible reasons are:
  • Reserved host is in unknown state.
  • Reserved queue instance is in error state.
    The output format for the error reasons is one line per reason.
-xml Prints output in XML format to stdout.
-help Displays command usage.

Examples

The first example shows information about all advance reservations. The second example shows detailed information about the advance reservation whose ID is 193.

% qrstat
AR-ID   name       owner        state start at            end at              duration
---------------------------------------------------------------------------------------
    192 project_xy user1        r     12/14/2006 14:47:23 12/14/2006 14:57:33 0:10:10
    193            user2        w     12/18/2006 10:00:00 12/19/2006 10:00:10 24:0:10

% qrstat -ar 193
==============================================================
id:                         193
ar_name:                    
submission_time:            Mon Nov 27 17:11:34 2006
owner:                      user1
acl_list:                   user1,user2
start_time:                 Mon Dec 18 10:00:00 2006
end_time:                   Tue Dec 19 10:00:10 2006
duration:                   24:0:10
granted_slots:              all.q@host1=2,all.q@host2=1
resource_list:              myapp=2,myapp=1
...

Enter labels to add to this page:
Please wait 
Looking for a label? Just start typing.

Sign up or Log in to add a comment or watch this page.


The individuals who post here are part of the extended Sun Microsystems community and they might not be employed or in any way formally affiliated with Sun Microsystems. The opinions expressed here are their own, are not necessarily reviewed in advance by anyone but the individual authors, and neither Sun nor any other party necessarily agrees with them.

Copyright 1994-2009 Sun Microsystems, Inc.
Powered by Atlassian Confluence
Sun Guidelines on Public Discourse Privacy Policy Terms of Use Trademarks Site Map Employment Investor Relations Contact