# Limit the maximum number of running cores for all users

**URL:** <https://community.openpbs.org/t/limit-the-maximum-number-of-running-cores-for-all-users/1740>\
**Category:** Users/Site Administrators\
**Created:** [August 22, 2019, 5:27pm UTC](https://community.openpbs.org/t/limit-the-maximum-number-of-running-cores-for-all-users/1740 "2019-08-22T17:27:06Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![daniel](https://yyz2.discourse-cdn.com/flex030/user_avatar/community.openpbs.org/daniel/32/630_2.png) [@daniel](https://community.openpbs.org/u/daniel)\
**Post date:** [August 22, 2019, 5:27pm UTC](https://community.openpbs.org/t/limit-the-maximum-number-of-running-cores-for-all-users/1740/1 "2019-08-22T17:27:06Z")

</div>

Hello,

Is there a way to limit the maximum number of running core for all whole users in PBSPro with pbs\_sched like MAUI?

Example: In maui.cfg it is possible to declare this:

# users  
USERCFG[DEFAULT] MAXPROC=100 # default user cpu limit

In PBS I found the command: qmgr -c “s s max\_run\_res.ncpus=[u:foo=100]”, but do I need to execute this command for every single user?

Thanks

---

<div class="post-metadata">

**Author:** ![mkaro](https://yyz2.discourse-cdn.com/flex030/user_avatar/community.openpbs.org/mkaro/32/85_2.png) [@mkaro](https://community.openpbs.org/u/mkaro)\
**Post date:** [August 22, 2019, 5:48pm UTC](https://community.openpbs.org/t/limit-the-maximum-number-of-running-cores-for-all-users/1740/2 "2019-08-22T17:48:03Z")

</div>

Is there a group all of your users belong to?

```
qmgr -c "s s max_run_res.ncpus=[g:users=100]"
```

---

<div class="post-metadata">

**Author:** ![daniel](https://yyz2.discourse-cdn.com/flex030/user_avatar/community.openpbs.org/daniel/32/630_2.png) [@daniel](https://community.openpbs.org/u/daniel)\
**Post date:** [August 22, 2019, 6:53pm UTC](https://community.openpbs.org/t/limit-the-maximum-number-of-running-cores-for-all-users/1740/3 "2019-08-22T18:53:04Z")

</div>

Hi @mkaro.

No there isn’t. But if this is the only way, I can try to create it.

Thanks

---

<div class="post-metadata">

**Author:** ![mkaro](https://yyz2.discourse-cdn.com/flex030/user_avatar/community.openpbs.org/mkaro/32/85_2.png) [@mkaro](https://community.openpbs.org/u/mkaro)\
**Post date:** [August 22, 2019, 6:58pm UTC](https://community.openpbs.org/t/limit-the-maximum-number-of-running-cores-for-all-users/1740/4 "2019-08-22T18:58:01Z")

</div>

That’s the only solution I’m aware of because wildcards aren’t an option. Using groups might also offer some flexibility if there are a subset of users needing a higher limit. Hope that helps.

---

<div class="post-metadata">

**Author:** ![arungrover](https://yyz2.discourse-cdn.com/flex030/user_avatar/community.openpbs.org/arungrover/32/40_2.png) [@arungrover](https://community.openpbs.org/u/arungrover)\
**Post date:** [August 22, 2019, 7:02pm UTC](https://community.openpbs.org/t/limit-the-maximum-number-of-running-cores-for-all-users/1740/5 "2019-08-22T19:02:53Z")

</div>

Try -  
qmgr -c “set server max\_run\_res.ncpus=[u:PBS\_GENERIC=100]”

This means it is a generic limit for every user

---

<div class="post-metadata">

**Author:** ![daniel](https://yyz2.discourse-cdn.com/flex030/user_avatar/community.openpbs.org/daniel/32/630_2.png) [@daniel](https://community.openpbs.org/u/daniel)\
**Post date:** [August 22, 2019, 7:11pm UTC](https://community.openpbs.org/t/limit-the-maximum-number-of-running-cores-for-all-users/1740/6 "2019-08-22T19:11:08Z")

</div>

Great!

Thanks @arungrover
