Skip to main content
Skip table of contents

Job Queue Manager Priority

This section describes how you can configure how Job Queue Manager prioritises jobs.

Configure the Next Job Selector Strategy

The next job selector strategy determines how Job Queue Manager selects jobs for processing:

Cell Count Based Queue Time Ordering Strategy

This strategy calculates a priority value for each job when it is initially queued, and stores this in the database.

The job priority is calculated based on the job cell count and the number and size of jobs the submitting user has already queued. Jobs with a higher priority value will be processed first.

Negative priority values are reserved for external prioritisation. A job will never be automatically assigned a negative priority, but if you need to force a job to be processed next, you can edit the priority in the database and set it to a negative value.

Cell Count Based Select Time Ordering Strategy

(Default). This strategy recalculates the job priorities each time it selects a new job.

This strategy also allows negative priority values for external prioritisation. Jobs with a negative priority value will be processed first.

Provided there are no jobs with negative priority, the next job is calculated by summing the following three factors:

  1. The cell count multiplied by the tabulation cost factor for this dataset, adjusted by a "half-life" value (to ensure that very large tables are not delayed indefinitely).
  2. The time that has elapsed since the job was queued, adjusted by the "half-life" value.
  3. The fraction of currently queued jobs submitted by the same user.

Configure the Half-Life Values

If you are using the default Cell Count Based Select Time Ordering Strategy, then you can adjust the half-life values by editing <tomcat_home>\webapps\queuedjobservice\WEB-INF\config\common\service-config.xml in a text editor. The half life value is used to ensure that very large tables are not delayed indefinitely.

Adjust the values in the following section:

XML
    <bean id="nextJobSelector" class="au.com.str.jobqueue.common.strategies.CellCountBasedSelectTimeOrderingStrategy" >
        <property name="cellCountHalfLife" value="1000000"/>
        <property name="hoursInQueueHalfLife" value="8"/>
    </bean>

Set the Dataset Tabulation Cost Multiplier

To configure the cost multiplier for individual datasets, use the following command in SuperADMIN:

CODE
cfg db <dataset_id> superweb2.tabulationCostMultiplier set <value>

Setting a higher value will cause jobs for this dataset to take priority over datasets with a lower priority value.

For example:

CODE
cfg db bank superweb2.tabulationCostMultiplier set 5


Change the Job Selector Strategy

If you want to change from the default strategy to Cell Count Based Queue Time Ordering Strategy, you need to make the following changes:

  1. Open the Job Queue Manager configuration file <tomcat_home>\webapps\queuedjobservice\WEB-INF\config\common\service-config.xml in a text editor.
  2. Locate the following section:

    XML
    <!--<bean id="nextJobSelector" class="au.com.str.jobqueue.common.strategies.CellCountBasedQueueTimeOrderingStrategy"/>-->
  3. Remove the comments:

    XML
    <bean id="nextJobSelector" class="au.com.str.jobqueue.common.strategies.CellCountBasedQueueTimeOrderingStrategy"/>
  4. Locate the following section:

    XML
        <bean id="nextJobSelector" class="au.com.str.jobqueue.common.strategies.CellCountBasedSelectTimeOrderingStrategy" >
            <property name="cellCountHalfLife" value="1000000"/>
            <property name="hoursInQueueHalfLife" value="8"/>
        </bean>
  5. Comment out the selector:

    XML
    <!--    <bean id="nextJobSelector" class="au.com.str.jobqueue.common.strategies.CellCountBasedSelectTimeOrderingStrategy" >
            <property name="cellCountHalfLife" value="1000000"/>
            <property name="hoursInQueueHalfLife" value="8"/>
        </bean>  -->
  6. Open the SuperWEB2 configuration file <tomcat_home>\webapps\webapi\WEB-INF\config\data-access-config.jqm.xml in a text editor.
  7. Locate the following section:
     

    XML
    <!-- <bean id="priorityCalculation" class="au.com.str.jobqueue.common.strategies.CellCountBasedQueueTimeOrderingStrategy"/> -->
  8. Remove the comments:

    XML
    <bean id="priorityCalculation" class="au.com.str.jobqueue.common.strategies.CellCountBasedQueueTimeOrderingStrategy"/>
  9. Locate the following section:

    XML
    <bean id="priorityCalculation" class="au.com.str.jobqueue.common.strategies.CellCountBasedSelectTimeOrderingStrategy" />
  10. Comment out the selector:

    XML
    <!-- <bean id="priorityCalculation" class="au.com.str.jobqueue.common.strategies.CellCountBasedSelectTimeOrderingStrategy" /> -->
  11. Save your changes and restart SuperWEB2 and Job Queue Manager.

Configure the Priority of Job Queue Manager Jobs Relative to Other Tabulations

The following setting in the Job Queue Manager configuration file <tomcat_home>\webapps\queuedjobservice\WEB-INF\config\common\service-config.xml is used to configure the relative priority of all Job Queue Manager jobs compared to tabulations submitted directly through SuperWEB2.

This factor is applied to the priority of all Job Queue Manager jobs, and it is recommended to leave this set to a high negative value to ensure that tabulations submitted directly through SuperWEB2 have priority over Job Queue Manager.

CODE
<property name="tabulationPriority" value="-10000" />
JavaScript errors detected

Please note, these errors can depend on your browser setup.

If this problem persists, please contact our support.