Setting thread limits

You can limit the maximum number of Db2 threads that can be allocated concurrently.

About this task

Set these values to provide good response time without wasting resources, such as virtual and real storage. The value that you specify depends on your machine size, your workload, and other factors. When specifying values for these subsystem parameters, consider the following factors:

  • Fewer threads than needed under-use the processor and cause the queuing of threads.
  • More threads than needed do not improve the response time. They require more real storage for the additional threads and might cause more paging, and therefore, performance degradation.

Procedure

To limit the number of allied and database access threads that can be allocated concurrently:

  • Specify a value for the CTHREAD subsystem parameter to control the maximum number of concurrent allied threads that are started at the local Db2 subsystem.
  • Specify a value for the MAXDBAT subsystem parameter to control the maximum number of concurrently active database access threads.
    The sum of the values of the CTHREAD and MAXDBAT subsystem parameters is limited to a maximum value of 20000.
  • For the TSO and call attachment facilities, you can limit the number of threads indirectly by specifying the values of the IDFORE and IDBACK subsystem parameters.
    These values limit the number of connections to Db2. The number of threads and connections that are allowed affects the amount of work that Db2 can process.