Skip to main content

JobServers

Set the number of job servers.

Synopsis

[Startup]    JobServers=n

n is an integer in the range 0—2000. The default value is 0.

Description

The JobServers parameter sets both the target number of available job servers you want to maintain and the number that are created at startup. It is not the total number of job servers. When the number of available job servers falls below the target number, more job servers are created in order to maintain the number of available job servers.

Having a large number of job servers running will use more memory and processes, but allows for much faster jobbing of processes because InterSystems IRIS doesn't have to start the processes at the system level and then initialize them.

You can use the ^JOBSRV routine to display information about job servers including the configuration and the number of job servers.

System Behavior

When job servers are enabled, the system runs a monitor process every 5 seconds to determine the number of available job servers. If the number of available job servers is below the target number, more job servers are created until the target is reached.

Every 3 minutes, the monitor also checks if the number of available job servers exceeds the target number. If it does, it stops a single job server. However, the total number of running job servers will never be decreased to fewer than the number set by the JobServers parameter.

If the JobServers parameter is changed to 0 (disabling job servers), the monitor immediately stops all available job servers and continues to stop utilized job servers as they become available.

When utilized job servers complete their work, they are automatically returned to the available pool.

Determining the Target Number

The system will maintain a number of available job servers based on an effective target number. The effective target number is determined by whichever is smaller: the parameter or the dynamic target number determined by the total number of job servers (see the table below). For example, if you set JobServers=7, the effective target number will be 5 when there are fewer than 20 total job servers and 7 when there are 20 or more. The examples below illustrate this in more detail.

Total Number of Job Servers Dynamic Target Number
1 – 4 determined by the parameter
5 – 19 5
20 – 99 10
100+ 20

Examples

Parameter: JobServers=4

Every time a new process starts, it uses one of the available job servers, so the system creates a new job server.

  Parameter Dynamic Target Effective Target Available Utilized Total
On Startup 4 N/A 4 4 0 4
1 process 4 N/A 4 4 1 5
5 processes 4 N/A 4 4 5 9
Parameter: JobServers=12

The system initially starts with 12 available job servers, but an effective target of 5. When the number of available job servers drops below 5, more are created to maintain the effective target number.

When 15 of the job servers are utilized, the system reaches 20 total job servers (15 utilized and 5 available). This causes the effective target to increase to 10, so the system creates 5 additional job servers. The system now has 25 total job servers (15 utilized and 10 available).

When 90 of the job servers are utilized, the system reaches 100 total job servers (90 utilized and 10 available). This causes the dynamic target to increase to 20. Since the parameter is not less than the dynamic target, it becomes the effective target. The system only creates 2 additional job servers in order to meet the effect target of 12.

  Parameter Dynamic Target Effective Target Available Utilized Total
On Startup 12 5 5 12 0 12
10 processes 12 5 5 5 10 15
15 processes 12 5 → 10 5 → 10 5 → 10 15 20 → 25
30 processes 12 10 10 10 30 40
90 processes 12 10 → 100 10 → 12 10 → 12 90 100 → 102
150 processes 12 100 12 12 100 112
Parameter: JobServers=100

The system initially starts with 100 available job servers, but an effective target of 20. Once the number of available job servers is reduced to the effective target number (as they are utilized), the system begins creating new job servers to maintain the number available.

  Parameter Dynamic Target Effective Target Available Utilized Total
On Startup 100 20 20 100 0 100
50 processes 100 20 20 50 50 100
80 processes 100 20 20 20 80 100
90 processes 100 20 20 20 90 110

Changing This Parameter

On the Startup page of the Management Portal (System Administration > Configuration > Additional Settings > Startup), in the JobServers row, select Edit. Enter a number of job servers.

Instead of using the Management Portal, you can change JobServers in the Config.StartupOpens in a new tab class (as described in the class reference) or by editing the CPF in a text editor (as described in Editing the Active CPF).

FeedbackOpens in a new tab