Thread management

The Subsystem Services block of the Statistics trace report indicates how thread queuing is performed.

The QUEUED AT CREATE THREAD field shows the number of allied and allied-distributed threads that were not immediately created because the maximum number of threads allowed in the system had been reached.

As a rule of thumb about 1% thread queuing is acceptable. When this is appreciably higher, increase the value of MAX USERS on the DB2 install panel DSNTIPE.

The combined maximum allowed for MAX USERS and MAX REMOTE ACTIVE depends on the Db2 version installed. It cannot exceed:
20000
For Db2 10 or later.
2000
Prior to Db2 10.

The DBAT QUEUED-MAXIMUM ACTIVE field in the Global DDF Activity block of the report shows the number of DBATs that had to wait because the maximum number of threads allowed in the system had been reached. This value should be zero, or close to zero. Increase the value of MAXDBAT to raise the maximum number of concurrent active DBATs allowed.