Controlling deallocation for high-performance DBATs

High-performance DBATs can reduce CPU use for package allocation and deallocation, but they can also hold package locks and table space intent locks that effectively block your ability to modify objects, run utilities, or rebind packages. However, you can use the MODIFY DDF command to change the deallocation rules for high-performance DBATs.

Before you begin

Enable high-performance DBATs in your Db2 environment. For more information, see Enabling high-performance DBATs.

About this task

Start of change When database access threads (DBATs) run in INACTIVE mode, Db2 accepts the RELEASE bind option of the package and uses high-performance DBATs to process remote connections. A high-performance DBAT is a database access thread that stays associated with a remote connection at transaction boundaries, rather than being pooled. With high-performance DBATs, the amount of allocation and deallocation processing is reduced because the copy of the package remains allocated until the DBAT terminates. Although certain package release options can reduce the use of CPU resources for package allocation and deallocation processing, they can also block your ability to modify and maintain database objects and packages.End of change

Procedure

To minimize the CPU use for package allocation and deallocation processing and enable administrative activities, you can use the following practices:

  • During normal production operating hours, enable Db2 to allocate and deallocate packages according to the rules of the RELEASE(DEALLOCATE) bind option.
    You can issue either of the following commands to specify that Db2 uses the rules of the RELEASE bind option that is specified for the package.
    • To specify that DBATs associated with connections are deallocated when the connection terminates, issue the following command:
      MODIFY DDF PKGREL(BNDOPT)
    • To specify that DBATs associated with connections are pooled when the connection terminates, issue the following command:
      MODIFY DDF PKGREL(BNDPOOL)
  • For nightly utilities and emergency maintenance, specify that Db2 uses the rules of the RELEASE(COMMIT) bind option for all packages.
    You can issue the following command to specify that behavior for all packages, regardless of the RELEASE option specified for each package:
    MODIFY DDF PKGREL(COMMIT)
    The effects of issuing this command are not immediate. However, any DBAT terminates and becomes inactive at the next commit point. Any RELEASE(DEALLOCATE) DBATs that remain active waiting for a new unit-of-work request from a client are terminated by a DDF service task that runs every 2 minutes. Later, when any new unit-of-work creates a database access thread, the packages are allocated according to the rules of the RELEASE(COMMIT) bind option.