Limit on resources per user/group

I am trying to implement some resource limitations for users or groups. I only want to limit the maximum number of CPUs that a user can consume in total, not per job. For example:


GROUPA = Each member can use up to 64 CPUs

Is using fairshare with the following formula the best path for accomplishing this task or is there an easier way with qmgr:

fairshare_usage_res: ncpus*walltime

Thank you,


@sscluster It depends what kind of limits you want to put in your complex. There are majorly two kinds of limits that you can apply in PBS - queued limits and run limits.

If you wish to limit userA from submitting any more jobs when it has already requested for 4 CPUs previously then you may want to use queued limits.
example - qmgr -c "s s max_queued_res.ncpus=[u:userA=4]"
If you want userA to continue submitting jobs but want to restrict this user from not using more than 4 cpus at a time then you might want to use run limits.
example - qmgr -c “s s max_run_res.ncpus=[u:userA=4]”

These limits can be applied to server or a specific queue as well.

For more details please refer to section “5.15” related to “Managing Resource Usage” in admin guide - here.

Hi SS,

I would suggest using max_queued_res.ncpus for this.
Information on the same is available in Administrator guide. Please let me know if you need further information.


Thank you all for the suggestions. I will use try to use the max_queued_res.ncpus and see how it goes.


I don’t think you are looking for max_queued_res.ncpus. This limits how many ncpus can be queued or running. I believe that you are looking for max_run_res.ncpus. This will limit a user to only be able to run a certain number of ncpus without also restricting the number of ncpus sitting in the queue.

@jon, @arungrover, @prakashcv13
It seems as though max_queued_res.ncpus is a server variable that can only be set once. How do I set it for mutliple users?

@sscluster you can specify multiple such limits using “+=” operator.

I’d recommend reading the admin guide section “5.15” . It has a lot of examples that might be helpful to you.

Works now. Forgot about the += operator for server variables.