# Node property equivilent

**URL:** <https://community.openpbs.org/t/node-property-equivilent/3080>\
**Category:** Users/Site Administrators\
**Created:** [May 2, 2022, 6:43pm UTC](https://community.openpbs.org/t/node-property-equivilent/3080 "2022-05-02T18:43:49Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![smasters](https://avatars.discourse-cdn.com/v4/letter/s/3e96dc/32.png) [@smasters](https://community.openpbs.org/u/smasters)\
**Post date:** [May 2, 2022, 6:43pm UTC](https://community.openpbs.org/t/node-property-equivilent/3080/1 "2022-05-02T18:43:49Z")

</div>

Using a cloud system and I have nodes in multiple regions. I can submit to any of them and run across all of the regions without problems. We do have some high i/o jobs that we want to limit to a particular region due to disk access performance.  
My thought was to add a location attribute to each node showing the region. Then we can specify the location in the qsub command. Otherwise it’d use any server available.  
From what I can tell Torque could do this using node properties. I have been trying and I can’t find the openpbs equivalent.

Any advice?

---

<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:** [May 2, 2022, 8:02pm UTC](https://community.openpbs.org/t/node-property-equivilent/3080/2 "2022-05-02T20:02:05Z")

</div>

Please try this,

–create a custome string\_array host level resource  
qmgr -c “create resource region type=string\_array,flag=h”

–Add it to the resources: line in the $PBS\_HOME/sched\_priv/sched\_config  
resources: “ncpus, aoe,…,region”

–kill -HUP or restart the pbs services on the server

–qmgr -c “set queue cloudeuropeQ default\_chunk.region=europe”

–for i in nodes\_in\_europe;do qmgr -c “set node $i resources\_available.region=europe”

–To submit a job  
qsub -l select=1:ncpus=1 -q cloudeuropeQ – /bin/sleep 1000

---

<div class="post-metadata">

**Author:** ![smasters](https://avatars.discourse-cdn.com/v4/letter/s/3e96dc/32.png) [@smasters](https://community.openpbs.org/u/smasters)\
**Post date:** [May 2, 2022, 8:12pm UTC](https://community.openpbs.org/t/node-property-equivilent/3080/3 "2022-05-02T20:12:37Z")

</div>

Thanks!  
If I leave out setting the queue default\_chunk will the scheduler ignore that resource?

I want the queue to assign jobs across all regions unless I specifically request one.

---

<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:** [May 2, 2022, 8:56pm UTC](https://community.openpbs.org/t/node-property-equivilent/3080/4 "2022-05-02T20:56:25Z")

</div>

> [@smasters](#):
>
> If I leave out setting the queue default\_chunk will the scheduler ignore that resource?

Yes, it will be just like another queue without having a default chunk mapped to a compute node of a specific region. Then your job submission line should be as below

> qsub -l select=1:ncpus=1:region=europe -q cloudeuropeQ – /bin/sleep 1000  
> or  
> qsub -l select=1:ncpus=1:region=europe – /bin/sleep 1000

---

<div class="post-metadata">

**Author:** ![smasters](https://avatars.discourse-cdn.com/v4/letter/s/3e96dc/32.png) [@smasters](https://community.openpbs.org/u/smasters)\
**Post date:** [May 2, 2022, 8:58pm UTC](https://community.openpbs.org/t/node-property-equivilent/3080/5 "2022-05-02T20:58:01Z")

</div>

Thanks. I’ll give this a try.

---

<div class="post-metadata">

**Author:** ![bhroam](https://yyz2.discourse-cdn.com/flex030/user_avatar/community.openpbs.org/bhroam/32/20_2.png) [@bhroam](https://community.openpbs.org/u/bhroam)\
**Post date:** [May 3, 2022, 11:20pm UTC](https://community.openpbs.org/t/node-property-equivilent/3080/6 "2022-05-03T23:20:18Z")

</div>

Another option is to use placement sets. There are several uses of placement sets, but your use case was the original one (network topology).

It works kind of like how @adarsh said, but instead of having to request a particular region, the scheduler does it for you. The idea is that you don’t care which region you run in, but you want all the nodes assigned to your job in the same region.

To do this, set up the string array resource like he suggested.  
Then set the following:  
qmgr -c ‘s s node\_group\_key=region’  
qmgr -c ‘s s node\_group\_enable=true’

Placement sets are sorted by size (ncpus/men). You will see your jobs fill up one placement set before it moves onto the next.

Placement sets can overlap. This means if you have smaller topology inside inside of a larger region, you can create all the smaller placement sets to overlap with the larger region sets.

Something like this:  
P1: N1, N2  
P2: N3, N4  
R1: N1, N2, N3, N4  
P3: N5, N6  
P4: N7, N8  
R2: N5, N6, N7, N8

The scheduler will run jobs on the smaller PN placement sets first before trying to run them on the larger ones. As a note, this will require setting up two different placement set resources (like region). One will be fore the P placement sets, and the other will be for the R placement sets.

One thing to note is that there is a case where you can cross regions. This happens when a job cannot run in any defined placement set. Think about if a job requested 5 nodes in the above example. The largest set is 4 nodes, so in that case the scheduler will run the job wherever it can.

There is nothing stopping you from combining what @ardash said and placement sets. You can set up placement sets for most people to use, but if someone really wants to run in europe, they can request region=europe like ardash said.

Bhroam

---

<div class="post-metadata">

**Author:** ![smasters](https://avatars.discourse-cdn.com/v4/letter/s/3e96dc/32.png) [@smasters](https://community.openpbs.org/u/smasters)\
**Post date:** [May 4, 2022, 3:28pm UTC](https://community.openpbs.org/t/node-property-equivilent/3080/7 "2022-05-04T15:28:29Z")

</div>

Very interesting. I like this approach. Will definitely make managing resources easier to group the jobs.  
For the most part our jobs can run in any region but we are using storage located in region 1. There is a slight delay in access for region 2 and 3 but most of our jobs are low io / high cpu so the delay is acceptable.  
We have a set of very high i/o jobs that we really need to confine to region 1, though.

---

<div class="post-metadata">

**Author:** ![smasters](https://avatars.discourse-cdn.com/v4/letter/s/3e96dc/32.png) [@smasters](https://community.openpbs.org/u/smasters)\
**Post date:** [May 5, 2022, 12:57pm UTC](https://community.openpbs.org/t/node-property-equivilent/3080/8 "2022-05-05T12:57:33Z")

</div>

This is working great. Thanks!  
Our users can specify region 1, 2, 3 or all in our launch menu and the queue is behaving accordingly.
