Estimating overall memory (REGION)

The REGION parameter (in conjunction with MEMLIMIT) establishes a maximum limit on the memory that a job can use.

We recommend that you specify the REGION parameter as 0M for Log Master jobs. This value allocates the maximum amount of memory allowed for a job in your environment. Log Master then uses only the memory that it needs.

However, in some environments, individual users are not permitted to set REGION to 0M, or entering a value of 0M results in an allocation that is too small for practical use. In this situation, you can estimate the value to use for the REGION parameter. For the purposes of this explanation, assume that a set of tables are stored in a compressed table space. A Log Master job

  • Scans the log once, reading Db2 log files listed in the bootstrap data set (BSDS)

  • Produces a load file for input to an application program

  • Generates a summary report used to monitor data volume

To estimate a value for the REGION parameter, estimate maximum limits for each portion of memory that Log Master uses, and add the estimates. For convenience, convert all estimate values to kilobytes (KB, represented as K). Log Master allocates the following portions of memory:

To obtain the key store value

  1. Determine the value of the KSMEMORY installation option by examining the output messages of an existing Log Master job.

    The following is a sample BMC097799 message showing the KSMEMORY value:

    BMC097799I KSMEMORY = (40960K,10240K)      (IN MEMORY KEYED STORAGE SIZE)
  2. Examine the SYSIN syntax of the job, checking for the MEMORY keyword on the STOREOPTS statement, as in the following sample:

    STOREOPTS MEMORY (80M, 10M)
  3.  If the syntax includes the STOREOPTS MEMORY keyword, use that value. Otherwise, use the value of the KSMEMORY installation option.

To obtain the I/O buffer value

  1. Determine the number of data sharing members in your environment.

    If you do not know this value, consult your Db2 systems personnel.

  2. Examine the SYSIN syntax of an existing Log Master job, checking for the LOGTAPES keyword of the LOGOPTS statement, as in the following sample:

    LOGOPTS LOGSORT WHENEVER LOGTAPES (2) 
    
    BMC097799I LOGTAPES = 4               (MAX MOUNTS FOR PARALLEL SORTS)
  3. If the syntax includes the LOGTAPES keyword, use that value. Otherwise, use the value of the LOGTAPES installation option.
  4. Compare the number of data sharing members to the LOGTAPES value.
    • If the LOGTAPES value is zero, use the number of data sharing members.

    • If the LOGTAPES value is greater than zero, compare it to the number of data sharing members and use the lower value.

  5. Determine the total number of log scans in the job by examining the SYSIN syntax and counting the number of LOGSCAN statements. This explanation contains one log scan.
  6. Determine the total number of sort actions required by the job by examining the SYSIN syntax.

    In general, count one sort action for each type of output file (SQL, logical log file and so forth), and one sort action for each report that each log scan produces. Logical log output files do not require a sort action. This explanation contains two types of output, so the value would be two. For more information about numbering sort work data sets, see the section about building and running Log Master jobs in the Building and running BMC AMI Log Master jobs.

  7. Add the values from Step 4 through Step 6.
  8. Multiply the total obtained in Step 7 by 768 KB.

To obtain the sort actions maximum limit value

Multiply the total number of sort actions required by your job (the value in Step 6 of To obtain the I/O buffer value) by 6144 KB.

To calculate the total estimate

  1. Calculate your total estimate by adding the following values:
  2. If necessary, divide the total estimate by 1024 to obtain the value in megabytes (MB).
  3. Use the total estimate as the minimum REGION value on the JOB or EXEC statement in the new job’s JCL, or provide the total estimate to Db2 systems personnel.

Was this page helpful? Yes No Submitting... Thank you

Comments