Previous Topic: Utilizing Resources EffectivelyNext Topic: Setting Priority in the Operating System and CA Datacom/DB


Allocating Threads

During installation, you specified a value for the USERS= parameter in the DBCVTPR. CA Datacom CICS Services uses this value for the number of threads allocated to service all requests. Since any number of non-update tasks can share threads, thread use and need is mainly determined by the number of concurrent update requests. When a task issues an update request, the thread it is using is held for this task until:

We recommend that the application program issue CICS SYNCPOINTs to synchronize update processing between CA Datacom/DB and non CA Datacom/DB resources such as VSAM or DL/I. Also see the chapter about updating technique in the User Guide. For programs that issue CA Datacom/DB commands for LOG type that do commits or rollbacks, these commands are forced to perform CICS SYNCPOINT or CICS SYNCPOINT ROLLBACK.

In estimating thread allocation, consider the number of update tasks operating concurrently a large percentage of the time. Allocate one thread per concurrent update task. For example, if an average of 6 update tasks and 20 read-only tasks operate concurrently 80 percent of the time, allocate 6 threads to the 6 update tasks and, for example, 3 or 4 threads for the 20 read-only tasks, making a total or 9 or 10.

Periodically, analyze thread utilization to verify that the percentage waiting for a thread is not too high. If it is, allocate more threads. CA Datacom CICS Services produces a thread utilization report automatically and writes it to the Message Log file (DBOC) at CICS shutdown. Use the DBOC INQ=USERS transaction to view this report online during the CICS session. For details, see the User Guide.

Automatic shutdown of CA Datacom CICS Services is delayed when HELD TRANS or RESERVE TRANS is not 000. RESERVE TRANS are due to transactions needing resources before completing. For example, needed resources include such things as terminal response time, enqueues, delays, and waiting on I/Os.

Issue DBOC INQ=STATS to display the current number of held transactions. For details, see the User Guide. A HELD TRANS value greater than zero indicates the number of requests held waiting for a free thread. HELD TRANS values greater than zero are likely to occur when the number of CICS tasks allowed to be started is larger than the number of concurrent users permitted, that is to say when the AMXT= value is greater than the USERS= value.

To limit the amount of time shutdown can take:

  1. Increase the value of the USERS= parameter to increase the number of Task Control Blocks generated by the DBCVTPR macro, and
  2. Increase the value specified in the MUF startup option TASKS in CA Datacom/DB to specify more tasks.

To support additional batch tasks in a MUF environment, the MUF startup option TASKS may specify a value larger than the value specified by the DBCVTPR macro. The TASKS value, however, may not be less than the value specified by the DBCVTPR macro.