IBM Support

Tuning Prestart Jobs

Troubleshooting


Problem

This document contains information on how to approach tuning IBM i OS Prestart Jobs for performance enhancement.

Resolving The Problem

Before you tune prestart job settings, several questions should be answered. After these questions are answered, the tuning process is relatively straightforward. The questions include the following:

1.

How many processes are requesting the prestart job? Remember that some applications make multiple prestart job requests per instance.
2. How fast do the processes need to be for the users?
3. How many of these processes are starting at or near the same time?
4. How many of these processes are starting right after the subsystem comes up?
5. Is there a large turnover in these processes (many starting and many ending)? How many and over what time period?
These numbers are not always easy to obtain. Each implementation is unique because of the characteristics of the users and applications. It might be necessary to observe the current behavior of the prestart job for a while before you try to tune it. When you observe the job, it is important to note how many jobs are in Prestart Request Wait (PSRW) status, how many are in another status (DEQW, TIMW, SELW, RUN, and so on), and how often they move from one status to the other. In operating system versions V5R2 and later, the command DSPACTPJ can help determine this. PSRW status means that the prestart job is waiting to service a request. When it starts to service a request, the status changes to DEQW, TIMW, SELW, RUN, or some other status. It is important to note that when you use the WRKACTJOB command to observe prestart jobs, the F14 key must be pressed to see jobs in PSRW status.

Tuning the prestart job is done by using the CHGPJE (Change Prestart Job Entry) command. The parameter descriptions for this command are listed below. To see the current settings for these parameters, go to the prestart job entries section of the subsystem description (WRKSBSD command).
 
INLJOBS - Initial number of jobs This value is the number of prestart jobs that are started when the subsystem is started. They are be in PSRW status until a client needs to be serviced. This value must be greater than or equal to the value of the Threshold (THRESHOLD) parameter. This value must also be less than or equal to the value of the Maximum number of jobs (MAXJOBS) parameter. This value should be tuned to ensure an adequate number of jobs to handle the initial work load when the Subsystem is started, or to handle a peak number of requests.
THRESHOLD - Threshold This value is the lowest number of jobs you would like to see in PSRW status. When the number of jobs in PSRW status goes down to or below this number, more jobs are started. The number to be started is the value of the Additional number of jobs (ADLJOBS) parameter. The value specified on this parameter must be less than or equal to the value specified on the Initial number of jobs (INLJOBS) parameter. This value should be tuned to ensure an adequate number of jobs to handled the expected number of requests at one time.
ADLJOBS - Additional number of jobs This value is the number of prestart jobs started when the number of jobs in PSRW status drops below the THRESHOLD value. The value of this parameter must be less than the value specified on the Maximum number of jobs (MAXJOBS) parameter. This value should be increased if the threshold is reached often.
MAXJOBS - Maximum number of jobs This value is the maximum number of a particular prestart job that can be active (in any state). This value must be greater than the value of the Initial number of jobs (INLJOBS) and also the value of the Additional number of jobs (ADLSJOBS) parameters.
MAXUSE - Maximum number of uses This value is the number of times the job can be used (going from PSRW status to DEQW status and back again) before it is ended by the subsystem. If this value is set to *NOMAX, the prestart job does not end until the subsystem ends or there are too many prestart jobs in a PSRW status (determined by the system). Most situations call for a value less than *NOMAX.
WAIT - Wait for job This setting determines whether a program request waits for a job to start (if one is not already in PSRW status). If the value is *NO, then the request is rejected if there is no prestart job available (in PSRW status). If the value is *YES, then a job is started. Because the job starts when needed and not sometime before it is needed it cannot be considered a prestart job. It is now considered a batch job; a type of BCI rather than PJ.

Note: It is possible because of the workload that many prestart jobs could be sitting in a PSRW status. The operating system has a way of dealing with this situation. Every 10 minutes the subsystem compares the number of prestart jobs in a PSRW status with the value in the INLJOBS parameter for that prestart job. If this number is more than double, the INLJOBS parameter then the subsystem ends one-half of the prestart jobs. Because this purge happens every 10 minutes, the number of prestart jobs in PSRW status eventually goes down to somewhere between the INLJOBS parameter and double the INLJOBS parameter. This setting cannot be configured by the customer.

To activate changes made to this command, it is recommended that the prestart job is ended by using the ENDPJ command and started again with the STRPJ command.

Additional information about prestart jobs can be found in IBM Documentation:  https://www.ibm.com/docs/en/i/7.5?topic=jobs-tuning-prestart-job-entries
 

[{"Type":"MASTER","Line of Business":{"code":"LOB57","label":"Power"},"Business Unit":{"code":"BU058","label":"IBM Infrastructure w\/TPS"},"Product":{"code":"SWG60","label":"IBM i"},"Platform":[{"code":"PF012","label":"IBM i"}],"Version":"6.1.0"}]

Historical Number

22350808

Document Information

Modified date:
22 July 2022

UID

nas8N1017503