Coordinating your DB2CONN, DB2ENTRY, and BIND options
You can create many different combinations of DB2CONN, DB2ENTRY, and BIND options.
One of the most important things that you are required to do to optimize performance is to define whether a given set of transactions must use one or more protected threads. Selecting thread types for optimum performance has more detailed advice about this. Next; consider defining the BIND parameters, ACQUIRE and RELEASE, to minimize the total amount of work related to the main activities involved in processing SQL transactions. See Selecting BIND options for optimum performance for more information.
In general, you are recommended to set the initial values for your DB2CONN, DB2ENTRY, and BIND
options to the values shown in Table 1. You might find that you get better
performance from other combinations for your own transactions. For each transaction type a
recommended thread type and BIND option are shown. There are also recommendations for whether
transactions overflow to the pool.
Transaction Description | Thread Type | Overflow | ACQUIRE | RELEASE |
---|---|---|---|---|
High volume (all types) | Protected Entry | Note 1 | USE | DEALLOCATE |
Terminal-oriented with many commits (plus non-terminal if NONTERMREL=YES) | Protected Entry | Note 2 | USE | DEALLOCATE |
Low volume, requires fast response time | Unprotected Entry | Yes | USE | COMMIT |
Low volume, limited concurrency | Unprotected Entry | Never | USE | COMMIT |
Low volume, does not require fast response time | Pool | Not Applicable | USE | COMMIT |
Non-terminal-oriented with many commits (NONTERMREL=NO) | Note 3 | Note 3 | USE | DEALLOCATE |
Notes:
|
In Table 1 limited concurrency
means only a limited number (n) of transactions are allowed to run
at the same time. A special case exists when n=1, in this case the
transactions are serialized. You can still use a protected thread
if the transaction rate is high enough to make it worthwhile. The
transactions cannot be controlled, if overflow to the pool is allowed.
You are recommended to use the CICS® mechanism
for limiting the number of transactions running in a specific class,
rather than forcing transactions to queue for a limited number of
threads.
As Table 1 shows, a few
combinations of DB2CONN, DB2ENTRY, and BIND options are generally
recommended. However, in specific situations other combinations can
be used.
Table 2 shows a summary of
the activities involved in processing SQL requests for the three recommended
sets of DB2CONN, DB2ENTRY, and BIND specifications. The table also
demonstrates the performance advantage of using protected threads
without changing the authorization ID. Required activities are marked
as follows in the table:
- X
- Required activity
- (1)
- Required only if new authorization ID
- (2)
- Required only if SQL section is not already in EDM pool
- (3)
- Required only if SQL section is not already in Cursor Table
Activity | Protected Threads | Unprotected Threads | ||
---|---|---|---|---|
ACQUIRE(USE) RELEASE(DEALLOCATE) | ACQUIRE(USE) RELEASE(COMMIT) | ACQUIRE(USE) RELEASE(DEALLOCATE) | ||
Activity for each thread | Activity for each transaction | Activity for each transaction | Activity for each transaction | |
Create thread: | X | X | X | |
SIGNON | X | (1) | X | X |
Authorization Check | X | (1) | X | X |
Load SKCT Header | X | X | X | |
Load CT Header | X | X | X | |
Acquire all TS locks | X | X | X | |
Load all DBDs | X | X | X | |
For each SQL statement: | ||||
Load SKCT SQL section | (2) | (2) | (2) | |
Create CT copy | (3) | X | X | |
Acquire all TS locks | X | X | ||
Load all DBDs | X | X | ||
Commit: | ||||
Release page locks | X | X | X | |
Release TS locks | X | |||
Free CT pages | X | |||
Terminate Thread: | X | X | X | |
Release TS locks | X | X | X | |
Free CT pages | X | X | ||
Free work storage | X | X | X |