Skip to main content

Managing Categories

A category is an independent pool of worker jobs for the Work Queue Manager. When you initialize a set of worker jobs, you can specify the category that supplies the workers. If any of the worker jobs in the set request additional worker jobs while executing work items, then the new worker jobs are from the same category.

Each work category always has at least one worker job available to immediately process work items. The category also has a maximum number of additional worker jobs that can be simultaneously working.

For example, suppose that you assign a maximum of eight workers to the SQL category supplied by the system. Then, suppose that you create a category for processes related to building Business Intelligence cubes, and assign a maximum of four workers to that category. Then whatever processing is occurring in the SQL category, the workers in the BusinessIntelligence category are available to process their work items immediately.

System Categories

The system includes three categories that you cannot delete:

  • The SQL category is used for SQL query processing performed by the system, including parallel processing of queries.

  • The Default category supplies worker jobs when you initialize a set of worker jobs without specifying a category.

  • The Utility category supplies worker jobs for tasks related to tuning tables and schemas and building and validating indices.

Category Properties

Each category has properties that affect the behavior of each work queue in the category. These properties are:

DefaultWorkers

When a work queue in this category is created and no worker job count is specified, this becomes the number of worker jobs in the work queue. The default value for this property is the number of cores.

MaxActiveWorkers

Maximum number of active worker jobs kept in the pool of jobs servicing requests in this category (in addition to the one job that is always available). Idle jobs are detected and new jobs are started automatically to keep the maximum active job number around this limit. The Work Queue Manager considers blocked workers, such as ones waiting for I/O or for a LOCK, as workers that are not active. For example, if MaxActiveWorkers is 10 and there are 5 active jobs and 5 blocked jobs, the Work Queue Manager starts up to 5 additional workers to try to have 10 active workers.

The default value is twice the number of cores.

MaxWorkers

Maximum number of workers jobs for a work queue in this category. If you specify a larger number of worker jobs when creating the work queue, this limit is used instead. The default is twice the number of cores.

MaxTotalWorkers

If specified, this is the maximum number of workers that the Work Queue Manager will start for this category.

For I/O intensive workloads, the MaxActiveWorkers setting does not make sense as the workers will mostly be idle waiting for the I/O to complete. In such cases, it makes more sense to limit the maximum total number of workers that can be started.

If MaxTotalWorkers is specified, this value is used in addition to the MaxActiveWorkers. The Work Queue Manager first calculates the number of workers based on the MaxActiveWorkers setting and then limits the number of workers based on the MaxTotalWorkers setting.

This setting is available only via the Config.WorkQueuesOpens in a new tab API.

AlwaysQueue

Controls whether a newly created group immediately receives at least one worker. By default, when a worker group is created in a category, it immediately receives at least one worker, even if that requires the Work Queue Manager to start a new worker. If AlwaysQueue is true for a category, then when a worker group is created in a category, if all workers are currently busy, the new group does not receive a worker until another worker has become free.

This setting is available only via the Config.WorkQueuesOpens in a new tab API.

Creating, Modifying, and Deleting Categories

You can create categories, adjust category properties, and delete custom categories in the Management Portal. See Configuring Work Queue Manager Categories.

If you prefer, you can also work with categories using the Config.WorkQueuesOpens in a new tab APIs.

FeedbackOpens in a new tab