Start of changeSetting TCBLIMIT, THREADLIMIT, CTHREAD and MAXOPENTCBS for the CICS DB2 attachment facilityEnd of change

TCBLIMIT and THREADLIMIT are parameters in the DB2CONN and DB2ENTRY resource definitions. They can be set for each of the three types of thread (see topic Tuning the CICS DB2 attachment facility: Introduction for more information). TCBLIMIT specifies the maximum number of TCBs that can be used to run DB2® threads, which, in turn, limits the maximum number of active DB2 threads. THREADLIMIT specifies the maximum number of active DB2 threads. THREADLIMIT is modified dynamically.

The sum of all the active threads from TSO users, all CICS® and IMS™ systems and other systems accessing DB2 should not exceed CTHREAD.( CTHREAD is a DB2 parameter, specified in ZPARMS, and it defines the number of concurrent threads for all of DB2.) Otherwise, the result could be unpredictable response times. When this occurs, a CICS DB2 attachment facility "create thread" request is queued by DB2, and the CICS transaction is placed is a wait state until a thread is available.

The MAXOPENTCBS system initialization parameter controls the total number of L8 mode TCBs that the CICS region can have in operation at any one time. It is relevant when CICS is connected to DB2 Version 6 or later, when open TCBs are used to run threads into DB2. In the open transaction environment (when CICS is connected to DB2 Version 6 or later), TCBLIMIT controls how many of the L8 mode open TCBs can be used by the CICS DB2 task-related user exit to run threads into DB2. If MAXOPENTCBS is reached, no more open TCBs are allowed in the CICS region, and the CICS DB2 task-related user exit cannot obtain an open TCB for its use.

To ensure that you have enough open TCBs available to meet your DB2 workload, Start of changesee Setting MAXOPENTCBS.End of change

Effect

Each thread linking CICS to DB2 has a corresponding TCB in the CICS address space. Too many TCBs per address space involve the MVS™ dispatcher scanning the TCBs to identify an active TCB. If there is a large number of TCBs then there may be a significant cost of processor time. However, if you have too few TCBs available to meet your DB2 workload, transactions must wait to obtain a TCB.

Limitations

Increasing the TCBLIMIT value or setting up an additional CICS system with access to the same DB2 system may require increasing the CTHREAD parameter of DB2.

Recommendations

For a protected entry thread environment, implementation involves reviewing the number of application plans and, if possible, reducing the number of plans by combining infrequently used ones while balancing the issues of plan size and security.

Initially, you should start with one thread per plan. In a high-volume transaction processing environment, you can estimate the initial number by using the occupancy time of a thread by a transaction and multiplying it with the expected transaction rate. For example, an occupancy time of 0.2 seconds and a transaction rate of 20 transactions per second (0.2 x 20) would give an initial thread number of between three and four.

How monitored

The following facilities are available to monitor the CICS DB2 attachment facility.

Related tasks
Database management for performance
Tuning the CICS DB2 attachment facility: Introduction
Specifying THREADWAIT for the CICS DB2 attachment facility
Specifying PRIORITY for the CICS DB2 attachment facilitySelecting authorization IDs for performance and maintenance
[[ Contents Previous Page | Next Page Index ]]