You are here: 6.0 Managing Fairness - Throttling Policies, Fairshare, and Allocation Management > Usage Limits/Throttling Policies
|
|
6.2 Usage Limits/Throttling Policies |
A number of Moab policies allow an administrator to control job flow through the system. These throttling policies work as filters allowing or disallowing a job to be considered for scheduling by specifying limits regarding system usage for any given moment. These policies may be specified as global or specific constraints specified on a per user, group, account, QoS, or class basis.
Moab allows significant flexibility with usage limits, or throttling policies. At a high level, Moab allows resource usage limits to be specified in three primary workload categories: (1) active, (2) idle, and (3) system job limits.
These limits can be applied to any job credential (user, group, account, QoS, and class), or on a system-wide basis. Using the keyword DEFAULT, a site may also specify the default setting for the desired user, group, account, QoS, and class. Additionally, QoS's may be configured to allow limit overrides to any particular policy.
To run, a job must meet all policy limits. Limits are applied using the *CFG set of parameters, particularly USERCFG, GROUPCFG, ACCOUNTCFG, QOSCFG, CLASSCFG, and SYSCFG. Limits are specified by associating the desired limit to the individual or default object. The usage limits currently supported are listed in the following table.
MAXARRAYJOB | |||
Units: | # of simultaneous active array job sub-jobs | ||
Description: | Limits the number of simultaneously active (starting or running) array sub-jobs a credential can have. | ||
Example: |
USERCFG[bob] MAXARRAYJOB=10 Bob can have a maximum of 10 active job array sub-jobs. |
||
MAXGRES | |||
Units: | # of concurrent uses of a generic resource | ||
Description: | Limits the concurrent usage of a generic resource to a specific quantity or quantity range. | ||
Example: |
USERCFG[joe] MAXGRES[matlab]=2 USERCFG[jim] MAXGRES[matlab]=2,4 |
||
MAXJOB | |||
Units: | # of jobs | ||
Description: | Limits the number of jobs a credential may have active (starting or running) at
any given time.
|
||
Example: |
USERCFG[DEFAULT] MAXJOB=8 GROUPCFG[staff] MAXJOB=2,4 |
||
MAXMEM | |||
Units: | total memory in MB | ||
Description: | Limits the total amount of dedicated memory (in MB) that can be allocated by a credential's active jobs at any given time. | ||
Example: |
ACCOUNTCFG[jasper] MAXMEM=2048 |
||
MAXNODE | |||
Units: | # of nodes | ||
Description: | Limits the total number of compute nodes that can be in use by active jobs at
any given time.
|
||
Example: |
CLASSCFG[batch] MAXNODE=64 |
||
MAXPE | |||
Units: | # of processor equivalents | ||
Description: | Limits the total number of dedicated processor-equivalents that can be allocated by active jobs at any given time. | ||
Example: |
QOSCFG[base] MAXPE=128 |
||
MAXPROC | |||
Units: | # of processors | ||
Description: | Limits the total number of dedicated processors that can be allocated by active jobs at any given time. | ||
Example: |
CLASSCFG[debug] MAXPROC=32 |
||
MAXPS | |||
Units: | <# of processors> * <walltime> | ||
Description: | Limits the number of outstanding processor-seconds a credential may have allocated at any given time. For example, if a user has a 4-processor job that will complete in 1 hour and a 2-processor job that will complete in 6 hours, they have 4 * 1 * 3600 + 2 * 6 * 3600 = 16 * 3600 outstanding processor-seconds. The outstanding processor-second usage of each credential is updated each scheduling iteration, decreasing as jobs approach their completion time. | ||
Example: |
USERCFG[DEFAULT] MAXPS=720000 |
||
MAXSUBMITJOBS | |||
Units: | # of jobs | ||
Description: | Limits the number of jobs a credential may submit per iteration. | ||
Example: |
USERCFG[DEFAULT] MAXSUBMITJOBS=5 |
||
MAXWC | |||
Units: | job duration [[[DD:]HH:]MM:]SS | ||
Description: | Limits the cumulative remaining walltime a credential may have associated with
active jobs. It behaves identically to the MAXPS limit
(listed earlier) only lacking the processor weighting. Like MAXPS, the
cumulative remaining walltime of each credential is also updated each
scheduling iteration.
|
||
Example: |
USERCFG[ops] MAXWC=72:00:00 |
The following example demonstrates a simple limit specification:
USERCFG[DEFAULT] MAXJOB=4 USERCFG[john] MAXJOB=8
This example allows user john to run up to 8 jobs while all other users may only run up to 4.
Simultaneous limits of different types may be applied per credential and multiple types of credentials may have limits specified. The next example demonstrates this mixing of limits and is a bit more complicated.
USERCFG[steve] MAXJOB=2 MAXNODE=30 GROUPCFG[staff] MAXJOB=5 CLASSCFG[DEFAULT] MAXNODE=16 CLASSCFG[batch] MAXNODE=32
This configuration may potentially apply multiple limits to a single job. As discussed previously, a job may only run if it satisfies all applicable limits. Thus, in this example, the scheduler will be constrained to allow at most 2 simultaneous user steve jobs with an aggregate node consumption of no more than 30 nodes. However, if the job is submitted to a class other than batch, it may be limited further. Here, only 16 total nodes may be used simultaneously by jobs running in any given class with the exception of the class batch. If steve submitted a job to run in the class interactive, for example, and there were jobs already running in this class using a total of 14 nodes, his job would be blocked unless it requested 2 or fewer nodes by the default limit of 16 nodes per class.
Multi-dimensional fairness policies allow a site to specify policies based on combinations of job credentials. A common example might be setting a maximum number of jobs allowed per queue per user or a total number of processors per group per QoS. As with basic fairness policies, multi-dimension policies are specified using the *CFG parameters or through the identity manager interface. Moab supports the most commonly used multi-dimensional fairness policies (listed in the table below) using the following format:
*CFG[X] <LIMITTYPE>[<CRED>]=<LIMITVALUE>
The "*CFG" is one of USERCFG, GROUPCFG, ACCOUNTCFG, QOSCFG, or CLASSCFG, the <LIMITTYPE> policy is one of the policies listed in the table in section 6.2.1.1, and <CRED> is of the format <CREDTYPE>[:<VALUE>] with CREDTYPE being one of USER, GROUP, ACCT, QoS, or CLASS. The optional <VALUE> setting can be used to specify that the policy only applies to a specific credential value. For example, the following configuration sets limits on the class fast, controlling the maximum number of jobs any group can have active at any given time and the number of processors in use at any given time for user steve.
CLASSCFG[fast] MAXJOB[GROUP]=12 CLASSCFG[fast] MAXPROC[USER:steve]=50 CLASSCFG[fast] MAXIJOB[USER]=10
The following example configuration may clarify further:
# allow class batch to run up the 3 simultaneous jobs # allow any user to use up to 8 total nodes within class CLASSCFG[batch] MAXJOB=3 MAXNODE[USER]=8 # allow users steve and bob to use up to 3 and 4 total processors respectively within class CLASSCFG[fast] MAXPROC[USER:steve]=3 MAXPROC[USER:bob]=4
Multi-dimensional policies cannot be applied on DEFAULT credentials. |
The table below lists the currently implemented, multi-dimensional usage limit permutations. The "slmt" stands for "Soft Limit" and "hlmt" stands for "Hard Limit."
Multi-Dimension Usage Limit Permutations | |
---|---|
ACCOUNTCFG[name] ACCOUNTCFG[name] |
MAXIJOB[QOS]=hlmt MAXIJOB[QOS:qosname]=hlmt |
ACCOUNTCFG[name] ACCOUNTCFG[name] |
MAXIPROC[QOS]=hlmt MAXIPROC[QOS:qosname]=hlmt |
ACCOUNTCFG[name] ACCOUNTCFG[name] |
MAXJOB[QOS]=slmt,hlmt MAXJOB[QOS:qosname]=slmt,hlmt |
ACCOUNTCFG[name] ACCOUNTCFG[name] |
MAXJOB[USER]=slmt,hlmt MAXJOB[USER:username]=slmt,hlmt |
ACCOUNTCFG[name] ACCOUNTCFG[name] |
MAXMEM[USER]=slmt,hlmt MAXMEM[USER:username]=slmt,hlmt |
ACCOUNTCFG[name] ACCOUNTCFG[name] |
MAXNODE[USER]=slmt,hlmt MAXNODE[USER:username]=slmt,hlmt |
ACCOUNTCFG[name] ACCOUNTCFG[name] |
MAXPE[QOS]=slmt,hlmt MAXPE[QOS:qosname]=slmt,hlmt |
ACCOUNTCFG[name] ACCOUNTCFG[name] |
MAXPROC[USER]=slmt,hlmt MAXPROC[USER:username]=slmt,hlmt |
ACCOUNTCFG[name] ACCOUNTCFG[name] |
MAXPROC[QOS]=slmt,hlmt MAXPROC[QOS:qosname]=slmt,hlmt |
ACCOUNTCFG[name] ACCOUNTCFG[name] |
MAXPROC[USER]=slmt,hlmt MAXPROC[USER:username]=slmt,hlmt |
ACCOUNTCFG[name] ACCOUNTCFG[name] |
MAXPS[QOS]=slmt,hlmt MAXPS[QOS:qosname]=slmt,hlmt |
ACCOUNTCFG[name] ACCOUNTCFG[name] |
MAXPS[USER]=slmt,hlmt MAXPS[USER:username]=slmt,hlmt |
ACCOUNTCFG[name] ACCOUNTCFG[name] |
MAXWC[USER]=slmt,hlmt MAXWC[USER:username]=slmt,hlmt |
CLASSCFG[name] CLASSCFG[name] |
MAXJOB[GROUP]=slmt,hlmt MAXJOB[GROUP:groupname]=slmt,hlmt |
CLASSCFG[name] | MAXJOB[QOS:qosname]=hlmt |
CLASSCFG[name] CLASSCFG[name] |
MAXJOB[USER]=slmt,hlmt MAXJOB[USER:username]=slmt,hlmt |
CLASSCFG[name] CLASSCFG[name] |
MAXMEM[GROUP]=slmt,hlmt MAXMEM[GROUP]=slmt,hlmt |
CLASSCFG[name] CLASSCFG[name] |
MAXMEM[GROUP]=slmt,hlmt MAXMEM[GROUP:groupname]=slmt,hlmt |
CLASSCFG[name] | MAXMEM[QOS:qosname]=hlmt |
CLASSCFG[name] CLASSCFG[name] |
MAXMEM[USER]=slmt,hlmt MAXMEM[USER:username]=slmt,hlmt |
CLASSCFG[name] CLASSCFG[name] |
MAXNODE[GROUP]=slmt,hlmt MAXNODE[GROUP:groupname]=slmt,hlmt |
CLASSCFG[name] | MAXNODE[QOS:qosname]=hlmt |
CLASSCFG[name] CLASSCFG[name] |
MAXNODE[USER]=slmt,hlmt MAXNODE[USER:username]=slmt,hlmt |
CLASSCFG[name] CLASSCFG[name] |
MAXPE[GROUP]=slmt,hlmt MAXPE[GROUP:groupname]=slmt,hlmt |
CLASSCFG[name] | MAXPE[QOS:qosname]=hlmt |
CLASSCFG[name] CLASSCFG[name] |
MAXPE[USER]=slmt,hlmt MAXPE[USER:username]=slmt,hlmt |
CLASSCFG[name] CLASSCFG[name] |
MAXPROC[GROUP]=slmt,hlmt MAXPROC[GROUP:groupname]=slmt,hlmt |
CLASSCFG[name] | MAXPROC[QOS:qosname]=hlmt |
CLASSCFG[name] CLASSCFG[name] |
MAXPROC[USER]=slmt,hlmt MAXPROC[USER:username]=slmt,hlmt |
CLASSCFG[name] CLASSCFG[name] |
MAXPS[GROUP]=slmt,hlmt MAXPS[GROUP:groupname]=slmt,hlmt |
CLASSCFG[name] | MAXPS[QOS:qosname]=hlmt |
CLASSCFG[name] CLASSCFG[name] |
MAXPS[USER]=slmt,hlmt MAXPS[USER:username]=slmt,hlmt |
CLASSCFG[name] CLASSCFG[name] |
MAXWC[GROUP]=slmt,hlmt MAXWC[GROUP:groupname]=slmt,hlmt |
CLASSCFG[name] | MAXWC[QOS:qosname]=hlmt |
CLASSCFG[name] CLASSCFG[name] |
MAXWC[USER]=slmt,hlmt MAXWC[USER:username]=slmt,hlmt |
GROUPCFG[name] | MAXJOB[CLASS:classname]=slmt,hlmt |
GROUPCFG[name] GROUPCFG[name] |
MAXJOB[USER]=slmt,hlmt MAXJOB[USER:username]=slmt,hlmt |
GROUPCFG[name] | MAXMEM[CLASS:classname]=slmt,hlmt |
GROUPCFG[name] GROUPCFG[name] |
MAXMEM[USER]=slmt,hlmt MAXMEM[USER:username]=slmt,hlmt |
GROUPCFG[name] | MAXNODE[CLASS:classname]=slmt,hlmt |
GROUPCFG[name] GROUPCFG[name] |
MAXNODE[USER]=slmt,hlmt MAXNODE[USER:username]=slmt,hlmt |
GROUPCFG[name] | MAXPE[CLASS:classname]=slmt,hlmt |
GROUPCFG[name] GROUPCFG[name] |
MAXPE[USER]=slmt,hlmt MAXPE[USER:username]=slmt,hlmt |
GROUPCFG[name] | MAXPROC[CLASS:classname]=slmt,hlmt |
GROUPCFG[name] GROUPCFG[name] |
MAXPROC[USER]=slmt,hlmt MAXPROC[USER:username]=slmt,hlmt |
GROUPCFG[name] | MAXPS[CLASS:classname]=slmt,hlmt |
GROUPCFG[name] GROUPCFG[name] |
MAXPS[USER]=slmt,hlmt MAXPS[USER:username]=slmt,hlmt |
GROUPCFG[name] | MAXWC[CLASS:classname]=slmt,hlmt |
GROUPCFG[name] GROUPCFG[name] |
MAXWC[USER]=slmt,hlmt MAXWC[USER:username]=slmt,hlmt |
QOSCFG[name] QOSCFG[name] |
MAXIJOB[ACCT]=hlmt MAXIJOB[ACCT:accountname]=hlmt |
QOSCFG[name] QOSCFG[name] |
MAXIPROC[ACCT]=hlmt MAXIPROC[ACCT:accountname]=hlmt |
QOSCFG[name] QOSCFG[name] |
MAXJOB[ACCT]=slmt,hlmt MAXJOB[ACCT:accountname]=slmt,hlmt |
QOSCFG[name] QOSCFG[name] |
MAXJOB[USER]=slmt,hlmt MAXJOB[USER:username]=slmt,hlmt |
QOSCFG[name] QOSCFG[name] |
MAXMEM[USER]=slmt,hlmt MAXMEM[USER:username]=slmt,hlmt |
QOSCFG[name] QOSCFG[name] |
MAXNODE[USER]=slmt,hlmt MAXNODE[USER:username]=slmt,hlmt |
QOSCFG[name] QOSCFG[name] |
MAXPE[ACCT]=slmt,hlmt MAXPE[ACCT:accountname]=slmt,hlmt |
QOSCFG[name] QOSCFG[name] |
MAXPE[USER]=slmt,hlmt MAXPE[USER:username]=slmt,hlmt |
QOSCFG[name] QOSCFG[name] |
MAXPROC[ACCT]=slmt,hlmt MAXPROC[ACCT:accountname]=slmt,hlmt |
QOSCFG[name] QOSCFG[name] |
MAXPROC[USER]=slmt,hlmt MAXPROC[USER:username]=slmt,hlmt |
QOSCFG[name] QOSCFG[name] |
MAXPS[ACCT]=slmt,hlmt MAXPS[ACCT:accountname]=slmt,hlmt |
QOSCFG[name] QOSCFG[name] |
MAXPS[USER]=slmt,hlmt MAXPS[USER:username]=slmt,hlmt |
QOSCFG[name] QOSCFG[name] |
MAXWC[USER]=slmt,hlmt MAXWC[USER:username]=slmt,hlmt |
USERCFG[name] USERCFG[name] |
MAXJOB[GROUP]=slmt,hlmt MAXJOB[GROUP:groupname]=slmt,hlmt |
USERCFG[name] USERCFG[name] |
MAXMEM[GROUP]=slmt,hlmt MAXMEM[GROUP:groupname]=slmt,hlmt |
USERCFG[name] USERCFG[name] |
MAXNODE[GROUP]=slmt,hlmt MAXNODE[GROUP:groupname]=slmt,hlmt |
USERCFG[name] USERCFG[name] |
MAXPE[GROUP]=slmt,hlmt MAXPE[GROUP:groupname]=slmt,hlmt |
USERCFG[name] USERCFG[name] |
MAXPROC[GROUP]=slmt,hlmt MAXPROC[GROUP:groupname]=slmt,hlmt |
USERCFG[name] USERCFG[name] |
MAXPS[GROUP]=slmt,hlmt MAXPS[GROUP:groupname]=slmt,hlmt |
USERCFG[name] USERCFG[name] |
MAXWC[GROUP]=slmt,hlmt MAXWC[GROUP:groupname]=slmt,hlmt |
Like all job credentials, the QoS object may be associated with resource usage limits. However, this credential can also be given special override limits that supersede the limits of other credentials, effectively causing all other limits of the same type to be ignored. See QoS Usage Limits and Overrides for a complete list of policies that can be overridden. The following configuration provides an example of this in the last line:
USERCFG[steve] MAXJOB=2 MAXNODE=30 GROUPCFG[staff] MAXJOB=5 CLASSCFG[DEFAULT] MAXNODE=16 CLASSCFG[batch] MAXNODE=32 QOSCFG[hiprio] OMAXJOB=3 OMAXNODE=64
The preceding configuration is identical to the earlier example with the exception of the final QOSCFG line. In this case, the QOSCFG parameter does two things:
Given the preceding configuration, assume a job is submitted with the credentials, user steve, group staff, class batch, and QoS hiprio.
Such a job will start so long as running it does not lead to any of the following conditions:
While the preceding example is a bit complicated for most sites, similar combinations may be required to enforce policies found on many systems.
Idle (or queued) job limits control which jobs are eligible for scheduling. To be eligible for scheduling, a job must meet the following conditions:
If a job fails to meet any of these conditions, it will not be considered for scheduling and will not accrue service based job prioritization. (See service component and JOBPRIOACCRUALPOLICY.) The primary purpose of idle job limits is to ensure fairness among competing users by preventing queue stuffing and other similar abuses. Queue stuffing occurs when a single entity submits large numbers of jobs, perhaps thousands, all at once so they begin accruing queuetime based priority and remain first to run despite subsequent submissions by other users.
Idle limits are specified in a manner almost identical to active job limits with the insertion of the capital letter I into the middle of the limit name. For example, to limit the number of (eligible) idle jobs a given user could have at once, the following parameter could be used:
USERCFG[DEFAULT] MAXIJOB=20
As just shown, idle limits can constrain the total number of jobs considered to be eligible on a per credential basis. Further, like active job limits, idle job limits can also constrain eligible jobs based on aggregate requested resources. This could, for example, allow a site to indicate that for a given user, only jobs requesting up to a total of 64 processors, or 3200 processor-seconds would be considered at any given time. Which jobs to select is accomplished by prioritizing all idle jobs and then adding jobs to the eligible list one at a time in priority order until jobs can no longer be added. This eligible job selection is done only once per scheduling iteration, so, consequently, idle job limits only support a single hard limit specification. Any specified soft limit is ignored.
All single dimensional job limit types supported as active job limits are also supported as idle job limits. In addition, Moab also supports MAXIJOB[USER] and MAXIPROC[USER] policies on a per class basis. (See Basic Fairness Policies.)
Example:
USERCFG[steve] MAXIJOB=2 GROUPCFG[staff] MAXIJOB=5 CLASSCFG[batch] MAXIJOB[USER]=2 MAXIJOB[USER:john]=6 QOSCFG[hiprio] MAXIJOB=3
Hard and soft limit specification allows a site to balance both fairness and utilization on a given system. Typically, throttling limits are used to constrain the quantity of resources a given credential (such as user or group) is allowed to consume. These limits can be very effective in enforcing fair usage among a group of users. However, in a lightly loaded system, or one in which there are significant swings in usage from project to project, these limits can reduce system utilization by blocking jobs even when no competing jobs are queued.
Soft limits help address this problem by providing additional scheduling flexibility. They allow sites to specify two tiers of limits; the more constraining limits soft limits are in effect in heavily loaded situations and reflect tight fairness constraints. The more flexible hard limits specify how flexible the scheduler can be in selecting jobs when there are idle resources available after all jobs meeting the tighter soft limits have started. Soft and hard limits are specified in the format [<SOFTLIMIT>,]<HARDLIMIT>. For example, a given site may want to use the following configuration:
USERCFG[DEFAULT] MAXJOB=2,8
With this configuration, the scheduler would select all jobs that meet the per user MAXJOB limit of 2. It would then attempt to start and reserve resources for all of these selected jobs. If after doing so there still remain available resources, the scheduler would then select all jobs that meet the less constraining hard per user MAXJOB limit of 8 jobs. These jobs would then be scheduled and reserved as available resources allow.
If no soft limit is specified or the soft limit is less constraining than the hard limit, the soft limit is set equal to the hard limit.
Example:
USERCFG[steve] MAXJOB=2,4 MAXNODE=15,30 GROUPCFG[staff] MAXJOB=2,5 CLASSCFG[DEFAULT] MAXNODE=16,32 CLASSCFG[batch] MAXNODE=12,32 QOSCFG[hiprio] MAXJOB=3,5 MAXNODE=32,64
Job preemption status can be adjusted based on whether the job violates a soft policy using the ENABLESPVIOLATIONPREEMPTION parameter. |
Per-partition scheduling can set limits and enforce credentials and polices on a per-partition basis. Configuration for per-partition scheduling is done on the grid head. In a grid, each Moab cluster is considered a partition. Per-partition scheduling is typically used in a Master/Slave grid.
To enable per-partition scheduling, add the following to moab.cfg:
PERPARTITIONSCHEDULING TRUE JOBMIGRATEPOLICY JUSTINTIME
With per-partition scheduling, it is recommended that limits go on the specific partitions and not on the global level. If limits are specified on both levels, Moab will take the more constricting of the limits. Also, please note that a DEFAULT policy on the global partition is not overridden by any policy on a specific partition. |
You can configure per-job limits and credential usage limits on a per-partition basis in the moab.cfg file. Here is a sample configuration for partitions "g02" and "g03" in moab.cfg.
PARCFG[g02] CONFIGFILE=/opt/moab/parg02.cfg PARCFG[g03] CONFIGFILE=/opt/moab/parg03.cfg
You can then add per-partition limits in each partition configuration file:
You can configure Moab so that jobs submitted to any partition besides g02and g03 get the default limits in moab.cfg:
CLASSCFG[pbatch] MAXJOB=2
The user, group, account, QoS, and class credentials are supported in per-partition scheduling.
The following per-job limits are supported:
The following credential usage limits are supported:
Multi-dimensional limits are supported for the listed credentials and per-job limits. For example:
CLASSCFG[pbatch] MAXJOB[user:frank]=10
Copyright © 2012 Adaptive Computing Enterprises, Inc.®