Db2 for z/OS subsystem parameters—often called ZPARMs—turn broad policy into concrete limits. They decide how long a lock waiter remains, how many local and distributed threads can exist, when locks escalate, which authorization logic runs, and how much parallel work Db2 may attempt. This tutorial groups the important SQL, IRLM, security, utility, and performance parameters so a beginner can reason about them without treating each name as an isolated switch.
A subsystem parameter is a default or boundary, not a complete performance plan. Object DDL, bind options, special registers, workload manager policy, available processors, and the access path can all narrow what happens. Some values can be changed online; others require a Db2 or IRLM restart. Names, ranges, defaults, and installation-panel locations can also change by Db2 function level or release. Therefore, read the active settings, consult the manual for that exact release, and test a change rather than copying a value from another subsystem.
123456789A useful troubleshooting chain ------------------------------ Symptom -> identify the waiting or failing resource -> find the controlling object option / special register -> find the subsystem ceiling or default -> measure workload and IRLM impact -> test one controlled change -> verify messages, accounting, statistics, and EXPLAIN
The Internal Resource Lock Manager (IRLM) coordinates Db2 locks. Two clocks are easy to confuse. A deadlock detection interval determines how often IRLM searches for a cycle such as thread A waiting for B while B waits for A. No amount of waiting can solve that circle, so IRLM selects a victim. IRLMRWT, whose common default is 30 seconds, limits an ordinary resource wait. That wait might have no cycle at all: one long transaction may simply hold a lock needed by another.
| Parameter | Purpose | Guidance |
|---|---|---|
| IRLMRWT | Maximum resource lock-wait time in seconds | Default 30; a timeout handles long waits that are not necessarily deadlocks |
| DEADLOCK (IRLM) | Interval between local deadlock detection cycles | Specified for IRLM through installation panel DSNTIPJ/startup configuration |
| PC=YES | Compatibility startup value historically associated with program-call operation | Still specified as YES in applicable procedures, although modern IRLM ignores its value |
| MAXCSA / SCOPE | Compatibility storage value / IRLM operating scope | MAXCSA is obsolete; SCOPE is LOCAL or GLOBAL according to data sharing topology |
The local deadlock-cycle value is configured for IRLM, traditionally through installation panel DSNTIPJ and the generated startup configuration. Keep deadlock detection substantially shorter than the resource timeout so true cycles are broken promptly rather than surviving until IRLMRWT. A shorter cycle can detect problems faster but performs detection more often; an excessively long cycle makes deadlocked applications appear frozen.
IRLM also has systems-level startup values. PC=YES historically selected cross-address-space program-call operation, and MAXCSAhistorically limited common storage. Modern IRLM keeps PC and MAXCSA for compatibility but no longer uses their values; applicable procedures still specify PC=YES and MAXCSA=0. SCOPE remains meaningful: LOCAL is for a non-data-sharing IRLM, while GLOBAL is required for an IRLM participating in a data sharing group. These are systems-programmer settings, not application tuning knobs. Lock capacity now depends on IRLM private storage and MEMLIMIT-related planning.
Security parameters decide who performs authorization processing, which privileged identities exist, and how often Db2 can reuse authorization results. They deserve change-control treatment because a performance-looking cache adjustment can alter when changed privileges become visible, while an exit-module mistake can interrupt attachments.
| Parameter | Purpose | Operational caution |
|---|---|---|
| AUTH | Use-protection switch that controls whether Db2 performs authorization checks | Normally YES; disabling protection changes the subsystem security boundary |
| AUTHCACH | Controls authorization cache capacity | More caching can reduce repeated checks but consumes storage and affects refresh behavior |
| SECADM1 / SECADM2 | Primary and secondary security administrator authorization IDs | SECADM1_TYPE and SECADM2_TYPE specify AUTHID or ROLE |
| AUTHEXIT_CHECK | Selects the identity used for authorization checks: PRIMARY or DB2 | Understand owner and primary-ID behavior before changing this security-boundary setting |
| AUTH_COMPATIBILITY | Compatibility behaviors for selected authorization checks | Use only documented values for the installed release; avoid preserving obsolete behavior blindly |
| IDAUTH_MODULE | Identifies a site authorization or identity-processing module where configured | Module availability and protection affect connection processing |
SECADM1 and SECADM2 establish the two installation security-administrator identities. Their companion type choices distinguish the identity form as AUTHID or ROLE. Separate named administrators support accountability and recovery if one identity is unavailable. Do not use these values as general application IDs.
AUTH is the use-protection switch: YES tells Db2 to perform authorization checking. AUTHEXIT_CHECK chooses PRIMARY or DB2 identity behavior for the documented plan/package authorization checks.IDAUTH_MODULE names the default connection authorization exit module.AUTH_COMPATIBILITY preserves selected compatibility behavior for documented authorization checks. Its allowed keywords have evolved, so this is an awareness item: inventory why a compatibility option exists before removing it, but do not retain weaker legacy behavior without a business requirement.AUTHCACH controls the plan authorization cache. The old CACHEPAC and CACHERAC size controls were removed from maintained Db2 12 by APAR PH28280, so Db2 13 manages those package and routine authorization caches internally.
Db2 separates local and distributed execution. CTHREAD limits allied threads created by local attachments such as batch, CICS, IMS, TSO, CAF, and RRSAF.MAXDBAT limits database access threads for DDF clients. Although the controls are separate, their sum must remain within the supported combined limit, approximately 20,000 on current releases. Verify the exact maximum for your installed Db2 level.
| Parameter | Controls | Effect |
|---|---|---|
| CTHREAD | Maximum allied threads | Caps local attachments such as CICS, IMS, TSO, batch, CAF, and RRSAF |
| MAXDBAT | Maximum allocated DBATs | Caps distributed threads that execute DDF work |
| Combined limit | CTHREAD + MAXDBAT | Keep within the release-supported total, approximately 20,000 on current levels |
| IDTHTOIN | Idle active-thread timeout | Ends eligible in-use threads that remain idle; it is not the pooled-DBAT timer |
Raising a ceiling does not create capacity. More simultaneous threads can consume more virtual storage, locks, EDM resources, buffer-pool pages, CPU, and downstream connections. A MAXDBAT shortage can queue distributed work, while CTHREAD pressure can block local attachment demand. Diagnose which population is constrained before changing either number.
IDTHTOIN handles an allocated, eligible thread that is doing no work. It protects Db2 from clients that disappear or pause while retaining resources. It is not IRLMRWT, because there may be no lock wait; it is not UTIMOUT, because no utility is draining an object; and it is not the timer used to trim an unused pooled DBAT.
Online utilities cooperate with applications through claims, drains, and object states. UTIMOUT limits how long a utility waits for the resource or drain it needs. A low value makes a utility fail quickly during contention. A very high value can leave an operations schedule stalled behind one long transaction. Fixing the transaction pattern is often better than repeatedly increasing UTIMOUT.
| Parameter | Purpose | Operational point |
|---|---|---|
| UTIMOUT | Maximum time a utility waits for a required resource or drain | Prevents a utility from waiting forever behind application claims |
| UTILS_BLOCK_FOR_CDC | Controls utility interaction with change-data-capture requirements | Coordinate with replication or CDC owners before changing |
| PARAMDEG_UTIL | Degree control for eligible utility parallel work | Higher values can shorten elapsed time while increasing CPU, I/O, and memory demand |
| Utility sort controls | Influence sort resource use and eligible parallel processing | Names and applicability vary by utility and Db2 release; inspect utility output |
UTILS_BLOCK_FOR_CDC is important where change data capture or replication depends on utility behavior. Treat it as a cross-team setting: a utility window that looks faster can disrupt a downstream capture contract.PARAMDEG_UTIL and related sort or parallel controls influence eligible utility work. More parallelism may reduce elapsed time, but concurrent sort tasks need memory, work data sets, CPU, and I/O bandwidth. Utility messages and reports show what Db2 actually used; the parameter is a limit, not proof of the achieved degree.
Optimizer parameters usually enable a possibility or provide a compatibility boundary. They do not repair stale RUNSTATS, poor indexing, non-stage-1 predicates, or an undersized buffer pool. For example, enabling STAR JOIN lets Db2 consider access paths designed for a large fact table joined to smaller dimensions. Db2 still rejects that choice when statistics and cost estimates favor a different plan.
| Parameter or family | Meaning | Tuning warning |
|---|---|---|
| STAR JOIN | Enables or influences star-schema access-path consideration | Useful for fact/dimension analytics, not a promise that a star join will be selected |
| OPTIMIZATION options | Control selected optimizer capabilities and compatibility behavior | Evaluate access-path changes with EXPLAIN and realistic statistics |
| CACHEPAC (historical) | Previously sized the package authorization cache | Removed by Db2 12 APAR PH28280; modern Db2 manages this cache internally |
| CACHERAC (historical) | Previously sized the routine authorization cache | Removed by Db2 12 APAR PH28280; modern Db2 manages this cache internally |
| RELCURHL | Controls release at COMMIT of the page or row lock where a WITH HOLD cursor is positioned | YES improves concurrency; NO retains legacy lock behavior |
| NPGTHRSH | Favors matching-index access for tables or partitions below an NPAGES threshold | Default 1 on current levels; keep small because matching-index access can cost more |
OPTIMIZATION options are a family of release-dependent optimizer controls rather than permission to toggle every new feature at once. Compare PLAN_TABLE output, estimated costs, join sequence, matching columns, parallel groups, and runtime accounting before and after a change. Historically,CACHEPAC and CACHERAC sized caches for package and routine authorization decisions. They were removed as ZPARMs by Db2 12 maintenance; current Db2 manages the storage internally. The names remain useful when reading old subsystem listings and tuning advice.
RELCURHL=YES, the current default, releases at COMMIT the page or row lock on which a WITH HOLD cursor is positioned; the cursor position itself remains. NO retains the lock for legacy compatibility and can reduce concurrency.NPGTHRSH tells the optimizer to favor the index with the most matching columns when a table or partition has fewer NPAGES than the threshold. The current best-practice default of 1 mainly protects empty or default-statistics cases. Large thresholds can force matching-index access when a scan would cost less, so tune only with RUNSTATS and EXPLAIN evidence.
Query parallelism divides eligible work among multiple execution units. It can reduce one query's elapsed time while consuming resources faster, so Db2 layers several controls. PARAMDEG is the subsystem ceiling. TheCURRENT DEGREE special register influences dynamic SQL, and the package DEGREE bind option applies to eligible static SQL.CDSSRDEF supplies default CURRENT DEGREE behavior for dynamic SQL applications that do not explicitly establish it.
| Control | Purpose | Scope |
|---|---|---|
| PARAMDEG | Subsystem maximum degree for query parallelism | Upper bound; actual degree may be lower |
| CDSSRDEF | Default CURRENT DEGREE behavior for eligible dynamic SQL | Influences whether applications get parallelism without setting the register |
| CURRENT DEGREE | Application special register for dynamic SQL parallelism preference | ANY permits Db2 to consider parallelism; 1 requests no query parallelism |
| Package DEGREE | Bind option governing eligible static SQL | Works with subsystem limits and runtime capacity |
12345678910-- Conceptual dynamic SQL session controls SET CURRENT DEGREE = 'ANY'; SELECT REGION, SUM(SALES_AMOUNT) FROM SALES_FACT GROUP BY REGION; -- Requesting ANY permits consideration of parallelism. -- PARAMDEG and runtime conditions still limit the actual degree. SET CURRENT DEGREE = '1';
Parallelism can also be reduced by the access path, storage constraints, workload manager goals, processor availability, or a small amount of qualifying work. Read EXPLAIN and runtime monitors rather than assuming PARAMDEG=8 means eight-way execution for every statement. Utility parallelism has separate considerations and is not governed solely by query PARAMDEG.
Lock limits protect two different things. NUMLKUS protects the subsystem from one thread accumulating too many locks. When the thread reaches that maximum, it fails. NUMLKTS is an escalation threshold: Db2 may trade many row or page locks on a table space for a coarse lock. That reduces lock storage but can block more users.
| Control | Meaning | Result |
|---|---|---|
| NUMLKUS | Maximum locks held by one user or thread | The thread fails when the limit is exceeded |
| NUMLKTS | System lock-escalation threshold per table space | Many page/row locks can be replaced by a coarse table-space lock |
| LOCKMAX SYSTEM | Table-space DDL delegates escalation threshold to NUMLKTS | Changing NUMLKTS affects objects using SYSTEM |
| LOCKMAX integer | Object-specific escalation threshold | Overrides NUMLKTS for that table space |
| LOCKMAX 0 | Disables lock escalation for that table space | Does not disable NUMLKUS or remove IRLM storage limits |
The table-space LOCKMAX option determines whether NUMLKTS governs that object. LOCKMAX SYSTEM uses NUMLKTS; a numeric LOCKMAX supplies an object-specific threshold; LOCKMAX 0 disables escalation for that object. Disabling escalation does not grant unlimited locks, because NUMLKUS and available IRLM storage still apply. Before increasing thresholds, ask why a unit of work touches so many rows. Smaller commit intervals may improve concurrency and recovery while reducing lock demand.
12345678910-- Conceptual object-level choices ALTER TABLESPACE APPDB.ORDERTS LOCKMAX SYSTEM; -- Uses the subsystem NUMLKTS escalation threshold. ALTER TABLESPACE APPDB.ORDERTS LOCKMAX 5000; -- Uses an object-specific threshold. ALTER TABLESPACE APPDB.ORDERTS LOCKMAX 0; -- Disables escalation for this table space, -- but NUMLKUS and IRLM capacity still protect Db2.
| Timer | Applies to | Typical outcome |
|---|---|---|
| IRLMRWT | Application resource-lock waits | The waiting unit of work receives a timeout failure |
| UTIMOUT | Utility waits for resources or drains | The utility stops waiting according to utility timeout handling |
| IDTHTOIN | Eligible active threads that are idle | Db2 can cancel the idle thread and release resources |
| CURRENT LOCK TIMEOUT | Application lock-wait policy in Db2 13 | Permits workload-level lock-timeout behavior where supported |
Db2 13 adds awareness of the CURRENT LOCK TIMEOUT special register, which lets supported applications express a lock-wait policy more precisely than one subsystem-wide resource timeout. That is useful when an interactive request should fail quickly but a controlled batch transaction can wait longer. Validate supported values and driver behavior at the active function level. It does not control a utility drain or disconnect an idle thread.
1234567891011-- Db2 13 conceptual workload-level lock-wait policy SET CURRENT LOCK TIMEOUT = 5; UPDATE CUSTOMER SET STATUS = 'REVIEW' WHERE CUSTOMER_ID = 1042; COMMIT; -- The special register governs this application's lock-wait policy -- where supported; IRLM and subsystem safeguards still exist.
Timeout failures are symptoms, not random events. Record the waiter, holder, object, lock mode, unit-of-work age, and SQL. Increasing IRLMRWT can hide a slow commit pattern and make response time worse. Decreasing it can cause needless retries during healthy short bursts. Likewise, increasing UTIMOUT does not make an undrainable object drain, and lowering IDTHTOIN can terminate legitimate conversational work.
Imagine Db2 is a busy library. IRLM is the librarian who controls keys to locked rooms. The deadlock checker notices when two children each hold one toy and wait for the other; IRLMRWT is how long any child may wait at a locked door. CTHREAD and MAXDBAT say how many local and telephone visitors can have helpers. NUMLKUS stops one visitor from carrying every key, while NUMLKTS lets the librarian replace a huge ring of tiny keys with one big room key. PARAMDEG says how many helpers one research job may use. UTIMOUT tells a cleaning crew how long to wait for everyone to leave, and IDTHTOIN sends home a visitor who has a helper but is doing nothing. Every limit keeps one person from consuming the whole library.
1. What happens when one thread exceeds NUMLKUS?
2. Which setting controls the maximum number of local allied threads?
3. How does an IRLM deadlock cycle differ from IRLMRWT?
4. What is the purpose of PARAMDEG?
5. Which timeout is aimed at an idle active thread?
6. What does LOCKMAX SYSTEM mean on a table space?
Connect lock waits and deadlock detection with utility claims and drains
Reduce lock duration and contention through transaction design
Understand how isolation choices affect locks and concurrent access
Learn the lock modes, resources, compatibility, and duration rules