# Make changes to fairshare

**URL:** https://community.openpbs.org/t/make-changes-to-fairshare/2744
**Category:** Developers
**Created:** [August 11, 2021, 1:47pm UTC](https://community.openpbs.org/t/make-changes-to-fairshare/2744 "2021-08-11T13:47:42Z")
**Posts on this page:** 11
**Page:** 1

<div class="post-metadata">

### Author: ![olderandcolder](https://avatars.discourse-cdn.com/v4/letter/o/b19c9b/32.png) [@olderandcolder](https://community.openpbs.org/u/olderandcolder)
#### Post date: [August 11, 2021, 1:47pm UTC](https://community.openpbs.org/t/make-changes-to-fairshare/2744/1 "2021-08-11T13:47:42Z")

</div>

If I make changes to the fairshare groups in ‘/sched\_priv/resource\_group’ do I need to do anything to get it to have an effect?

And can someone explain the fairshare tree to me:

for example:

```auto
# Group GID Parent Shares  
#======== === ====== ========  
Maths 100 root 100000 
Physics 200 root 100000
Bob 101 Maths 100000

```

In this instance will one user Bob have the same fairshare priority as all of the Maths group combined, or will they have the same priority as any user thats a member of the Maths group?

Thanks

---

<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: [August 11, 2021, 8:13pm UTC](https://community.openpbs.org/t/make-changes-to-fairshare/2744/2 "2021-08-11T20:13:47Z")

</div>

Hey @olderandcolder  
You will need to HUP the scheduler for it any change to the resource\_group to take effect (or just restart the scheduler).

The way the shares affect the percentage is that you sum all the shares in a fairshare group (root or Maths) and you divide any particular entity in the group by the sum. This generates that entity’s percentage. If there is only one entity in a group, it will have 100% of the priority of that group.

Any entity that doesn’t appear in the resource\_group file will be put into the unknown group. By default the unknown group has 10 shares and is in the root group. Also, by default any user which isn’t in the resource\_group will be ineligible to run.

---

<div class="post-metadata">

### Author: ![agurban](https://yyz2.discourse-cdn.com/flex030/user_avatar/community.openpbs.org/agurban/32/67_2.png) [@agurban](https://community.openpbs.org/u/agurban)
#### Post date: [August 11, 2021, 8:49pm UTC](https://community.openpbs.org/t/make-changes-to-fairshare/2744/3 "2021-08-11T20:49:47Z")

</div>

See section 4.9.19, “Using Fairshare”, in the PBS Admin Guide.

---

<div class="post-metadata">

### Author: ![olderandcolder](https://avatars.discourse-cdn.com/v4/letter/o/b19c9b/32.png) [@olderandcolder](https://community.openpbs.org/u/olderandcolder)
#### Post date: [August 16, 2021, 8:40am UTC](https://community.openpbs.org/t/make-changes-to-fairshare/2744/4 "2021-08-16T08:40:43Z")

</div>

Thanks @bhroam - total newbie here, can you explain what exactly you mean by HUP the scheduler… (and how i do it… 🙃)?

As for the fairshare, so if there is more than one entity in a group the fairshare is divided based on the percentage share the entity has of that groups share (and likewise the group’s share is the percentage of the total share for all the groups?). So:

```auto
#======== === ====== ========  
Maths 100 root 100000 
Physics 200 root 100000
Bob 101 Maths 100000
Dave 102 Maths 50000

```

Bob will have 2/3 of the Math’s fairshare priority, Dave gets 1/3. And the Maths & Physics parents both get the same?

Thanks!

---

<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: [August 16, 2021, 9:58am UTC](https://community.openpbs.org/t/make-changes-to-fairshare/2744/5 "2021-08-16T09:58:30Z")

</div>

> [@olderandcolder](#):
>
> total newbie here, can you explain what exactly you mean by HUP the scheduler… (and how i do it… 🙃)

Run the below command as root user:  
ps -ef | grep pbs\_sched or source /etc/pbs.conf;cat $PBS\_HOME/sched\_priv/sched.lock  
These commands gives the process id of the pbs scheduler

kill -HUP

This will make the pbs\_sched to re-read the changes .

---

<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: [August 16, 2021, 9:00pm UTC](https://community.openpbs.org/t/make-changes-to-fairshare/2744/6 "2021-08-16T21:00:49Z")

</div>

> [@olderandcolder](#):
>
> Bob will have 2/3 of the Math’s fairshare priority, Dave gets 1/3. And the Maths & Physics parents both get the same?

Correct. Math and Physics have 50% of the complex. Bob gets 2/3rds of 50% and Dave gets 1/3rd of 50%.

Of course the unknown gets 10 shares, so it isn’t 100% correct, but if everyone is in the resource\_group file, no one will be in the unknown group.

Bhroam

---

<div class="post-metadata">

### Author: ![olderandcolder](https://avatars.discourse-cdn.com/v4/letter/o/b19c9b/32.png) [@olderandcolder](https://community.openpbs.org/u/olderandcolder)
#### Post date: [August 17, 2021, 8:25am UTC](https://community.openpbs.org/t/make-changes-to-fairshare/2744/7 "2021-08-17T08:25:28Z")

</div>

Thanks @bhroam & @adarsh - I think I get it now!

---

<div class="post-metadata">

### Author: ![olderandcolder](https://avatars.discourse-cdn.com/v4/letter/o/b19c9b/32.png) [@olderandcolder](https://community.openpbs.org/u/olderandcolder)
#### Post date: [August 19, 2021, 2:13pm UTC](https://community.openpbs.org/t/make-changes-to-fairshare/2744/8 "2021-08-19T14:13:26Z")

</div>

Second question - is the fairshare as defined by the group eg “Maths” determined from a job’s “Account\_Name” or “project” attribute.

i.e. should the project or the “Account\_Name” for a job be set to “Maths” to make sure it is part of that fairshare group?

---

<div class="post-metadata">

### Author: ![olderandcolder](https://avatars.discourse-cdn.com/v4/letter/o/b19c9b/32.png) [@olderandcolder](https://community.openpbs.org/u/olderandcolder)
#### Post date: [August 19, 2021, 2:36pm UTC](https://community.openpbs.org/t/make-changes-to-fairshare/2744/9 "2021-08-19T14:36:05Z")

</div>

Ah, just found it - it’s set in the `sched_config` file with `fairshare_entity: Account_Name`

---

<div class="post-metadata">

### Author: ![olderandcolder](https://avatars.discourse-cdn.com/v4/letter/o/b19c9b/32.png) [@olderandcolder](https://community.openpbs.org/u/olderandcolder)
#### Post date: [September 27, 2021, 10:41am UTC](https://community.openpbs.org/t/make-changes-to-fairshare/2744/10 "2021-09-27T10:41:17Z")

</div>

@adarsh If I restart the scheduler using kill -HUP are jobs that are currently queued affected?

i.e Is it OK to do this on a live system with jobs running and queued?

---

<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: [September 27, 2021, 9:15pm UTC](https://community.openpbs.org/t/make-changes-to-fairshare/2744/11 "2021-09-27T21:15:06Z")

</div>

> [@olderandcolder](#):
>
> If I restart the scheduler using kill -HUP are jobs that are currently queued affected?

Nope, the scheduler will re-read the sched\_config and will apply this in the next schedule cycle.

> [@olderandcolder](#):
>
> i.e Is it OK to do this on a live system with jobs running and queued?

Yes, please, not an issue.
