Hitachi

JP1 Version 12 JP1/Automatic Job Management System 3 Administration Guide


9.3.1 Reorganizing the ISAM database

The ISAM database consists of a data file, which contains the data, and a key file, which manages data indexing for faster access. In ISAM, when you delete records, the area for the deleted records becomes unavailable, but file sizes are not automatically reduced.

When the ISAM database is used, file sizes grow with continued daily operation, with the result that the larger file sizes and file fragmentation degrade the execution performance of jobs. In addition, if the system is forced to stop because of a sudden power failure, the ISAM file index might become inconsistent.

You can eliminate these problems by reorganizing the ISAM database at an appropriate time according to the number of QUEUE jobs and submit jobs.

Note that JP1/AJS3 - Agent does not need reorganization because it does not have a JP1/AJS3 database.

Cautionary notes
  • Reorganization using the automatic reorganization script (jpqautocond) in a maintenance mode

    The drive or partition containing the work directory of the target physical host or logical host requires free space that is about twice as large as the largest ISAM file that will be reorganized. The script uses the following directory as the work directory during reorganization.

    In Windows:

    Work folder used when the manager process is executed in the execution environment for QUEUE jobs and submit jobs

    In UNIX:

    Work directory used when the manager process specified in the WorkPath environment setting parameter is executed

    In addition, the drive or partition containing the database directory for the execution environment for QUEUE jobs and submit jobs requires free space that is about as large as the largest ISAM file that will be reorganized.

  • Reorganization using the jpqdbcond command

    Before performing reorganization, back up and save the files. The jpqdbcond uses the directory specified in the -d option as its work directory. The drive or partition containing the directory specified in the -d option requires free space that is about twice as large as the largest ISAM key file that will be reorganized in the job execution environment. The drive or partition containing the directory for the job execution environment database requires free space that is about as large as the largest ISAM file that will be reorganized in the job execution environment.

    If the -d option is not specified, the command uses the standard work directory of the OS. For more information, see the explanation of the Jiscond command in the JP1/Base User's Guide.

Organization of this subsection

(1) Reorganization using the jajs_maintain command

In JP1/AJS2 - Manager 07-00 or later and JP1/AJS3 - Manager, you can use the jajs_maintain command to perform ISAM database maintenance (reorganization) by placing the manager functionality in reduced-operation mode. When the functionality is in reduced-operation mode, a database disconnection request is sent to the running service, after which the ISAM database can be reorganized safely after the database is disconnected.

To reorganize the ISAM database, we recommend that you use the jajs_maintain command.

For details about the jajs_maintain command, see jajs_maintain in 4. Commands Used for Special Operation in the manual JP1/Automatic Job Management System 3 Command Reference.

(2) Reorganization using the jpqautocond script

For the database for the execution environment for QUEUE jobs and submit jobs, job information records for which the specified number of days for saving job information has passed are automatically deleted. When the records are deleted, the area for the records becomes unavailable. Although the data storage area is reused, the unavailable area remains in the key file unless the key reuse functionality for the ISAM file is enabled. You can release the used disk area by reorganizing the database. Database reorganization also improves performance that might be degraded when access to a database that contains many unavailable areas requires more inputs and outputs.

To reorganize the job execution environment database, use the jpqautocond script.

You can also use the jpqdbcond command to reorganize the database for the execution environment for QUEUE jobs and submit jobs. Before using this command, however, you need to back up the database. For details about the jpqdbcond command, see jpqdbcond in 3. Commands Used for Normal Operations in the manual JP1/Automatic Job Management System 3 Command Reference.

(a) Displaying the percentage of unused area and when to perform reorganization

You can use the jpqdbcond -l command to check the percentage of unused area in the database for the execution environment for QUEUE jobs and submit jobs. If the ISAM file is being used, you can use the jpqdbcond -L command to check the percentage of unused area. Note, however, that the value of the percentage of unused area displayed by the jpqdbcond -L command includes an error. Use the jpqdbcond -L command only if there are not many jobs running.

The following gives an idea of how much unavailable area increases each day when the key reuse functionality for the ISAM database is not enabled. If 10,000 jobs are executed a day and job information is saved for 7 days, unavailable area will increase by a maximum of 86 MB each day after the job information retention period has expired. This unavailable area includes area in the re-used data file.

If the size of the unavailable area in the key file becomes large during operation, performance might degrade because the time required for file input and output for database access increases.

To make sure that the file size does not exceed 20 MB, monitor the JPQJOBINFO.K02 file in the database for the execution environment for QUEUE jobs and submit jobs. If you continue operation after 20 MB is exceeded, performance could suddenly degrade.

When the key reuse functionality is used, the file size will most likely not reach 20 MB. However, we recommend that you monitor the file size because 20 MB might be reached if the usage efficiency within the key file degrades because of extended operation.

To determine when to reorganize a database, also use the number of days for saving job information. For details about the number of days for saving job information, see 20.5 Setting up the job execution environment in the JP1/Automatic Job Management System 3 Configuration Guide.

(b) Outputting the unused area size and unused area threshold

You can use the jpqdbcond -i command to check the size of the unused area in the database for the execution environment for QUEUE jobs and submit jobs. The unused area size is output as a notification message.

You can also use the jpqdbcond -t command to check whether the size of the unused area has reached a threshold. If the unused area size reaches the threshold, a warning message is output.

The warning message can be output to the following destinations, of which one or more can be selected:

  • Standard error output

  • Windows event log or syslog

  • JP1 event

By defining and executing the jpqdbcond -t command as a job when not many jobs are running, you can periodically check the status of the ISAM file.

(c) Reorganization procedure

To reorganize the database for the execution environment for QUEUE jobs and submit jobs:

  1. Stop the JP1/AJS3 service.

  2. Set the JP1_HOSTNAME environment variable.

    To reorganize the database on a logical host, specify the logical host name for the JP1_HOSTNAME environment variable.

    When you want to reorganize the database on the physical host, do not set the JP1_HOSTNAME environment variable.

  3. Execute the following script or the jpqdbcond command.

    In Windows:

    JP1/AJS3-installation-folder\bin\jpqautocond.bat

    In UNIX:

    /opt/jp1ajs2/bin/jpqautocond

    Cautionary note

    Do not execute the following scripts and command at the same time:

    - jpqautocond

    - jpqdbcond -x -k

    - jajs_maintain -m manager