IBM Support

SMP and How It Affects Batch Run Times

Technote (troubleshooting)


Problem(Abstract)

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:

o The 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).
o DB2 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:
o DB2 for OS/400 Parallel Technologies White Paper located online at: http://www-03.ibm.com/servers/enable/site/education/abstracts/4aea_abs.html
o DB2 for OS/400 Database Programming, Appendix D
o DB2 SQL programming - Chapter 23, DB2/400 Data Management and the Query Optimiser
o Informational 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.


Cross reference information
Segment Product Component Platform Version Edition
Operating System IBM i 6.1

Historical Number

6492307

Document information

More support for: IBM i
DB2 for IBM i

Software 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

Operating system(s): IBM i

Reference #: N1010726

Modified date: 09 January 2013