# PBS does not run jobs in order of job priority

**URL:** <https://community.openpbs.org/t/pbs-does-not-run-jobs-in-order-of-job-priority/3032>\
**Category:** Users/Site Administrators\
**Created:** [March 9, 2022, 4:17am UTC](https://community.openpbs.org/t/pbs-does-not-run-jobs-in-order-of-job-priority/3032 "2022-03-09T04:17:20Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![jobsortkey](https://avatars.discourse-cdn.com/v4/letter/j/ce7236/32.png) [@jobsortkey](https://community.openpbs.org/u/jobsortkey)\
**Post date:** [March 9, 2022, 4:17am UTC](https://community.openpbs.org/t/pbs-does-not-run-jobs-in-order-of-job-priority/3032/1 "2022-03-09T04:17:20Z")

</div>

I currently have one queue set up in a basic HPC environment. The goal is to enable users to set priority using the #PBS -p flag.

in /pbs/etc/pbs\_sched\_config, I uncommented and changed job\_sort\_key to the following:  
job\_sort\_key: “job\_priority HIGH” ALL

However in testing, the lower priority job still runs before the higher one despite requesting the same computing resources.

In pbs\_sched\_config, strict\_ordering is false.

If I do not want to have a job stop a currently running job, should preempt\_queue\_prio also be set to false?

---

<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:** [March 9, 2022, 7:58am UTC](https://community.openpbs.org/t/pbs-does-not-run-jobs-in-order-of-job-priority/3032/2 "2022-03-09T07:58:19Z")

</div>

> [@jobsortkey](#):
>
> in /pbs/etc/pbs\_sched\_config, I uncommented and changed job\_sort\_key to the following:  
> job\_sort\_key: “job\_priority HIGH” ALL

Please let us know the version of openPBS.

> [@jobsortkey](#):
>
> However in testing, the lower priority job still runs before the higher one despite requesting the same computing resources.

After making changes the sched\_config file, did you restart the pbs\_sched or kill -HUP \< PID of pbs\_sched \>

> [@jobsortkey](#):
>
> If I do not want to have a job stop a currently running job, should preempt\_queue\_prio also be set to false?

It is unrelated, no need to alter this parameter.

---

<div class="post-metadata">

**Author:** ![jobsortkey](https://avatars.discourse-cdn.com/v4/letter/j/ce7236/32.png) [@jobsortkey](https://community.openpbs.org/u/jobsortkey)\
**Post date:** [March 10, 2022, 12:59am UTC](https://community.openpbs.org/t/pbs-does-not-run-jobs-in-order-of-job-priority/3032/3 "2022-03-10T00:59:22Z")

</div>

I am using version 19.1.2. Does changing this setting in pbs\_sched do as expected in reordering job execution within a single queue?

---

<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:** [March 10, 2022, 7:42am UTC](https://community.openpbs.org/t/pbs-does-not-run-jobs-in-order-of-job-priority/3032/4 "2022-03-10T07:42:20Z")

</div>

Thank you.

> [@jobsortkey](#):
>
> Does changing this setting in pbs\_sched do as expected in reordering job execution within a single queue?

Yes, it does

---

<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:** [March 10, 2022, 8:46am UTC](https://community.openpbs.org/t/pbs-does-not-run-jobs-in-order-of-job-priority/3032/5 "2022-03-10T08:46:19Z")

</div>

> [@jobsortkey](#):
>
> in /pbs/etc/pbs\_sched\_config, I uncommented and changed job\_sort\_key to the following:  
> job\_sort\_key: “job\_priority HIGH” ALL

```auto
The sched_config file exists in this location
source /etc/pbs.conf ; cd $PBS_HOME/sched_priv

```
