Using and Administering

Setting and Changing the Priority of a Job

LoadLeveler uses the priority of a job to determine its position among a list of all jobs waiting to be dispatched. You can use the llprio command to change job priorities. See llprio - Change the User Priority of Submitted Job Steps for more information. This section discusses the different types of priorities and how LoadLeveler uses these priorities when considering jobs for dispatch.

User Priority

Every job has a user priority associated with it. This priority, which can be specified by the user in the job command file, is a number between 0 and 100 inclusively. A job with a higher priority runs before a job with a lower priority (when both jobs are owned by the same user). The default user priority is 50. Note that this is not the UNIX nice priority.

System Priority

Every job has a system priority associated with it. This priority is specified in LoadLeveler's configuration file using the SYSPRIO expression.

Understanding the SYSPRIO Expression

SYSPRIO is evaluated by LoadLeveler to determine the overall system priority of a job. A system priority value is assigned when the negotiator adds the new job to the queue of jobs eligible for dispatch.

The SYSPRIO expression can contain class, group, and user priorities, as shown in the following example:

SYSPRIO : (ClassSysprio * 100) + (UserSysprio * 10) + (GroupSysprio * 1) - (QDate)

For more information on the system priority expression, including all the variable you can use in this expression, see Step 6: Prioritize the Queue Maintained by the Negotiator.

How Does a Job's Priority Affect Dispatching Order?

LoadLeveler schedules jobs based on the adjusted system priorty, which takes in account both system priority and user priority. Jobs with a higher adjusted system priority are scheduled ahead of jobs with a lower adjusted system priority. In determining which jobs to run first, LoadLeveler does the following:

  1. Assigns all jobs a SYSPRIO at job submission time.
  2. Orders jobs first by SYSPRIO.
  3. Assigns jobs belonging to the same user and the same class an adjusted system priority, which takes all the system priorities and orders them by user priority.

For example, Table 3 represents the priorities assigned to jobs submitted by two users, Rich and Joe. Two of the jobs belong to Joe, and three belong to Rich. User Joe has two jobs (Joe1 and Joe2) in Class A with SYSPRIOs of 9 and 8 respectively. Since Joe2 has the higher user priority (20), and because both of Joe's jobs are in the same class, Joe2's priority is swapped with that of Joe1 when the adjusted system priority is calculated. This results in Joe2 getting an adjusted system priority of 9, and Joe1 getting an adjusted system priority of 8. Similarly, the Class A jobs belonging to Rich (Rich1 and Rich3) also have their priorities swapped. The priority of the job Rich2 does not change, since this job is in a different class (Class B).

Table 3. How LoadLeveler Handles Job Priorities
Job User Priority System Priority (SYSPRIO) Class Adjusted System Priority
Rich1 50 10 A 6
Joe1 10 9 A 8
Joe2 20 8 A 9
Rich2 100 7 B 7
Rich3 90 6 A 10


[ Top of Page | Previous Page | Next Page | Table of Contents | Index ]