Tuning the CICS DB2 attachment facility: Introduction

For information on tuning DB2® tables and the DB2 subsystem, and for general considerations when tuning a DB2 application, see the DB2 Universal Database™ for OS/390® and z/OS® Administration Guide.

The CICS® DB2 attachment facility provides a multithread connection to DB2. The connections between CICS and DB2 are called threads. There are three types of thread:

Command threads
Command threads are reserved by the CICS DB2 attachment facility for issuing commands to DB2 using the DSNC transaction. They are not used for commands acting on the CICS DB2 attachment facility itself, because these commands are not passed to DB2. When a command thread is not available, commands automatically overflow to the pool, and use a pool thread.
Entry threads
Entry threads are specially defined threads intended for transactions with special requirements, such as high priority transactions or transactions with special accounting needs. Each thread is associated with a particular application plan, and the threads are reusable. If a transaction is permitted to use an entry thread, but no suitable entry thread is available, the transaction overflows to the pool and uses a pool thread.

Entry threads can be defined as protected. When an entry thread is released, if it is protected, it is not terminated immediately. It is kept for a period of time, and if another CICS transaction needs the same type of entry thread during that period, it is reused. This avoids the overhead involved in creating and terminating the thread for each transaction. Entry threads are terminated after two consecutive periods of inactivity. These periods are defined in the DB2CONN parameter, PURGECYCLE. An entry thread that is unprotected is terminated immediately, unless a CICS transaction is waiting to use it the moment it is released.

Pool threads
Pool threads are used for all transactions and commands that are not using an entry thread or a DB2 command thread. Pool threads are intended for low volume transactions, and for overflow transactions that could not obtain an entry thread or a DB2 command thread. A pool thread is terminated immediately if no CICS transaction is waiting to use it.

The DB2CONN, DB2ENTRY, and DB2TRAN definitions of the CICS DB2 attachment facility define the authorization and access attributes on a transaction and transaction group basis.

When tuning the CICS DB2 attachment facility, you must understand the underlying architecture. See CICS DB2 Guide for more information.

CICS DB2 Guide explains the recommendations for defining the CICS DB2 connection for optimum performance. CICS DB2 Guide has recommendations for application design, and CICS DB2 Guide has recommendations for tuning CICS DB2 applications.

In summary, the objectives in tuning the CICS attachment facility are to:

You can optimize performance between CICS and DB2 by adjusting the transaction class limits, MXT system parameters of CICS, and the THREADWAIT, TCBLIMIT, THREADLIMIT, and PRIORITY attributes of DB2CONN and DB2ENTRY.

How monitored

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

The CICS performance class monitoring records include the following DB2-related data fields:

CICS monitoring is used in the CICS DB2 environment with the DB2 accounting facility, to monitor performance and to collect accounting information.

Related tasks
Database management for performance
Specifying THREADWAIT for the CICS DB2 attachment facility
Setting TCBLIMIT, THREADLIMIT, CTHREAD and MAXOPENTCBS 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 ]]