# How to assign maximum cores to particular queue?

**URL:** <https://community.openpbs.org/t/how-to-assign-maximum-cores-to-particular-queue/2394>\
**Category:** Users/Site Administrators\
**Created:** [December 9, 2020, 6:54am UTC](https://community.openpbs.org/t/how-to-assign-maximum-cores-to-particular-queue/2394 "2020-12-09T06:54:38Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![zainul1114](https://yyz2.discourse-cdn.com/flex030/user_avatar/community.openpbs.org/zainul1114/32/263_2.png) [@zainul1114](https://community.openpbs.org/u/zainul1114)\
**Post date:** [December 9, 2020, 6:54am UTC](https://community.openpbs.org/t/how-to-assign-maximum-cores-to-particular-queue/2394/1 "2020-12-09T06:54:38Z")

</div>

Hi Team,  
We are using pbs\_version = 19.1.1,

 ![image](https://canada1.discourse-cdn.com/flex030/uploads/pbspro/original/1X/98c725d474f1863b1e9bb595d0237c34bc02796e.png)

Please help us to explain the details for below scenario’s

We have two nodes with 16 cores each, Totally 32cores and We have 3 Departments.

1. How can we assign max 8cores to each Dept (D1, D2 and D3) remaining 8cores will be free. (Please clarify us, can we think department nothing but Queue)
2. How to control a user to submit only assigned dept (D1)
3. How to list assigned cores with respect to Dept(D1) and Node(cores from which node)
4. How to assign complete node to particular Dept (D1)
5. How to submit priority job with maximum cores (around 30cores)
6. Limit the maximum number of running cores (4) for all users in a dept(D1)

Regrads,  
Zain

---

<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 9, 2020, 1:29pm UTC](https://community.openpbs.org/t/how-to-assign-maximum-cores-to-particular-queue/2394/2 "2020-12-09T13:29:50Z")

</div>

Please make sure

1. Please check this documentation on Server and Queue limits  
[https://www.altair.com/pdfs/pbsworks/PBSAdminGuide2020.1.pdf](https://www.altair.com/pdfs/pbsworks/PBSAdminGuide2020.1.pdf)  
The below section in the documentation has all the examples:  
**5.15.1.9.ii Examples of Setting Server and Queue Limits**

2. You can acl\_users / acl\_groups to control which queues the users are allowed to submit jobs.  
Also, you can have fine grained custom control by implementing queuejob hook  
in the above guide: search for acl\_users , acl\_groups , queuejob hook

3. You need need to write a json parser script, that would parse the output of` qstat -fx -F json` and get the desired results .

4. You can use Qlist set. Check the documentation and example at  
**4.9.2.2.i Procedure to Associate Vnodes with Multiple Queues**

5. You can use job sort formula to sort the jobs in which they get scheduled with ncpus has one fo the factor. In the above guide: check job\_sort\_formula and examples

6. Please check this documentation on Server and Queue limits  
[https://www.altair.com/pdfs/pbsworks/PBSAdminGuide2020.1.pdf](https://www.altair.com/pdfs/pbsworks/PBSAdminGuide2020.1.pdf)  
The below section in the documentation has all the examples:  
**5.15.1.9.ii Examples of Setting Server and Queue Limits**

Hope this helps
