Scheduling Jobs in Sun Gridengine

The information on this page is derived from where the scheduling mechanism of SGE is explained in more detail. In preparing this page the local settings of scheduler parameters were taken into account.

Scheduling order

Sun Grid Engine does assign tickets to each job according to 4 high level policies. The sum of the tickets a job does receive according to these policies determines the sort order in the scheduling queue. The scheduler attempts to dispatch the job with the most tickets first. If the resources requested by the job are temporarily not available, the next job in turn is tried. For these reasons a submitted job can be scheduled ahead of other jobs submitted before or scheduling can be postponed.

Policies to obtain tickets

As already mentioned there are 4 policies to assign tickets to jobs:

The other two of the policies are used in exceptional cases only:

Currently SGE is configured such that the share tree tickets do have a fairly big influence on the overall scheduling policy. Furthermore the number of tickets a job does receive does depend on the resources requested. The parameters mem and cpu are used in the calculation. Here mem is the memory requested multiplied by the wallclock time requested (h_vmem*h_rt) and cpu is the wallclock time requested (not the cpu time!). Currently our configuration does give the cpu parameter a much bigger weight than the mem parameter.

Taking these facts into account one can see how a job can be scheduled fast:

Queue and host selection

If there is more than one host and more than one queue suitable for a given job, then the host with the lowest load is selected and on the host one of the queues available is taken to schedule the job. Therefore as long as there is more than one slot in the batch system that meets the job requirements, the queue chosen depends on the load of the hosts and NOT on the queue parameters such as the maximum cpu or wallclock time allowed in a queue.

A user can manually select a queue but it should become clear that this way the chances for scheduling a job cannot become better.

Conclusions for submitting jobs

BatchSchedulerStrategy (last edited 2008-11-04 22:13:17 by WolfgangFriebel)