Tuning and monitoring database system performance Page 16 of 80
DB2_PARALLEL_IO is not a configuration parameter, but a DB2 registry
variable. It is typical for DB2 systems to use storage consisting of arrays of disks
(which are presented to the operating system by the storage controller as a single
device) or to use file systems that span multiple devices. The consequence is that
by default, a non-pureScale DB2 database system makes only one prefetch
request at a time to a table space container. This is done with the understanding
that multiple requests to a single device are serialized anyway. But if a container
resides on an array of disks, there is an opportunity to dispatch multiple prefetch
requests to it simultaneously, without serialization. This is where
DB2_PARALLEL_IO comes in. It tells the DB2 system that prefetch requests can
be issued to a single container in parallel. The simplest setting is
DB2_PARALLEL_IO=* (meaning that all containers reside on multiple –
assumed in this case to be six – disks), but other settings also control the degree
of parallelism and which table spaces are affected. For example, if you know that
your containers reside on a RAID-5 array of four disks, you might set
DB2_PARALLEL_IO to “*:3”. Whether or not particular values benefit
performance also depends on the extent size, the RAID segment size, and how
many containers use the same set of disks. Note that on DB2 pureScale systems,
DB2_PARALLEL_IO defaults to ‘*’, whereas on non-pureScale configurations it
defaults to off. See “Database Storage” (https://ibm.biz/Bdx2My
) for more
information on storage configuration and DB2_PARALLEL_IO.
Statistics collection
It’s no exaggeration to say that having the right statistics is often critical to achieving the
best SQL performance, especially in complex query environments. For a complete
discussion of this topic, see “Writing and Tuning Queries for Optimal Performance”
(https://ibm.biz/Bdx2ng
).
Considerations for SAP and other ISV environments
If you are running a DB2 database server for an ISV application such as SAP, some best
practice guidelines that take into account the specific application might be available. The
most straightforward mechanism is the DB2 registry variable DB2_WORKLOAD, which
has to be set to the value SAP in SAP environments. This will enable aggregated registry
variables that are optimized for SAP workloads.
In SAP envi
ronments, the database configuration has to follow SAP standards, for
example in regards of database code page, table space page and extent size as well as
naming conventions. During the installation of a SAP NetWeaver system an initial set of
DB2 configuration parameters is applied. In addition, SAP Notes describe the preferred
DB2 parameter settings for each supported DB2 version. For example, recommended
minimum parameters settings for SAP NetWeaver systems based on DB2 10.1 are
described in, SAP Note 1692571 (“DB6: DB2 10.1 Standard Parameter Settings”). In
addition to configuration recommendations, you will also find best practices regarding
the administration of DB2 databases in various SAP notes.