FairshareUsageAndPriority

Share

Shares are allocated to projects.

Shares are established to target the conventional usage share of the machine between the project categories.

Projects within a category will tend to share homogeneously the resources for their category. They have all the same share.

Projects with zero share cannot run jobs. Jobs are queued with the following message:
Can Never Run: Job has zero shares for fairshare

Usage

The resource tracked is the walltime times the number of equivalent cpus used by the job (see accounting).

Each scheduler cycle, the scheduler adds the usage increment between this cycle and the previous cycle to its sum for the entity. When a job starts, all of the job's requested usage is added to the sum for the entity owner of the job for one cycle. The following cycle, the job's usage is set to the actual usage used between the first and second cycles.

Each entity's usage is reduced periodically at the 168 hours interval by a 0.5 factor.

This means that an entity with a lot of recent usage will have low priority for starting jobs, but if the entity cuts resource usage, its priority will go back after a few decay cycles.

Choosing which Job to run

Priority is the amount of usage divided by the percentage of the tree that an entity have. The most deserving entity have the priority smallest value.

The most deserving entity is found by starting at the root of the tree, comparing its immediate children (categories), finding the most deserving one, then looking among that vertex's children for the most deserving child (project). This continues until a leaf is found.

The job to be run next will be selected from the set of jobs belonging to the most deserving entity. If the most deserving job cannot run, then the next most is selected to run, and so forth.