Under TORQUE, queue configuration is accomplished using the qmgr command. With this tool, the first step is to create the queue. This is accomplished using the create subcommand of qmgr as in the following example:
Once created, the queue must be configured to be operational. At a minimum, this includes setting the options started and enabled. Further configuration is possible using any combination of the attributes listed in the section below.
For boolean attributes, T, t, 1, Y, and y are all synonymous with true, and F, f, 0, N, and n all mean false.
For queue_type, E and R are synonymous with Execution and Routing.
4.1.1 Queue Attributes
parameter
format
description
example
acl_groups
<GROUP>[@<HOST>][+<USER>[@<HOST>]]...
specifies the list of groups which may submit jobs to the queue. If acl_group_enable is set to true, only users with a primary group listed in acl_groups may utilize the queue. NOTE: If the PBSACLUSEGROUPLIST variable is set in the pbs_server environment, acl_groups will be check against all groups of which the job user is a member.
NOTE: used in conjunction with acl_group_enable)
acl_group_enable
<BOOLEAN>
if TRUE, constrains TORQUE to only allow jobs submitted from groups specified by the acl_groups parameter. DEFAULT: FALSE
qmgr -c "set queue batch acl_group_enable=true"
acl_group_sloppy
<BOOLEAN>
if TRUE, acl_groups will be check against all groups of which the job user is a member. DEFAULT: FALSE
acl_hosts
<HOST>[+<HOST>]...
specifies the list of hosts which may submit jobs to the queue
qmgr -c "set queue batch acl_hosts=h1+h2+h3" (NOTE: used in conjunction with acl_host_enable)
acl_host_enable
<BOOLEAN>
if TRUE, constrains TORQUE to only allow jobs submitted from hosts specified by the acl_hosts parameter. DEFAULT: FALSE
qmgr -c "set queue batch acl_host_enable=true"
acl_logic_or
<BOOLEAN>
if TRUE, user and group acls are logically OR’d together, meaning that either acl may be met to allow access. If false or unset, then both acls are AND’d, meaning that both acls must be satisfied. DEFAULT: FALSE
acl_users
<USER>[@<HOST>][+<USER>[@<HOST>]]...
specifies the list of users which may submit jobs to the queue. If acl_user_enable is set to TRUE, only users listed in acl_users may utilize
the queue
NOTE: used in conjunction with acl_user_enable
acl_user_enable
<BOOLEAN>
if TRUE, constrains TORQUE to only allow jobs submitted from users specified by the acl_users parameter. DEFAULT: FALSE
qmgr -c "set queue batch acl_user_enable=true"
enabled
<BOOLEAN>
specifies if the queue accepts new job submissions. DEFAULT: FALSE
qmgr -c "set queue batch enabled=true"
keep_completed
<INTEGER>
specifies the number of seconds jobs should be held in the Completed state after exiting. DEFAULT: 0
kill_delay
<INTEGER>
specifies the number of seconds between sending a SIGTERM and a SIGKILL to a job being cancelled. DEFAULT: 2 seconds
qmgr -c "set queue batch kill_delay=30"
max_queuable
<INTEGER>
specifies the maximum number of jobs allowed in the queue at any given time (includes idle, running, and blocked jobs). DEFAULT: unlimited
qmgr -c "set queue batch max_queuable=20"
max_running
<INTEGER>
specifies the maximum number of jobs in the queue allowed to run at any given time. DEFAULT: unlimited
qmgr -c "set queue batch max_running=20"
max_user_queuable
<INTEGER>
specifies the maximum number of jobs, per user, allowed in the queue at any given time (includes idle, running, and blocked jobs). DEFAULT: unlimited. Version 2.1.3 and greater.
qmgr -c "set queue batch max_user_queuable=20"
max_user_run
<INTEGER>
specifies the maximum number of jobs, per user, in the queue allowed to run at any given time. DEFAULT: unlimited
qmgr -c "set queue batch max_user_run=10"
priority
<INTEGER>
specifies the priority value associated with the queue. DEFAULT: 0
specifies the queue type. NOTE: This value must be explicitly set for all queues.
qmgr -c "set queue batch queue_type=execution"
resources_available
<STRING>
specifies to cumulative resources available to all jobs running in the queue. DEFAULT:
N/A
qmgr -c "set queue batch resources_available.nodect=20"
(NOTE: pbs_server must be restarted for changes to take effect. Also, resources_available
is constrained by the smallest of queue.resources_available and the server.resources_available.)
resources_default
<STRING>
specifies default resource requirements for jobs submitted to the queue. DEFAULT: N/A
specifies the maximum resource limits for jobs submitted to the queue. DEFAULT: N/A
qmgr -c "set queue batch resources_max.nodect=16"
resources_min
<STRING>
specifies the minimum resource limits for jobs submitted to the queue. DEFAULT: N/A
qmgr -c "set queue batch resources_min.nodect=2"
route_destinations
<queue>[@<host>][+<queue>[@<host>]]...
specifies the potential destination queues for jobs submitted to the associated routing queue. NOTE: This attribute is only valid for routing queues. DEFAULT: N/A
started
<BOOLEAN>
specifies if jobs in the queue are allowed to execute. DEFAULT: FALSE
qmgr -c "set queue batch started=true"
Resources may include one or more of the following: arch, mem, nodes, ncpus, nodect, pvmem, and walltime
4.1.2 Example Queue Configuration
The following series of qmgr commands will create and configure a queue named batch:
This queue will accept new jobs and, if not explicitly specified in the job, will assign a nodecount of 1 and a walltime of 1 hour to each job.
4.1.3 Setting a Default Queue
By default, a job must explicitly specify which queue it is to run in. To change this behavior, the server parameter default_queue may be specified as in the following example:
4.1.4 Mapping a Queue to a Subset of Resources
TORQUE does not currently provide a simple mechanism for mapping queues to nodes. However, schedulers such as Moab and
Maui can provide this functionality.
The simplest method is using default_resources.neednodes on an execution queue, setting it to a particular node attribute. Maui/Moab will use this information to ensure that jobs in that queue will be assigned nodes with that attribute. For example, say we have some nodes bought with money from the chemistry department, and some nodes paid by the biology department.
this example doesn’t preclude other queues from accessing those nodes. One solution is to use some other generic attribute with all other nodes and queues.
More advanced configurations can be made with standing reservations and QOSes. (See TORQUE Queue to Node Mapping)
4.1.5 Creating a Routing Queue
A routing queue will steer a job to a destination queue based on job attributes and queue constraints. It is set up by creating a queue of queue_type Route with a route_destinations attribute set as in the example below.
In this example, the compute nodes are dual processors and default walltimes are set according to the number of processors / nodes of a job. Jobs with 32 nodes (63 processors) or more will be given a default walltime of 6 hours. Also, jobs with 16-31 nodes (31-62 processors) will be given a default walltime of 12 hours. All other jobs will have the server default walltime of 24 hours.
The ordering of the route_destinations is important. In a routing queue, a job is assigned to the first possible destination queue based on the resources_max, resources_min, acl_users, and acl_groups attributes. In the above example, the attributes of a single processor job would first be checked against the reg_64 queue, then the reg_32 queue and finally the reg queue.
Adding the following settings to the above configuration elucidates the queue resource requirements:
The time of enforcement of server and queue defaults is important in this example. TORQUE applies server and queue defaults differently in job centric and queue centric modes. For job centric mode, TORQUE waits to apply the server and queue defaults till the job is assigned to its final execution queue. For queue centric mode, it enforces server defaults first, before it is placed in the routing queue. In either mode, queue defaults override the server defaults. TORQUE defaults to job centric mode. To set queue centric mode, set queue_centric_limits, as in:
An artifact of job centric mode is that if a job does not have an attribute set, the server and routing queue defaults are not applied when queue resource limits are checked. Consequently, a job which requests 32 nodes (not ncpus=32) will not be checked against a min_resource.ncpus limit. Also, for the example above, a job without any attributes set will be placed in the reg_64 queue, since the server ncpus default will be applied after the job is assigned to an execution queue.
Routine queue defaults are NOT applied to job attributes in versions 2.1.0 and before.
If the error message 'qsub: Job rejected by all possible destinations' is reported when submitting a job, it may be necessary to add queue location information, (i.e., in the routing queue's route_destinations attribute, change 'batch' to 'batch@localhost')