Make changes to fairshare

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:

# 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

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.

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

1 Like

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

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:

#======== === ====== ========  
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!

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 .

1 Like

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

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

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?

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

@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?

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

Yes, please, not an issue.

1 Like