Structure size for system log usage

You can use the z Systems® Coupling Facility Structure Sizer tool (CFSizer), or the formulas provided, to calculate storage requirements for the primary system log, DFHLOG, and the secondary system log, DFHSHUNT.

The CFSizer calculations assume that the coupling facility is at the current CFLEVEL. The formulas provided assume the coupling facility is at CFLEVEL 11.

You use the results of these calculations to set the coupling facility resource manager (CFRM) INITSIZE and SIZE parameters in the CRFM policy.

The primary and secondary log streams must be placed in different structures because of the large disparity in data volumes written to the primary and secondary system logs.

Generally, the volume of data that CICS® keeps in the primary system log at any one time is slightly greater than the amount written during one activity keypoint interval. This volume is determined by the activity keypoint frequency, which is measured in the number of write requests to the CICS system logstream output buffer, and defined on the AKPFREQ system initialization parameter. When you plan coupling facility structure sizes, review the value specified for the AKPFREQ parameter.

Using CFSizer to determine structure size

CFSizer is a web-based application that communicates with a coupling facility at a current CFLEVEL to calculate storage requirements. For primary and secondary system logs, it calculates suitable values for the INITSIZE and SIZE parameters. See System Z Coupling Facility Structure Sizer Tool (CFSizer).

To use CFSizer to calculate storage requirements for system logs, enter the following information:
Maximum buffer size
The size, in bytes, of the largest log block that can be written to a logstream. The value must be between 1 and 65532. This value corresponds to the MAXBUFSIZE value in the definition of the logstream coupling facility structure. See Defining coupling facility structures.
Average buffer size
The average size in bytes of log blocks written to all logstreams. This input is used to determine the initial entry to element ratio of the list structure. This value corresponds to the AVGBUFSIZE value in the definition of the logstream coupling facility structure. See Defining coupling facility structures.

Also, this value is available in the system logger reports produced by IXGRPT1 and IXGRPT1J. See Analyzing system logger data (SMF Type 88 records).

Highoffload
The high offload threshold of the logstream. When this percentage of the coupling facility structure is full, the system logger begins to offload data from primary storage to offload data sets. For CICS logstreams, this value is usually between 80 and 85. See Checking logstream status and LOWOFFLOAD and HIGHOFFLOAD parameters on log stream definition.

For more information about the offload threshold parameter, see z/OS MVS Setting Up a Sysplex.

Number of write requests per interval
The number of log blocks written to the logstream (the total from all systems that use the logstream) during the data collection interval. This value is available in the CICS statistics reports. See Logstream statistics and Logstreams reports.

Also, this value is available in the #WRITES INVOKED data in the system logger reports produced by IXGRPT1 and IXGRPT1J. See Analyzing system logger data (SMF Type 88 records).

Length of interval in seconds
The time interval in seconds over which the number of writes was collected. This value is available in the CICS statistics reports. See Statistics domain: Summary global statistics
Longest running task in seconds
The duration in seconds of the longest running transaction during the data collection interval. This is not the average response time.
Log tail deletes
The number of times CICS performed log tail deletion during the data collection interval. This value is available in the CICS statistics reports. See delete requests, stream deletes or logstream deletes in Logstream statistics and Logstreams reports. You can also determine this value by using joblog of the region and counting the number of DFHLG0743 messages that were issued during the interval.

Calculation of INITSIZE for DFHLOG

To calculate the INITSIZE value to use in the CFRM policy for the primary system log, use the following formula:
INITSIZE = 310 + ( LOGSNUM * A * B / 1024)
where:
  • A = 2000 + (number_of_entries + 5)
  • B = (AVGBUFSIZE * 1.1289) + 195
To calculate a value for number_of_entries, use the following formula:
number_of_entries =  ((akpintvl + trandur) * writespersec) / 0.9
where:
  • akpintvl is the interval between activity key points, which varies with workload. Calculate it as follows:
    akpintvl = AKPFREQ / ((N1 * R1) + (N2 * R2) + (Nn * Rn) )
    where:
    • N1, N2 .... Nn is the transaction rate for each transaction (transactions per second).
    • R1, R2 .... Rn is the number of log records written by each transaction.
  • trandur is the execution time (between sync points) of the longest-running transaction that runs as part of the normal workload.
    If this duration is longer than the akpintvl value, you have the following choices:
    • Increase the value of the AKPFREQ parameter, thus increasing the value of akpintvl, provided that the value does not result in an unacceptably large coupling facility structure size.
    • Change the application logic to cause more frequent sync points.
    • Calculate a structure size based on a shorter transaction duration, and accept that DASD offloading occurs when the long-running transaction is used.
  • writespersec = lesser of 25 or ((N1 * R1) + ... (Nn * Rn)), where:
    • N1, N2 .... Nn are the transaction frequencies (transactions per second) of the most frequently run transactions.
    • R1, R2 .... Rn is the number of log records written by each transaction.
To calculate the value of AVGBUFSIZE for the primary system log, DFHLOG, you can use the weighted average of the data logged by the most frequently run transactions in the system:
AVGBUFSIZE = (bytespersec / writespersec) + 48
where:
  • bytespersec = (N1 * D1) + (N2 * D2) + ... (Nn * Dn)
    • N1, N2 .... Nn are the transaction frequencies (transactions per second) of the most frequently run transactions.
    • D1, D2 .... Dn are the bytes of data logged by each transaction.
      You can calculate the amount of data (Dn) written to the system log for each transaction:
      Dn = Ns * syncreclen +
           Nfc * (fcrechdr + fcreclen) +
           Nts * (tsrechdr + tsreclen) +
           Ntd * (tdrechdr + tdreclen) +
           Nur * (urrechdr + urreclen)
      where:
      • Ns is the number of sync points per transaction; usually 1.
      • synreclen is the sync point record length.
      • Nfc, fcrechdr, fcreclen are the number of recoverable updates made, the length of the record headers, and the length of the records for file control, respectively.

        Count only READ UPDATE and WRITE ADD records. fcrechdr is 144 (136 bytes of record header plus 8 bytes of file name).

      • Nts, tsrechdr, tsreclen are for recoverable temporary storage updates.

        Count only TS PUT and TS UPDATE records. For TS PUT records, tsrechdr is 108, and tsreclen is 88. For TS UPDATE records, tsrechdr is 108, and tsreclen is 52.

      • Ntd, tdtrechdr, tdreclen are for recoverable transient data updates.

        tdrechdr is 108, and tdreclen is 380.

      • Nur, urrechdr, urreclen are for user records written to DFHLOG.

        urrechdr is 125.

  • See Writes per second calculation for details of how to calculate writespersec.
If the result of the calculation shows a value for AVGBUFSIZE that is greater than the value defined for MAXBUFSIZE, the value defined for MAXBUFSIZE is taken as the value for AVGBUFSIZE, and writespersec is calculated as follows:
writespersec = bytespersec / (MAXBUFSIZE - 48)

Round the final result of the INITSIZE formula up to the next multiple of 256.

Calculation of SIZE for DFHLOG

To calculate the SIZE value to use in the CFRM policy for the primary system log, use the following formula:
SIZE = 480 + ( LOGSNUM * A * B / 1024)
where:
  • A = 2500 + (number_of_entries + 5)
  • B = (AVGBUFSIZE * 1.6821) + 289

To calculate a value for number_of_entries, see number of entries calculation.

Round the final result of the SIZE formula up to the next multiple of 256. The formula for SIZE gives a result that is approximately fifty percent greater that the INITSIZE value.

Calculation of LOWOFFLOAD for DFHLOG

You can calculate a suitable value for LOWOFFLOAD for DFHLOG using one of the following formulas:
  • LOWOFFLOAD = (trandur * 90) / (akpintvl + trandur) + 10 (where RETPD=0 specified)
  • LOWOFFLOAD = (trandur * 90) / (akpintvl + trandur)(where RETPD=dddd specified)
where:
  • akpintvl is the interval between activity key points. See activity key point interval calculation.
  • trandur is the execution time, between sync points, of the longest-running transaction that runs as part of the normal workload.
    If this duration is longer than akpintvl value, you have the following choices:
    • Increase the value of the AKPFREQ parameter, thus increasing the value of akpintvl, provided that this value does not result in an unacceptably large coupling facility structure size.
    • Change the application logic to cause more frequent sync points.
    • Calculate a structure size based on a shorter transaction duration, and accept that DASD offloading occurs when the long-running transaction is used.

For a description of the low offload threshold for a logstream, see LOWOFFLOAD and HIGHOFFLOAD parameters on log stream definition.

Calculation of INITSIZE and SIZE for DFHSHUNT

Generally, the secondary system logstream is only a fraction of the size of the primary logstream. To calculate coupling facility space for DFHSHUNT, use the following formulas:
  • INITSIZE = (150 * LOGSNUM) + 310
  • SIZE = (230 * LOGSNUM) + 480
where LOGSNUM is number of logstreams that can write data to the secondary logstream.