Hitachi

JP1 Version 12 JP1/Automatic Job Management System 3 System Design (Work Tasks) Guide


7.10.2 Notes on the execution priority of jobs

JP1/AJS3 specifies the execution priority for jobs (PC jobs including queueless jobs, Unix jobs, HTTP connection jobs, QUEUE jobs executed in JP1/AJS3, and custom jobs). For flexible jobs and action jobs, the execution priority is specified by setting a priority for the upper-level jobnet.

You can set None, 1, 2, 3, 4, or 5 as the execution priority. If the execution priority of a job and of all upper-level jobnets is set to None, the execution priority of that job is assumed to be the value specified for the DEFAULTPRIORITY environment setting parameter. If the execution priority of a job executed from JP1/AJS3 and of all upper-level jobnets is set to None, and if no value is specified for the DEFAULTPRIORITY environment setting parameter, then the execution priority of that job is assumed to be 1. For details about the DEFAULTPRIORITY environment setting parameter, see 20.4.2(108) DEFAULTPRIORITY in the JP1/Automatic Job Management System 3 Configuration Guide. See the following notes to determine whether you need to change the job and the jobnet execution priority for your system environment and operating conditions.

The following subsections describe the values that JP1/AJS3 sets for jobs according to the execution priority of jobs in Windows and UNIX.

Organization of this subsection

(1) Job execution priorities and the priority values that JP1/AJS3 assigns to jobs (in UNIX)

In UNIX, JP1/AJS3 assigns a nice value that corresponds to the execution priority of the job. The base value from which a job's execution priority is determined differs depending on which of Standard or Queueless Agent is specified as the execution service.

(a) When Standard is specified as the execution service

When Standard is specified as the execution service for the job, the nice value of a job executed by JP1/AJS3 is based on the nice value# of the JP1/AJS3 service when it starts (when you executed the jajs_spmd command). A job's nice value is assigned by adding to or subtracting from this base value, according to the execution priority specified for the job.

#

The nice value at startup of the JP1/AJS3 service is the default value assigned by the OS when it started the process. The maximum and minimum nice values that can be assigned depend on your operating system. For details about the default nice value assigned by the OS, and the maximum and minimum assignable values, see the documentation for your operating system and the UNIX reference documentation.

The following table shows an example of the correspondence between job execution priorities specified in JP1/AJS3 and the nice values assigned to jobs. In this example, the operating system is HP-UX, Standard is specified as the execution service for the job, and the default nice value to the JP1/AJS3 service at startup is 20.

Table 7‒10: Job execution priorities and the nice values assigned to jobs (when Standard is specified as the execution service)

Execution priority

nice value assigned to the job

When the nice value of JP1/AJS3 service is 20

1

nice value + 20

39

2

nice value + 10

30

3

nice value

20

4

nice value - 10

10

5

nice value - 20

0

If no value is specified for the execution priority of a job, the execution priority of that job is assumed to be the value specified for the DEFAULTPRIORITY environment setting parameter. In this case, the job is assigned a nice value of 39. This value is determined by adding 20 to the nice value of the JP1/AJS3 service (20 by default). System restrictions in this case mean that nice values are capped at 39, and cannot be lower than 0.

(b) When Queueless Agent is specified as the execution service

When Queueless Agent is specified as the execution service, the job's nice value is not based on that of the JP1/AJS3 service. In this case, JP1/AJS3 sets 39, 30, 20, 10, or 0 (in the Linux, JP1/AJS3 sets 19, 10, 0, -10, or -20) as the nice value according to the execution priority, where 0 corresponds to the highest priority. To change a job's nice value, specify the job execution priority that corresponds to the nice value that you want to assign.

The following table shows the correspondence between job execution priorities specified in JP1/AJS3 and the nice values assigned to jobs, when Queueless Agent is specified as the execution service.

Table 7‒11: Job execution priorities and the nice values assigned to jobs (when Queueless Agent is specified as the execution service)

Execution priority

nice value assigned to job#

1

39

2

30

3

20

4

10

5

0

#

In Linux, nice values in the range from -20 to 19 can be assigned. JP1/AJS3 sets 19, 10, 0, -10, or -20 according to the execution priority, where 19 corresponds to the lowest priority.

(2) Job execution priorities and the values that JP1/AJS3 assigns to jobs (in Windows)

In Windows, JP1/AJS3 sets one of three job execution priorities. The following table shows the correspondence between job execution priorities and the base priorities of Windows. You can use Task Manager to check the base priority.

Table 7‒12: Job execution priorities and Windows base priorities

Job execution priority

Base priority assigned to job

1

Low

2

3

Normal

4

High

5

The following describes the priority class that JP1/AJS3 sets based on the job execution priority when it starts the job process.

(3) Changing the job execution priority

The execution priority of a process started directly from a service or console and not through JP1/AJS3 depends on the operating system. In Windows, the process is assigned the Normal base priority, which is equivalent to the priority of interactive processing. In UNIX, the process is executed with a nice value of 20 (in Linux, with a nice value of 0). If you want jobs executed from JP1/AJS3 to have the same execution priority as these processes, you must set the job execution priority to 3. Use either of the following methods to change a job's execution priority.

In these examples, the job execution priority is set to 3:

(a) For PC jobs including queueless jobs, Unix jobs, HTTP connection jobs, QUEUE jobs executed in JP1/AJS3, and custom jobs.

You can change the execution priority by using either of the following methods:

  1. In the Define Details - [unit-name] dialog box for the job in question, on the Definition page, specify 3 in Priority.

  2. In the Define Details - [unit-name] dialog box for the job in question, on the Definition page, specify None in Priority. Then, in the Define Details - [jobnet] dialog box for the upper-level jobnet, such as the root jobnet, on the Definition page, specify 3 in Priority.

(b) For flexible jobs and action jobs

You can change the execution priority by using the following method:

  1. In the Define Details - [jobnet] dialog box for the upper-level jobnet (for example, the root jobnet), on the Definition page, specify 3 in Priority.

(c) If the execution priority of a job and of all upper-level jobnets is set to None

You can change the default execution priority level of a job by using the following method:

  1. Specify 3 in the DEFAULTPRIORITY environment setting parameter.

    For details about procedure for setting the environment setting parameter, see 4.2 Environment setting parameter settings in the JP1/Automatic Job Management System 3 Configuration Guide (for Windows) or 14.2 Environment setting parameter settings in the JP1/Automatic Job Management System 3 Configuration Guide (for UNIX).

  2. In the Define Details - [unit-name] dialog box for the job in question and in the Define Details - [jobnet] dialog box for the upper-level jobnet (for example, the root jobnet), on the Definition page, specify None in Priority.

(d) Cautionary note

In UNIX, if a user without superuser permission tries to execute a job with a job execution priority of 4 or 5, a permission error occurs.

Also, if you assign jobs a higher execution priority than other non-job processes, some jobs might monopolize system resources and slow down the entire JP1/AJS3 system. This is the opposite situation to that described in 2.1.4(2) Execution priority. Carefully consider the system environment and operating conditions before you assign jobs a higher priority than other processes.