Job Limit restriction on PBS

Hello All,

PBS configure for queue
I’ve limited user jobs for a queue like this below,
queue name: q1day_small
max_queued = [o:PBS_ALL=50]
max_queued += [u:PBS_GENERIC=5]
max_run = [o:PBS_ALL=50]
max_run += [u:PBS_GENERIC=5]

As per the above limit, user jobs should be work for 5(running) + 5(queued)=10 jobs at a time
But the user is able to submit 5 jobs irrespective of running or queue only.

Request anyone to give a solution to my query.

Running jobs are enqueued, so if you want the user to have 10 jobs in the queue (up to 5 of them running), you should set max_queued to 10 and leave max_run set to 5.


1 Like

Hi Gabe,
Thanks, I did, and it’s working.

Your other option is to use max_queued_threshold. This is more like what you originally wanted. It is the max number of jobs in a queue in the queued state. This means if a job runs, that user can submit another job into the queue.
With what @gabe told you, a user can have a total of 10 jobs in the queue no matter the state. This means if there aren’t enough resources, they can have 10 queued jobs.

With max_queued_threshold in the case where resources aren’t available, they can have 5 jobs in the queue. When one starts running, another job can be queued.

It all depends on how you want to do this.


1 Like

@bhroam Thanks for that clarification!

I usually combine limits like these with a routing queue. If the user is submitting jobs to the routing queue, and max_queued_threshhold is set on its destination execution queue, the user can keep submitting jobs to the routing queue (which, in my opinion, is more user-friendly) but only 5 of their jobs can trickle into the execution queue to possibly run.