Univa Grid Engine 8.1 Features (Part 5) - Fair Resource Urgencies: Balance Usage of Arbitrary Resources (2012-06-05)
Resource urgencies can be set in the so called complex configuration with qconf -mc. One prominent example is the „slots“ resource which comes with a default urgency of 1000. This leads to the fact that jobs requesting a higher amount of slots (which is done with using parallel environments during job submission time) will get a higher overall priority (because resource urgencies are part of the priority calculation) when no other special policy is activated.
Resource urgencies are often used to fully load expensive resources through pushing jobs requesting such a resource to the top of the pending job list. In case of the "slots" resource the intention is that bigger jobs should be scheduled first in order to avoid starvation of those jobs.
With the advent of Grid Engine 8.1 resource urgencies can also be used to balance usage of arbitrary resources. Load balancing can be configured in Grid Engine also in different other ways: We have a share-tree which includes also historical information or you can use the functional policy which only respects current the cluster load. One known limitation is that those policies only work on a fixed set of objects (like users, projects, departments). This is where fair urgencies comes into play: They can be configured for any resource you like. The only thing you have to do is to add the specific resource complex name into the scheduler configuration. What the scheduler now does is it derives a different urgency value for each job in the pending job list depending on the amount of running jobs using this specific resource.
The following example will demonstrate load balancing:
When you have nine jobs running which are using already a resource A and in the pending job list one job requesting a resource A and one requesting a resource B (which is currently unused) then the scheduler will give the job requesting resource B the full amount of urgency points while the job requesting resource A will get just a tenth of the configured urgency points. Hence the job which requests resource B will be pushed in the pending job list and the scheduler tries to balance jobs between those two resources.
In order to achieve this you have to give resource A in the complex configuration (qconf -mc) the same amount of urgencies (for example 100000) as for the resource B. Then you have to add both resources in new the scheduler configuration parameter „fair_urgency_list“.