Clever sharetree usage for project-based job priority grouping

Posted by chris Wed, 12 Mar 2008 17:23:41 GMT

Recently on the mailing list there has been a discussion centering on how to order jobs within a project. For some reason, Daire's reply did not make it into the previous thread list. It is an interesting approach. Daire's method allows groups of jobs within a project to have different levels of priority entitlements in a way that does not interfere with other shares or projects. It also allows users or project leaders to more easily reallocate priorities on the fly, simply by changing the project associated with a task.

Daire writes:

...we decided to abstract gridengine's projects into priority groups
so that you can order jobs within a project by changing the job's project
(qalter -P). So for example if you have 2 projects A and B your 
sharetree might look something like:

ROOT
|-- A (75)
|   |-- A_1 (P) (10)
|   |-- A_2 (P) (1000)
|   |-- A_3 (P) (100000)
|   |-- A_4 (P) (10000000)
|   `-- A_5 (P) (1000000000)
`-- B (25)
   |-- B_1 (P) (10)
   |-- B_2 (P) (1000)
   |-- B_3 (P) (100000)
   |-- B_4 (P) (10000000)
   `-- B_5 (P) (1000000000)

where (P) signifies a gridengine "project" and the numbers in ()'s
are the assigned share values. Now you can move a job within project 
A between the 5 priority levels without effecting project B's share. 
Maybe use the Functional policy to ensure equal shares between users 
in the same priority band? Not sure how much the halflife factor will 
mess with the priority bands but the I'm assuming the large share 
differences between them will override the effect...

Similar discussions occur on this mailing list thread.

Simple equal user sharetree policy

Posted by chris Tue, 17 Jan 2006 22:33:30 GMT

The easiest way to set up Grid Engine for fair "all users treated equally" resource allocation is the simple functional policy setup described in a previous entry.

But what about doing something similar with the ShareTree policy? (a basic graphical explanation of the differences between the functional and sharetree policies can be found here).

It is also a two step process:

  1. Activate the policy in the scheduler configuration (command is 'qconf -msconf')
    • weight_tickets_share 100000
  2. Create a simple share tree with a special default leaf node ('qconf -mstree'), pasting in the following should be sufficient:
    • id=0
      name=Root
      type=0
      shares=1
      childnodes=1
      id=1
      name=default
      type=0
      shares=1
      childnodes=NONE

Additional things to consider include ...

The default halftime configured is one week. Despite the SGE documentation suggesting that unqualified integer values used in time fields represent seconds, the pre-configured default value for the scheduler parameter 'halftime' seem to be set in increments of hours. This means the default value of 168 sets a halftime of one-week in length. Consider setting halftime to "24" or "48" if you want the scheduler to only factor in usage over the past day or two when doing policy based scheduling calculations.

Also consider the following blog post by Stephan:
http://blogs.sun.com/roller/page/sgrell?entry=a_couple_lines_on_halftime

Some users may wish to consider altering the value of "usage_weight_list" to disable use of memory and IO statistics when performing share tree calculations. Some organizations may find it easier to explain to end users that the share tree allocation policy is making decisions purely on how much CPU time was consumed in prior tasks.