CPUTIME threshold

The CPUTIME threshold specifies the maximum amount of combined user and system processor time that an activity can use on a particular member while the activity is running. Use this threshold to detect and control activities that are using excessive processor resources.

Type
Activity
Definition domain
Database, service superclass, service subclass, work action, workload and statement
Enforcement scope
Member
Tracked work
See the information later in this topic
Queuing
No
Unit
Time
Predictive or reactive
Reactive

The amount of processor time that an activity spends running is measured from the time that the activity begins running at the member, after any queuing by thresholds, until the time that the activity finishes running.

Activities tracked by this threshold are as follows:
  • All DML activities. This includes DML activities that originate from within IMPORT, EXPORT and other CLP commands.
  • CALL activities. The processor time for a CALL activity does not include the processor time of any child activity. The processor time spent in fenced processes is also not counted toward the total processor time for the CALL activity.

Example

The following example creates a CPUTIME threshold TH1 for the database domain with a member enforcement scope. This threshold stops any activity that takes longer than 30 seconds to run, which it checks for at 5-second intervals. You can use this threshold to ensure that no queries on the system use an unreasonable amount of processor time, which can negatively impact other work running on the system.

CREATE THRESHOLD TH1 FOR DATABASE ACTIVITIES
  ENFORCEMENT MEMBER
  WHEN CPUTIME > 30 SECONDS CHECKING EVERY 5 SECONDS
  STOP EXECUTION;