Skip to content

fairshare documentation as it relates to flux accounting, flux core's job archive

Christopher Moussa edited this page Jul 28, 2020 · 1 revision

classic fairshare notes as it relates to flux-accounting

Users are granted permission to submit jobs against specific accounts. A user is granted a certain number of shares of the account they can charge jobs against.

flux-accounting keeps track of the number of shares allocated to a user in its association_table. To calculate a user's normalized shares, we would also need the number of shares allocated to all the siblings, to the account, its sibling accounts, its parent account, parent-siblings, and so on...

Usage for jobs is calculated using processor*seconds for every job, which are tracked in real-time alongside a decay factor D, which is a number of seconds from which to de-prioritize older job usage. That is then divided by the total number of processor*seconds to find a user's normalized usage that spans multiple time periods.

To my knowledge, the usage we care about is node usage, so maybe instead of processor*seconds, we can use node*seconds, which the job-archive DB already tracks, under the R field.

So, the simplified formula for calculating a fair-share factor for usage that spans multiple time periods and subject to a half-life decay is:

F = 2**(-U/S)

where:

F is the fair-share factor

S is the normalized shares

U is the normalized usage factoring in half-life decay

But, since accounts have multiple users charging jobs against it, another layer of fairness is needed. A job's fair-share factor must be influenced by the computing resources delivered to jobs of other users drawing from the same account. So, the actual formula used is a refinement of the above:

F = 2**(-U/S)

where:

U is really effective usage, which is defined as:

U = U(child) + ( (U(parent) - U(child)) * S(child)/S(siblings) )