IBM Support

SMP and How It Affects Batch Run Times



This document describes how SMP affects Batch run times.

Resolving The Problem

Several people have asked if SMP will help them utilize the full power of their N-Way technology on single stream batch tasks.

The simple answer is that it helps only if it uses a function that goes through the query optimiser. This could be SQL, QRYDFN objects or OPNQRYF from within your application. Traditional RPG code does not benefit.

SMP comes in the following forms on OS/400:

oThe base level of IBM DB2 SMP can be activated with the CHGQRYA command and the parameter DEGREE(*ANY). It enables a job to run I/O bound queries in a more parallel way. Specifying *ANY the system utilizes resources as much as it can (up to 50 percent of memory for parallelism) to speed up the queries run within that particular job. This is strictly speaking, not SMP parallelism, as it is implemented only through I/O parallelism (and not CPU).
oDB2 Symmetric Multiprocessing for OS/400 - Feature code 1698 of OS/400 is a chargeable feature and contains functions to enable parallelism that exploits multiple CPU processors on the same job within OS/400.
DB2 Multisystem for OS/400 is a natural extension of SMP. It enables a database file to be stored on more than one OS/400 transparently to the application. This means that SMP would be working on each section of the file both in terms of CPU and I/O parallelism on each system the file resides on.

If you are considering running SMP, ensure that all of your programs that you switch SMP on for have a sort by specified. Programs that currently assume the data is returned in the sequence they require it now has the data returned in random sequence (or to be more precise, whichever disk task completes first).

For further information in this area, the following documents are recommended for review:
oDB2 for OS/400 Parallel Technologies White Paper located online at:
oDB2 for OS/400 Database Programming, Appendix D
oDB2 SQL programming - Chapter 23, DB2/400 Data Management and the Query Optimiser
oInformational APAR II09006
Depending on the growth requirements you have in the coming years, it is advisable to design your batch processes to take advantage of multiple processors. This should be designed so that if the number of processors available should change, it will be a simple thing for the application to adapt to this; for example, if, due to changes, you wish to run the same program on a uniprocessor or the other way around.

[{"Product":{"code":"SWG60","label":"IBM i"},"Business Unit":{"code":"BU054","label":"Systems w\/TPS"},"Component":"DB2 for IBM i","Platform":[{"code":"PF012","label":"IBM i"}],"Version":"4.1.0;4.2.0;4.3.0;4.4.0;4.5.0;5.1.0;5.2.0;5.3.0;5.3.5;5.4.0;5.4.5;6.1.0","Edition":"","Line of Business":{"code":"LOB08","label":"Cognitive Systems"}},{"Product":{"code":"SSC3X7","label":"IBM i 6.1"},"Business Unit":{"code":"BU054","label":"Systems w\/TPS"},"Component":" ","Platform":[{"code":"","label":null}],"Version":"","Edition":"","Line of Business":{"code":"","label":""}}]

Historical Number


Document Information

Modified date:
18 December 2019