Preventing Queue Hogging
By default, the Job Scheduler allows queue hogging. This means that the Job Scheduler allows a user who has several consecutive jobs on the queue to have all of those jobs processed before the jobs of any other user. That situation can result in long waits for other users if the first user has several long-running jobs scheduled to be processed one after the other. You can change the default behavior for the Job Scheduler through the QUEUEHOGGING parameter in the lajs.file.
If you change the QUEUEHOGGING parameter setting to NOT ALLOWED
, then after the first job by the original user is processed the Job Scheduler will look for a job from another user and process that before returning to process the next job from the first user. For example, assume that the queue is as follows:
User1 Job1 Running
User1 Job2 Waiting
User1 Job3 Waiting
User1 Job4 Waiting
User2 Job1 Waiting
User2 Job2 Waiting
With queue hogging allowed, these jobs would be processed in the following order:
User1/Job1, User1/Job2, User1/Job3, User1/Job4, User2/Job1, User2/Job2
With queue hogging not allowed, these jobs would be processed in the following order:
User1/Job1, User2/Job1, User1/Job2, User2/Job2, User1/Job3, User1/Job4
Note that once User2 has run a job, User1 runs his next job, then User2 runs another job. Since there were no other user jobs waiting, User1 then was allowed to run his last two jobs consecutively. This functioning depends on tracking the user of the last job submitted on each queue and then checking this before the next job is allowed to run. If there are jobs for others in the queue, a different user’s job is allowed to run and this user name is saved as the last user for that queue. When the queue is checked for the next job to run, the first user now doesn’t match the saved last user and so that user's next job is allowed to run and that user becomes the saved last user again. This in turn allows a different user's job to run next.
lajs
is started or restarted with jobs in a running status.
To turn off queue hogging