Database Services Address Space

advertisement
DB2 Performance & Tuning
with iStrobe
Frank Schuler
Strobe MF Application Performance Management
Field Technical Support
September 20, 2012
DB2 Performance & Tuning
with iStrobe
1.
2.
3.
4.
5.
Strobe & iStrobe
CICS Case Study
Batch Case Study
DB2 / DDF Case Study
Consider DB2 System Services
2
The Strobe Process
Measuring
iStrobe
Add
Request
Strobe
Measurement
Pgm Execution
Sample
Dataset
Strobe
Reporter
Reporting
Strobe
Profile
What Strobe Sees
User
Programs
Library Routines
STROBE drills down
through all the layers of
your OS/390 address
space to pinpoint
specific areas of
resource demand
CPU
CICS
Database & IO Subsystems
OS/390 Operating System
Database Management Systems
I/O Subsystems
I/O Devices
Data sets
I/O
What Strobe Sees
User
Programs
Library Routines
STROBE drills down
through all the layers of
your OS/390 address
space to pinpoint
specific areas of
resource demand
CPU
CICS
Database and IO Subsystems
OS/390 Operating System
Database Management Systems
I/O Subsystems
I/O Devices
Data sets
I/O
Analysis - iStrobe
• Browser-based product for
• Navigating performance reports
• Analyzing and improving performance
• Supplies tips for improving performance
• Module HELP database supplies descriptions and
performance hints for system services
• SQL Analysis Feature makes recommendations for
improving SQL performance
iStrobe Automates the Strobe Profile Report
Interpretation Process
• iStrobe improves Strobe ease of use by providing a GUI
home page look and feel for interpreting profile reporting
• Look for the biggest number or the longest line
• “Click until you click no more” (+ expands on current page)
• Jump to next report via (
Report Icon)
• 5 clicks or less to the root cause
Traditional Strobe Text Based
Reports
iStrobe Automates Strobe
Interpretation and Analysis
iStrobe – Initial Panel
CICS Case Study
12
iStrobe 4.2 – Measurement Session Data - CICS
iStrobe 4.2 – Program CPU Usage
CA Detector
iStrobe 4.2 – DB2 Activity by Query
iStrobe 4.2 – SQL Analysis
iStrobe 4.2 – DB2 Explain Expanded
iStrobe 4.2 – DB2 Catalog Statistics
Analysis Summary
•XIE1RULE: 206K Rows / 5.1K Pages
•XPKCLM_Rule(1) 277K Rows / 3.2K Pages
•Non-Matching Index Scan
• Consider adding an index to Table ITS.RULE to change the
Non-Matching Index Scan to a Matching Index Only Scan as
follows:
•
•
•
•
•
Column 1
2
3
4
5
•Get Pages & CPU reduced
–
–
–
–
–
PRFX_CD
STS_QUAL_CD
STS_CD
LOC_PLAN_CD
PLAN_PROFL_UID
Batch
20
iStrobe 4.2 – Measurement Session Data - Batch
iStrobe 4.2 – Program CPU Usage
CA Detector
iStrobe 4.2 – DB2 Activity by Query
iStrobe 4.2 – DB2 Explain
iStrobe 4.2 – DB2 Catalog Statistics
Analysis Summary
•ACSIS.OPEN: 259K Rows / 5.5K Pages
•There are 259,000 rows on this table but the cursor is opened nearly 5
million times. Resulting in a large number of duplicates.
•Recommend checking programmatically to see if the program will be
accessing the same row(s) and not make the open again.
•Table ACSIS.OPEN. PCTROWCOMP is 0.0
• Consider turning DB2 Compression on if the NPAGES is greater than
500 and the DB2 compression utility DSN1COMP indicates the
compression ratio would be greater than 30%
DDF
27
iStrobe 4.2 – Measurement Session Data - DDF
iStrobe 4.2 – DB2 Stored Procedure SQL Activity
iStrobe 4.2 – DB2 Explain
iStrobe 4.2 – DB2 Catalog Statistics
Analysis Summary
•XI18S1 6.5M Rows / 303K Pg
•Non-Matching Index Scan
• Consider adding an index to Table TXT18S_BILL_VALIDATION
to change the Non-Matching Index Scan to a Matching
Index Only Scan as follows:
•
•
•
•
•
•
•
Column 1 – ACCOUNT_ID
2 –
3 –
4 –
5 –
6 –
•
Get Pages & CPU reduced
CIRCUIT_ID
PON
USOC
JURISDICTION_CD
BILL_DATE
Consider what DB2
System Services is
doing on behalf of your
SQL as part of your
analysis
34
Database Services
Address Space
Relational Data System
(RDS)
Data Manager
(DM)
Buffer Manager
(BM)
• Checks SQL statements
• Processes Stage 2 predicates
• Performs sort and optimization
• Processes Stage 1 predicates
• Processes indexable predicates
• Interfaces with IRLM
• Manages bufferpools
• Moves data to and from DASD
DB2
Data
DB2 Address Space Reporting
#PUP
.SYSTEM
MODULE
NAME
** PROGRAM USAGE BY PROCEDURE **
SYSTEM SERVICES
SECTION
NAME
FUNCTION
.DB2
DB2 SYSTEM SERVICES
% CPU TIME MARGIN OF ERROR
SOLO TOTAL 00
8.00
DSNBBM
DSNB1GET RETRIEVE REQUESTED PAGE
3.41
3.41
DSNBBM
DSNB1REL PAGE RELEASE ROUTINE
.49
.49
DSNECP10 DSNAPRH
PGM REQUEST APPL INTERF
1.46
1.46
DSNECP10 DSNECP21 PARSE DSN COMMAND
.49
.49
DSNGEDM
DATA MGT DBD/SKCT RTNS
.49
.49
DSNIDM
DSNICSMP CHK MAP PAGE CONSISTENC
.49
.49
DSNIDM
DSNICUBD ADD AN OBJECT TO CUB DY
.49
.49
DSNIDM
DSNIMSAR RELEASE ALL MSA RESOURC
1.46
1.46
DSNIDM
DSNINXTP READ SPECFD PAG USNG MS
.49
.49
DSNIDM
DSNIOST2 SET ON CUB DEF ON IX FA
.98
.98
DSNIDM
DSNIPSBL LOC AN EXISTING PSCB
.49
.49
DSNIDM
DSNIRNXT FETCH NEXT ROW TO PROG
14.15 14.15
DSNIDM
DSNIRPRV TABLE SPACE SCAN BACKWA
.49
.49
DSNXGRDS
RDS ACCESS MODULE GENER
.32
.32
(subsequent lines omitted)
6.84%
16.00
*****
*
**
*
*
*
*
**
*
**
*
******************
*
Strobe will identify the DB2 services
utilized by the SQL
DB2 Address Space Reporting
#PUP
.SYSTEM
MODULE
NAME
** PROGRAM USAGE BY PROCEDURE **
SYSTEM SERVICES
SECTION
NAME
FUNCTION
.DB2
DB2 SYSTEM SERVICES
% CPU TIME MARGIN OF ERROR
SOLO TOTAL 00
8.00
DSNBBM
DSNB1GET RETRIEVE REQUESTED PAGE
3.41
3.41
DSNBBM
DSNB1REL PAGE RELEASE ROUTINE
.49
.49
DSNECP10 DSNAPRH
PGM REQUEST APPL INTERF
1.46
1.46
DSNECP10 DSNECP21 PARSE DSN COMMAND
.49
.49
DSNGEDM
DATA MGT DBD/SKCT RTNS
.49
.49
DSNIDM
DSNICSMP CHK MAP PAGE CONSISTENC
.49
.49
DSNIDM
DSNICUBD ADD AN OBJECT TO CUB DY
.49
.49
DSNIDM
DSNIMSAR RELEASE ALL MSA RESOURC
1.46
1.46
DSNIDM
DSNINXTP READ SPECFD PAG USNG MS
.49
.49
DSNIDM
DSNIOST2 SET ON CUB DEF ON IX FA
.98
.98
DSNIDM
DSNIPSBL LOC AN EXISTING PSCB
.49
.49
DSNIDM
DSNIRNXT FETCH NEXT ROW TO PROG
14.15 14.15
DSNIDM
DSNIRPRV TABLE SPACE SCAN BACKWA
.49
.49
DSNXGRDS
RDS ACCESS MODULE GENER
.32
.32
(subsequent lines omitted)
6.84%
16.00
*****
*
**
*
*
*
*
**
*
**
*
******************
*
Strobe will identify the DB2 services
utilized by the SQL
Thank
You
Download