Calculating service unit values for resource limit tables

The processing time for a particular SQL statement varies according to the processor that executes it, but the number of service units required is a relative metric, which remains roughly constant.

About this task

The resource limit facility samples processing time in a relative measurement called service units.

A relative metric is used so that you don't have to modify the resource limit table values when processors are changed. The number of service units consumed is not exact between different processors because the calculations for service units are dependent on performance averages measured before the release of a new processor. In some cases, Db2 workloads can differ from the measured averages. In these cases, resource limit table value changes might be necessary.

Procedure

To choose service unit times for the ASUTIME, RLFASUWARN, or RLFASUERR columns, use one of the following approaches:

  • Use the value in the PROCSU column of DSN_STATEMNT_TABLE as your starting point.
    You can also get the value from the IFCID 0022 record.
  • If you do not have statement table information, or if you have queries for which you have no information, you can use the following formula to calculate SU time:
    SU time = processor time × service units per second value

    The value for service units per second depends on the processor model. To find this value for your processor model, see Preparing an initial OPT .

Example

For example, if processor A is rated at 900 service units per second and you do not want any single SQL statement to use more than 10 seconds of processor time, you could set ASUTIME by using the following calculation:

ASUTIME time = 10 seconds × 900 service units/second = 9000 service units

Later, you might upgrade to processor B, which is rated at 1000 service units per second. If the value you set for ASUTIME remains the same (9000 service units), the SQL statement is only allowed 9 seconds for processing time but an equivalent number of processor service units:

ASUTIME = 9 seconds × 1000 service units/second = 9000 service units

As this example illustrates, after you establish an ASUTIME (or RLFASUWARN or RLFASUERR) for your current processor, you do not need to modify it when you change processors.