# Job Submission by Memory

**URL:** <https://community.openpbs.org/t/job-submission-by-memory/862>\
**Category:** Users/Site Administrators\
**Created:** [February 7, 2018, 4:07pm UTC](https://community.openpbs.org/t/job-submission-by-memory/862 "2018-02-07T16:07:24Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![june5wed](https://avatars.discourse-cdn.com/v4/letter/j/f6c823/32.png) [@june5wed](https://community.openpbs.org/u/june5wed)\
**Post date:** [February 7, 2018, 4:07pm UTC](https://community.openpbs.org/t/job-submission-by-memory/862/1 "2018-02-07T16:07:24Z")

</div>

Good morning,  
I have a cluster with varying amounts of memory in the nodes. We’d like to ensure that jobs that get submitted without memory requirements get scheduled first on the lowest memory nodes, then middle tier, then high tier (rather than by node name). We’ve looked in the configs and searched for hooks but haven’t found anything at this time. Does anyone have a solution for this? Thanks in advance!

---

<div class="post-metadata">

**Author:** ![scott](https://yyz2.discourse-cdn.com/flex030/user_avatar/community.openpbs.org/scott/32/30_2.png) [@scott](https://community.openpbs.org/u/scott)\
**Post date:** [February 7, 2018, 4:40pm UTC](https://community.openpbs.org/t/job-submission-by-memory/862/2 "2018-02-07T16:40:30Z")

</div>

You may want to review the sched\_config parameter called node\_sort\_key. This will allow you to sort your nodes based on a numerical resource (including custom resources).

---

<div class="post-metadata">

**Author:** ![june5wed](https://avatars.discourse-cdn.com/v4/letter/j/f6c823/32.png) [@june5wed](https://community.openpbs.org/u/june5wed)\
**Post date:** [February 7, 2018, 5:11pm UTC](https://community.openpbs.org/t/job-submission-by-memory/862/3 "2018-02-07T17:11:20Z")

</div>

That was something we had tried but it didn’t seem to be working. Perhaps there is something we were missing?

---

<div class="post-metadata">

**Author:** ![scott](https://yyz2.discourse-cdn.com/flex030/user_avatar/community.openpbs.org/scott/32/30_2.png) [@scott](https://community.openpbs.org/u/scott)\
**Post date:** [February 7, 2018, 5:52pm UTC](https://community.openpbs.org/t/job-submission-by-memory/862/4 "2018-02-07T17:52:49Z")

</div>

When you modified the sched\_config, did you kill -HUP the pbs\_sched daemon to have it re-read the new configuration?

I am assuming you did the following as root on the PBS Server/Scheduler

1. Modified the $PBS\_HOME/sched\_priv/ched\_config to have the following node\_sort\_key attribute

node\_sort\_key: mem LOW

1. send the HUP signal to the pbs\_sched daemon

kill -HUP `cat $PBS_HOME/sched_priv/sched.lock`

The tried submitting your jobs, again?

If it didn’t work, then I will need to see a little more details about your config and the sched\_log.

First, as root…

1. Update PBS\_HOME/sched\_priv/sched\_config log\_filter attribute

log\_filter: 0

1. send the HUP signal to the pbs\_sched daemon

kill -HUP `cat $PBS_HOME/sched_priv/sched.lock`

Next, submit your test jobs, and provide the output of qstat -f (preferr the output to include jobs that are running so I can see which nodes were selected)

Finally, once your jobs finish, provide the output of  
A. pbsnodes -a  
B. PBS\_HOME/sched\_logs  
C. grep -v -e “^#” -e “^$” PBS\_HOME/sched\_priv/sched\_config

---

<div class="post-metadata">

**Author:** ![june5wed](https://avatars.discourse-cdn.com/v4/letter/j/f6c823/32.png) [@june5wed](https://community.openpbs.org/u/june5wed)\
**Post date:** [February 9, 2018, 1:50am UTC](https://community.openpbs.org/t/job-submission-by-memory/862/5 "2018-02-09T01:50:02Z")

</div>

It’s all working. That leads to a question, however… What is the purpose of the /opt/pbs/etc folder?

---

<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:** [February 9, 2018, 5:14pm UTC](https://community.openpbs.org/t/job-submission-by-memory/862/6 "2018-02-09T17:14:28Z")

</div>

The /opt/pbs/etc directory is there to house “sysconf data” as defined by GNU autotools. Any [Makefile.am](http://Makefile.am) that provides a list of files for “dist\_sysconf\_DATA” is placing files in that directory. It’s generally intended for system configuration files, as one would expect.

$ grep -r dist\_sysconf  
src/scheduler/Makefile.am:dist\_sysconf\_DATA =   
src/cmds/scripts/Makefile.am:dist\_sysconf\_DATA = \
