Main temporary storage: monitoring and tuning

You can monitor and control the amount of storage in the CICS® region that is used by temporary storage queues.

About this task

From CICS TS for z/OS®, Version 5.1, main temporary storage is located in 64-bit storage, so the available space is greater than in earlier CICS releases. Main temporary storage does not require VSAM I/O activity or communication with a temporary storage server. However, temporary storage queues in main temporary storage are not recoverable.

The CICS temporary storage statistics show information about the use of main temporary storage. You can also use CICSPlex® SM or CICS commands to see the amount of main temporary storage in use, and the current limit. When 75% or more of the maximum allowed storage is in use, CICS issues messages about this situation.

You use the TSMAINLIMIT system initialization parameter to specify the amount of storage in the CICS region that is available for temporary storage queues to use. You can specify an amount of storage in the range 1 - 32768 MB (32 GB).

However, you must also check the setting for the z/OS parameter MEMLIMIT. MEMLIMIT limits the amount of 64-bit storage that the CICS address space can use. Your setting for TSMAINLIMIT must not be greater than 25% of the MEMLIMIT value.

Procedure

  1. Specify expiry intervals in your temporary storage models. When you specify an expiry interval, CICS can automatically delete temporary storage queues that match the models if they are not deleted by applications.
    For more information about expiry intervals, see Automatic deletion of temporary storage queues.
  2. Use CICSPlex SM, CICS commands, or CICS statistics to monitor the amount of main temporary storage in use.
    • The CICS temporary storage global and summary statistics show the number of times that main temporary storage use reached the limit set by TSMAINLIMIT, and the peak amount of virtual storage that was used for data in main temporary storage.
    • The TEMPSTORAGE resource shows the storage in use compared to the maximum allowed limit.
  3. Look out for messages from CICS about high usage of main temporary storage.
    • CICS issues message DFHTS1601 when 75% or more of the maximum allowed storage is in use.
    • CICS issues message DFHTS1602 if an application attempts to write an item of data that would make the main temporary storage in use exceed the maximum allowed limit (the TSMAINLIMIT value). In this situation, applications cannot write to temporary storage queues in main temporary storage until space becomes available.
    If either of these messages are issued, try to delete old temporary storage queues or increase the TSMAINLIMIT setting, as described in the following steps. CICS issues message DFHTS1604 when usage falls below 70% of the maximum allowed.
  4. Before you change the TSMAINLIMIT setting, check your current setting for the z/OS parameter MEMLIMIT.
    The amount of storage that you make available for temporary storage queues must not be greater than 25% of the MEMLIMIT value. For information about the MEMLIMIT value for CICS and instructions to check the value of MEMLIMIT that currently applies to the CICS region, see Estimating, checking, and setting MEMLIMIT.
  5. Optional: To change the amount of storage available for temporary storage queues, change the TSMAINLIMIT setting.
    You can change the TSMAINLIMIT setting in a running CICS system. Use the links at the end of this topic for detailed instructions.
    • If you increase the TSMAINLIMIT setting and the new value is greater than 25% of the value of MEMLIMIT, TSMAINLIMIT remains unchanged and message DFHTS1607 is issued.
    • If you decrease the TSMAINLIMIT setting, CICS attempts to maintain at least 25% free space in allowed storage above current utilization, so that temporary storage write requests do not reach the TSMAINLIMIT value too rapidly. The value is set as follows:
      • If there is currently less than 25% free space, TSMAINLIMIT remains unchanged. Message DFHTS1606 is issued.
      • If at least 25% of the new limit will be free space, the setting is decreased to the value that you choose.
      • If less than 25% of the new limit would be free space, setting is decreased to the current utilization plus 33% of that utilization.

    If the value of TSMAINLIMIT is changed, CICS issues message DFHTS1603, which shows the new setting.

Results

The following table shows the cost of main storage. In this example, n represents the number of items in the queue before it is deleted.
Table 1. The cost of main storage
WRITEQ REWRITE READQ DELETEQ
1.0 0.8 0.8 0.71 + 0.23 x n