# Limit max nodes per group

**URL:** <https://community.openpbs.org/t/limit-max-nodes-per-group/1360>\
**Category:** Users/Site Administrators\
**Created:** [December 18, 2018, 7:30pm UTC](https://community.openpbs.org/t/limit-max-nodes-per-group/1360 "2018-12-18T19:30:18Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![pradeep](https://avatars.discourse-cdn.com/v4/letter/p/f0a364/32.png) [@pradeep](https://community.openpbs.org/u/pradeep)\
**Post date:** [December 18, 2018, 7:30pm UTC](https://community.openpbs.org/t/limit-max-nodes-per-group/1360/1 "2018-12-18T19:30:18Z")

</div>

how to cap the usage of each group to a maximum of 7 nodes in the cluster

---

<div class="post-metadata">

**Author:** ![pradeep](https://avatars.discourse-cdn.com/v4/letter/p/f0a364/32.png) [@pradeep](https://community.openpbs.org/u/pradeep)\
**Post date:** [December 19, 2018, 10:52am UTC](https://community.openpbs.org/t/limit-max-nodes-per-group/1360/2 "2018-12-19T10:52:58Z")

</div>

Hi team

please help me on this issue.

Thanks & Regards  
Pradeep

---

<div class="post-metadata">

**Author:** ![adarsh](https://avatars.discourse-cdn.com/v4/letter/a/f07891/32.png) [@adarsh](https://community.openpbs.org/u/adarsh)\
**Post date:** [December 19, 2018, 11:20am UTC](https://community.openpbs.org/t/limit-max-nodes-per-group/1360/3 "2018-12-19T11:20:23Z")

</div>

You can cap ncpus or cores to a group as below, but not the compute nodes:

For example:

Limit the total number of ncpus that can be consumed by jobs in the “radioss” queue  
to 100 per group; limit group1 to 50 ncpus, group2 to 25 ncpus, and set the overall limit  
to 200 ncpus

`qmgr –c "s q radioss max_run_res.ncpus ='[g:PBS_GENERIC=100],[g:group1=50],[g:group2=25],[o:PBS_ALL=200]'"`

**Other work around:**

1. Create a queue , say for example groupA
2. assign **acl\_group** to the queue for that queue
3. Create a custom resource with the group name “grouping” as the host level resource
  - qmgr -c “create resource grouping type=string\_array,flag=h”
  - add grouping to the resources: " … , grouping" of the $PBS\_HOME/sched\_priv/sched\_config
  - kill -HUP ; so that updated configuration is read

4. qmgr -c “set queue groupA default\_chunk.grouping=groupA”
5. for i in list of 7 nodes ; do qmgr -c “set node $i resources\_available.grouping=groupA”
6. So only that group of users will be able to submit jobs to that queue (groupA) and they will only be running only on those seven nodes.

Hope this helps

---

<div class="post-metadata">

**Author:** ![spalanisamy1](https://avatars.discourse-cdn.com/v4/letter/s/ecae2f/32.png) [@spalanisamy1](https://community.openpbs.org/u/spalanisamy1)\
**Post date:** [December 20, 2018, 4:19am UTC](https://community.openpbs.org/t/limit-max-nodes-per-group/1360/4 "2018-12-20T04:19:34Z")

</div>

Since you want it for User Group, you can use, “max\_group\_res”

Something similar to,

qmgr -c ‘set server max\_group\_res.ncpus=48’

Or, if you want Q specific

qmgr -c ‘set queue newq max\_group\_res.ncpus=36’

---

<div class="post-metadata">

**Author:** ![pradeep](https://avatars.discourse-cdn.com/v4/letter/p/f0a364/32.png) [@pradeep](https://community.openpbs.org/u/pradeep)\
**Post date:** [December 20, 2018, 12:05pm UTC](https://community.openpbs.org/t/limit-max-nodes-per-group/1360/5 "2018-12-20T12:05:05Z")

</div>

Thanks Adarsh for support

---

<div class="post-metadata">

**Author:** ![pradeep](https://avatars.discourse-cdn.com/v4/letter/p/f0a364/32.png) [@pradeep](https://community.openpbs.org/u/pradeep)\
**Post date:** [December 20, 2018, 1:15pm UTC](https://community.openpbs.org/t/limit-max-nodes-per-group/1360/6 "2018-12-20T13:15:52Z")

</div>

Thanks, max\_group\_res.ncpus not working in 18 version, its old and deprecated
