Runtime considerations

To improve performance, you might want to modify the REGION parameter in your DB2® utility job step. You can also override some of the installation options at run time.

The REGION parameter

Because DB2 Sort manages memory allocation dynamically, setting REGION=0M is recommended for best performance.

Default installation options that you can override at run time

Although most applications can use the default installation options, some applications might require different options. You can override installation options at run time by passing parameters in the DB2SORTI DD data set.
Important: This data set must have a fixed-length format with 80-byte records.

You can specify the DYNALLOC, OPTMODE, and TUNEMSG parameters at run time.

The parameters can start in any column but must be completed on the current record.

DYNALLOC

This parameter specifies values for dynamic sort work allocation.

Syntax

Read syntax diagramSkip visual syntax diagram
>>-DYNALLOC-- = -+-cccccccc---------------+--------------------><
                 +-(--cccccccc--)---------+   
                 +-(--,--nnn--)-----------+   
                 '-(--cccccccc--,--nnn--)-'   

Options
  • cccccccc:

    This value specifies the 1- to 8-character name of the group of devices from which DB2 Sort dynamically allocates the sort work data sets.

    This value can be omitted. If the value is omitted, specify a comma before the nnn value.

    Restriction: You cannot specify VIO as a unit device.
  • nnn:

    This value specifies the maximum number of sort work files that can be used. DB2 Sort can dynamically allocate data sets to bring the total number of sort work data sets up to nnn. Specify a value from 32 through 255. DB2 Sort automatically determines the appropriate number of sort work files to use.

OPTMODE

This value specifies the optimization mode for DB2 Sort.

Syntax
Read syntax diagramSkip visual syntax diagram
>>-OPTMODE-- = -+-BALANCE-+------------------------------------><
                +-CPU-----+   
                '-ELAP----'   

Options
  • BALANCE: BALANCE provides the best mix of CPU and elapsed time performance by balancing utilization of central storage and disk space. Typically BALANCE uses less CPU time and more elapsed time than ELAP.
  • CPU: CPU optimizes to minimize CPU time without any consideration for elapsed time, maximizing disk space usage.
  • ELAP: ELAP optimizes to minimize elapsed time while significantly reducing CPU time, favoring central storage over disk space usage.
Note: All of these options limit central storage use if auxiliary storage availability is low.

TUNEMSG

This parameter specifies whether DB2 Sort will display additional informational messages for tuning purposes. These tuning messages provide information about the product's resource utilization, such as memory usage, sort work DASD space, and sort work EXCPs.

Syntax

Read syntax diagramSkip visual syntax diagram
>>-TUNEMSG-- = -+-ON--+----------------------------------------><
                '-OFF-'   

Options
  • ON: Enables the generation of the additional tuning messages.
  • OFF: Suppresses the additional tuning messages.

Example

//DB2SORTI DD *
DYNALLOC=(,50),OPTMODE=ELAP
This example of a runtime override accomplishes the following goals:
  • Specifies 50 for the maximum number of sort work data sets that can be used
  • Sets the optimization mode to ELAP