Saturday, May 18, 2013

How to configure fairshare in maui.


What is fairshare?
Fairshare allows historical resource utilization information to be incorporated in Job feasibility and priority decision.Job feasibility means whether to schedule job or not.

To start fairshare policy of maui we have to specify fairshare specific parameter in maui.cfg.Some of them are listed below.

FSINTERVAL  duration of each fairshare window
FSDEPTH       number of fairshare windows factored into current fairshare utilization
FSDECAY      decay factor applied to weighting the contribution of each fairshare window
FSPOLICY     metric to use when tracking fairshare usage

Scheduling cycle is divided into equal size window of size FSINTERVAL and number of windows are specified by FSDEPTH.

Now fairshare can be applied on credential basis by using credential specific parameter like USERCFG,GROUPCFG,CLASSCFG etc.

Fairshare affects maui's scheduling decision using 2 approach
1)Fairshare Target
2)Fairshare caps

Fairshare Target is responsible for job priority decision. And Fairshare cap is responsible for job feasibility decision. It is of two type absolute and relative.
Unfortunately no proper documentation is provided for capping policy.In moab when we want to specify capping we have to use FSCAP.In maui FSCAP is provided in parameter list but is not handled in source code.

To specify capping in maui we have to use FSTARGET. Thus suppose credential is that I want to constrained is User and Name of user is Shailesh.Suppose jobs submitted by shailesh must not consume more than 4000 proc sec.
Thus we can specify this in maui.cfg as given below
USERCFG[shailesh]  FSTARGET=4000^.

This is called as absolute capping.
In relative capping we consider percentage of total delivered cycles and can be specified by jst replacing ^ with %.