Open topic with navigation

TIBCO iProcess® Engine 11.9.1

# Configuring the Assignment of Queues to WIS Processes

When iProcess Engine starts up, the `WQS` process is responsible for assigning all the work queues to `WIS` processes.

By default, queues are assigned to `WIS` processes dynamically, using the `round-robin` or `on-demand` method (as determined by the WQS_ROUND_ROBIN parameter in the `staffcfg` file, which is located in the `SWDIR``\etc` directory- see WQS_ROUND_ROBIN):

| • | `Round-robin`. This method assigns a work queue to each `WIS` process alphabetically, cycling around until all work queues are assigned. For example, if a system has 5 `WIS` processes and 20 work queues A to O then:

| — | queues A, F, K are allocated to `WIS` process 1,

| — | queues B, G, L are allocated to `WIS` process 2,

| — | queues C, H, M are allocated to `WIS` process 3, etc.

The `round-robin` method takes no account of queue size. It is best used when the messages are fairly evenly distributed between the majority of queues and user access is also evenly spread.

| • | `On-demand`. This method assigns work queues to `WIS` processes based on cost. All work queues have a weighting (determined by the WQS_QUEUE_WEIGHTING parameter) that determines the cost of the work queue to the `WIS` process. Queues are assigned to the `WIS` process with the lowest overall cost. The more work queues that are allocated to a `WIS` process, the higher the cost of the `WIS` process. So fewer new work queues are allocated to it. The cost calculation is as follows:

cost = wicount + (WQS_QUEUE_WEIGHTING * qcount)

where:

| — | wicount is the number of work items the `WIS` process is currently processing.

| — | qcount is the number of work queues the `WIS` process is currently processing.

The number of items in a work queue is taken from data that has been persisted to the `wqs_index` database table. If, for example, a new queue has been added to iProcess Engine after it has been started, it means the allocation of the work queues may not reflect the actual count of work items in the work queue. To overcome this, restart iProcess Engine. This results in the work queues being re-allocated according to the latest work item count.

To control how work queues are allocated to `WIS` processes, you can adjust the WQS_QUEUE_WEIGHTING parameter. This parameter changes the cost of a work queue to a `WIS` process. For example, the larger the value, the more that the number of work queues rather than the number of work items in the work queues determines whether a work queue is allocated to a `WIS` process. Therefore, if you have lots of work queues with an even amount of work items in each, you may want to increase the value of the WQS_QUEUE_WEIGHTING parameter. If you only have a few work queues that contain large amounts of work items, you may want to lower the value.

The effect of the on-demand assignment is that work queues are distributed across `WIS` processes based on their cost, so a more even distribution of work queues is achieved.

However, there are two additional methods you can use to customize the assignment process to better reflect your system requirements, and so optimize performance.

The following sections describe these methods.

## Using Different WIS Processes to Handle User and Group Queues

User queues and group queues frequently have different characteristics, in terms of the amount of load they carry.

For example, if group queues are far more active than user queues on your system, you may want to give them higher priority for `WIS` process allocation.

You can do this by specifying the WQS_WIS_USER_COUNT process attribute for the `WQS` process. This attribute defines the number of `WIS` processes that should be dedicated to handling user queues and group queues respectively (either as a fixed number or as a percentage of the available processes). See WQS_WIS_USER_COUNT for more information.

## Assigning a Queue Explicitly to a WIS Process

If you have certain queues that are very large or very busy, you may find it useful to dedicate specific `WIS` processes to handling only those queues (leaving the remaining queues to be dynamically assigned to the remaining `WIS` processes).

To dedicate a specific `WIS` process to handling a specific queue:

| 1. | Start the Process Administrator, and then start the User Manager. (See “Using TIBCO iProcess Administrator” in TIBCO iProcess Workspace (Windows) Manager's Guide for more information.)

| 2. | To make it possible to allocate queues to specific `WIS` processes, define a new attribute called `SW_WISINST`. This should have a Type of Numeric, with a Decimal value of 0.

See “Adding a New Attribute” in TIBCO iProcess Workspace (Windows) Manager's Guide for more information.

| 3. | To assign a queue to a specific `WIS` process, assign the `WIS` instance number that you want the queue to use as the value of the `SW_WISINST` attribute for that queue. (You can use the `swadm show_processes` command to list the available `WIS` instances - see Show Server Processes.)

See “Setting User Values for an Attribute” in TIBCO iProcess Workspace (Windows) Manager's Guide for more information.

| 4. | Save your changes, exit from User Manager, and perform a `MoveSysInfo` event to register your changes on iProcess Engine.

See “Moving System Information” in TIBCO iProcess Workspace (Windows) Manager's Guide for more information.

| 5. | If the queue is already in use (and therefore already allocated to a `WIS` process), you will need to stop and restart iProcess Engine before the change takes effect.

Once a `WIS` process has been dedicated to handling a specific queue or queues, it will handle only those queues. It is no longer available for dynamic queue allocation.

There is one exception to this: if all the available `WIS` processes are dedicated to handling specific queues, and a new queue is added, the queues are no longer treated as dedicated. This means that:

| • | the new queue will be dynamically assigned to the appropriate `WIS` process, according to the current dynamic allocation rules. All dedicated `WIS` processes are considered to be available to handle the queue. See Using Different WIS Processes to Handle User and Group Queues.

| • | the dedicated `WIS` processes continue to handle their assigned queues (but they may also have to handle the newly assigned queue as well).

## An Example of How to Use These Assignment Methods

By using the methods described above, you can configure your system to operate more efficiently under load. For example, consider a system that has 6 `WIS` processes (WIS 1-6), 8 group queues (GQ1-8), and 500 users (UQ1-500). Queue characteristics are:

| • | GQ1 has 100K items and is a holding queue (sometimes searched).

| • | GQ2 has 50K items and is the most active queue.

| • | GQ3-8 are all fairly busy with up 10K items in each.

| • | User queues are not used extensively.

The system is now configured as follows:

| • | GQ1 is assigned to `WIS` `1`.

| • | GQ2 is assigned to `WIS` `2`.

| • | WQS_WIS_USER_COUNT is set to 2

This means that:

| • | The two biggest queues, GQ1 and GQ2, are each handled by their own dedicated `WIS` process, `WIS 1` and `WIS 2`.

| • | The remaining 6 group queues, GQ3 to GQ8, are handled by 2 of the 4 remaining `WIS` processes. The queues are dynamically assigned to `WIS` processes.

| • | The remaining 2 WIS processes handle the 500 user queues. The queues are dynamically assigned to `WIS` processes.

Did you find this helpful?

Yes No
Great!
Thanks for taking the time to give us some feedback.
Sorry about that

Why wasn't this helpful? (check all that apply)

Could not find what I was looking for
Instructions confusing or unclear
Instructions did not work

Want to tell us more?

Please select at least one option or provide details about the issue!!

Error occurred while submitting feedback.

Error2 occurred while submitting feedback.

TIBCO iProcess® Engine

Copyright © 1994-2024. Cloud Software Group, Inc. All Rights Reserved.