Professional Documents
Culture Documents
Buffer Pool Analyzer For DB2
Buffer Pool Analyzer For DB2
Page 1
e-mail: ddk@ddk-software.dk
Tlf.: +45 3927 0666
BPA4DB2
CONCEPTS and FACILITIES
Proprietary Notice
Page 2
BPA4DB2
CONCEPTS and FACILITIES
TABLE OF CONTENTS
Page 3
BPA4DB2
CONCEPTS and FACILITIES
BPA4DB2 can help you to reduce the number of IO’s in your DB2 subsystem. This
will improve your Transaction response time and reduce your batch jobs elapsed
time.
The concept of BPA4DB2 is measuring and analysing the Getpage and IO – Rates in
the DB2 subsystem. The interface being used for this purpose is CAF (Call attach
facility).
The collected data are stored in a sequential file, are processed again by another
program which will generate a PC-like layout. This file is transferred to a PC where
you can analyse your Trace data in a GUI based software.
Page 4
BPA4DB2
CONCEPTS and FACILITIES
Tracing
BPA4DB2 starts in periodic sequence Performance Traces (Class 30) with selected
IFCIDs (to avoid producing to much Trace data).
This part of BPA4DB2 is called DATA COLLECTOR. You can control the length of an
trace interval (time to trace), the wait interval between two traces and the number of
Traces you want to take.
So it is possible to trace over hours without causing too much CPU overhead. The
DATA COLLECTOR turns on and off the traces automatically.
10:15 10:17 -------- wait -------- 10:23 10:25 -------- wait ---------
start trace stop trc start trc stop trc
(time)
In this sample, BPA4DB2 would collect the requested IFCIDs between 10:15 and
10:17 and again from 10:23 – 10:25.
The DATA COLLECTOR itself writes the Trace Data into a sequential file, which will
be processed later to generate the PC-file, which can be processed by a JAVA GUI.
The GUI does not process the original trace data from the z/OS site. Before
transferring this data to the PC the are pre-processed by a converter program on the
host. The advantage of this is you don’t have to transfer a multi-megabyte trace with
FTP or IND$FILE. The file to be transferred normally has less than 1 Megabyte.
On the PC-site all of this data are stored in a MS ACCESS Database. This gives you
more opportunities to create your own reports. (there are some samples how to use
EXCEL to generate reports based on the MS ACCESS database.)
Page 5
BPA4DB2
CONCEPTS and FACILITIES
You will find the word “RE-READ IO” in the documentation of BPA4DB2. This means
IO’s which are done a page which caused an IO in the same measurement interval
seconds before.
time
Getpage 10 21 33 27 99 72 21 66 33 10 99 45 22
IO
The number 10, 21, 33 and so on are our page-numbers, involved in getpage
operation.
A yellow field means: this IO is done the first time in the measurement interval.
A red field means: this IO caused already an IO in the measurement interval.
The IO’s on page 21, 33, 10, and 99 are done twice and should be avoided.
Page 6
BPA4DB2
CONCEPTS and FACILITIES
In the GUI you can find this IO’s looking at the first panel: RR %
Rule of thumb:
If you take a five minutes tracing interval and find RE-READ IO’s of 2 or 3 percent,
your opportunities are much smaller than in the sample above.
Page 7
BPA4DB2
CONCEPTS and FACILITIES
A look at the “STATIC ANALYSIS” Panel gives us more information about this
problem:
We can see Bufferpool 21 gets most of all Getpage operations. More interesting is
the information concerning the Distinct Getpage (how many different pages are
processed in the trace interval?)
Page 8
BPA4DB2
CONCEPTS and FACILITIES
All the bufferpools 23, 24 and 25 have more pages defined than distinct getpage
occur in these pools. All of these pools read hit ratios > 90 %. (first panel)
Now we can find out, that this pool has much more Distinct Getpage than pages
defined.
This is what target tells us in the “STATIC ANALYSIS” Panel. The idea is just to
dispatch your defined number of bufferpool pages across the pools, based on the
distinct pages used.
(For bufferpool 0 of course you should define more pages ! This panel calculates
only on distinct pages)
Page 9
BPA4DB2
CONCEPTS and FACILITIES
You will get the objects with most problems in terms of unnecessary IO’s. The panel
is sorted descending by Re-Read-IO.
In the “Static Analysis Section” we described the unbalanced setup before (Distinct
Pages – Bufferpool Size)
What we should do first is to adjust the bufferpool sizes to the values reported in this
panel. This will help to avoid the Re-Reads from DASD.
BPA4DB2 can help you to find out more problems concerning your bufferpools:
Page 10
BPA4DB2
CONCEPTS and FACILITIES
Page 11
BPA4DB2
CONCEPTS and FACILITIES
Now use the “Check” button and let BPA4DB2 analyse your Setup for this
bufferpool:
Page 12
BPA4DB2
CONCEPTS and FACILITIES
Missplaced Objects
We should avoid mixing sequential and random objects in one bufferpool. Each pool
has a specific type (random or sequential) depending on the objects defined in this
pool. It is necessary to know which type of pool we have, as several threshold-setting
depend on the pool-type.
If BPA4DB2 will find a mix of objects in a bufferpool it will report this problem:
Page 13
e-mail: ddk@ddk-software.dk
Tlf.: +45 3927 0666