36
DB2 Performance & Tuning with iStrobe Frank Schuler Strobe MF Application Performance Management Field Technical Support September 20, 2012

DB2 Performance & Tuning with iStrobe Frank Schuler Strobe MF Application Performance Management Field Technical Support September 20, 2012

Embed Size (px)

Citation preview

Page 1: DB2 Performance & Tuning with iStrobe Frank Schuler Strobe MF Application Performance Management Field Technical Support September 20, 2012

DB2 Performance & Tuning with iStrobe

Frank Schuler

Strobe MF Application Performance Management Field Technical Support

September 20, 2012

Page 2: DB2 Performance & Tuning with iStrobe Frank Schuler Strobe MF Application Performance Management Field Technical Support September 20, 2012

2

DB2 Performance & Tuning with iStrobe

1. Strobe & iStrobe 2. CICS Case Study 3. Batch Case Study 4. DB2 / DDF Case Study 5. Consider DB2 System Services

Page 3: DB2 Performance & Tuning with iStrobe Frank Schuler Strobe MF Application Performance Management Field Technical Support September 20, 2012

The Strobe Process

MeasuringMeasuring

Sample Dataset

ReportingReporting

Add Request Pgm Execution

StrobeMeasurement Strobe

Reporter

Strobe Profile

iStrobe

Page 4: DB2 Performance & Tuning with iStrobe Frank Schuler Strobe MF Application Performance Management Field Technical Support September 20, 2012

CPU

I/O

STROBE drills down through all the layers of your OS/390 address space to pinpoint specific areas of resource demand

Data sets

I/O Devices

I/O Subsystems

Database Management Systems

OS/390 Operating System

Database & IO Subsystems

CICS

Library Routines

UserPrograms

What Strobe Sees

Page 5: DB2 Performance & Tuning with iStrobe Frank Schuler Strobe MF Application Performance Management Field Technical Support September 20, 2012

CPU

I/O

STROBE drills down through all the layers of your OS/390 address space to pinpoint specific areas of resource demand

Data sets

I/O Devices

I/O Subsystems

Database Management Systems

OS/390 Operating System

Database and IO Subsystems

CICS

Library Routines

UserPrograms

What Strobe Sees

Page 6: DB2 Performance & Tuning with iStrobe Frank Schuler Strobe MF Application Performance Management Field Technical Support September 20, 2012

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

Page 7: DB2 Performance & Tuning with iStrobe Frank Schuler Strobe MF Application Performance Management Field Technical Support September 20, 2012

• 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

iStrobe Automates the Strobe Profile Report Interpretation Process

Page 8: DB2 Performance & Tuning with iStrobe Frank Schuler Strobe MF Application Performance Management Field Technical Support September 20, 2012

Traditional Strobe Text Based Reports

Page 9: DB2 Performance & Tuning with iStrobe Frank Schuler Strobe MF Application Performance Management Field Technical Support September 20, 2012

iStrobe Automates Strobe Interpretation and Analysis

Page 10: DB2 Performance & Tuning with iStrobe Frank Schuler Strobe MF Application Performance Management Field Technical Support September 20, 2012

iStrobe – Initial Panel

Page 11: DB2 Performance & Tuning with iStrobe Frank Schuler Strobe MF Application Performance Management Field Technical Support September 20, 2012

CICS Case Study

12

Page 12: DB2 Performance & Tuning with iStrobe Frank Schuler Strobe MF Application Performance Management Field Technical Support September 20, 2012

iStrobe 4.2 – Measurement Session Data - CICS

Page 13: DB2 Performance & Tuning with iStrobe Frank Schuler Strobe MF Application Performance Management Field Technical Support September 20, 2012

iStrobe 4.2 – Program CPU Usage

CA Detector

Page 14: DB2 Performance & Tuning with iStrobe Frank Schuler Strobe MF Application Performance Management Field Technical Support September 20, 2012

iStrobe 4.2 – DB2 Activity by Query

Page 15: DB2 Performance & Tuning with iStrobe Frank Schuler Strobe MF Application Performance Management Field Technical Support September 20, 2012

iStrobe 4.2 – SQL Analysis

Page 16: DB2 Performance & Tuning with iStrobe Frank Schuler Strobe MF Application Performance Management Field Technical Support September 20, 2012

iStrobe 4.2 – DB2 Explain Expanded

Page 17: DB2 Performance & Tuning with iStrobe Frank Schuler Strobe MF Application Performance Management Field Technical Support September 20, 2012

iStrobe 4.2 – DB2 Catalog Statistics

Page 18: DB2 Performance & Tuning with iStrobe Frank Schuler Strobe MF Application Performance Management Field Technical Support September 20, 2012

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 – PRFX_CD• 2 – STS_QUAL_CD• 3 – STS_CD• 4 – LOC_PLAN_CD• 5 – PLAN_PROFL_UID

•Get Pages & CPU reduced

Page 19: DB2 Performance & Tuning with iStrobe Frank Schuler Strobe MF Application Performance Management Field Technical Support September 20, 2012

Batch

20

Page 20: DB2 Performance & Tuning with iStrobe Frank Schuler Strobe MF Application Performance Management Field Technical Support September 20, 2012

iStrobe 4.2 – Measurement Session Data - Batch

Page 21: DB2 Performance & Tuning with iStrobe Frank Schuler Strobe MF Application Performance Management Field Technical Support September 20, 2012

iStrobe 4.2 – Program CPU Usage

CA Detector

Page 22: DB2 Performance & Tuning with iStrobe Frank Schuler Strobe MF Application Performance Management Field Technical Support September 20, 2012

iStrobe 4.2 – DB2 Activity by Query

Page 23: DB2 Performance & Tuning with iStrobe Frank Schuler Strobe MF Application Performance Management Field Technical Support September 20, 2012

iStrobe 4.2 – DB2 Explain

Page 24: DB2 Performance & Tuning with iStrobe Frank Schuler Strobe MF Application Performance Management Field Technical Support September 20, 2012

iStrobe 4.2 – DB2 Catalog Statistics

Page 25: DB2 Performance & Tuning with iStrobe Frank Schuler Strobe MF Application Performance Management Field Technical Support September 20, 2012

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%

Page 26: DB2 Performance & Tuning with iStrobe Frank Schuler Strobe MF Application Performance Management Field Technical Support September 20, 2012

DDF

27

Page 27: DB2 Performance & Tuning with iStrobe Frank Schuler Strobe MF Application Performance Management Field Technical Support September 20, 2012

iStrobe 4.2 – Measurement Session Data - DDF

Page 28: DB2 Performance & Tuning with iStrobe Frank Schuler Strobe MF Application Performance Management Field Technical Support September 20, 2012

iStrobe 4.2 – DB2 Stored Procedure SQL Activity

Page 29: DB2 Performance & Tuning with iStrobe Frank Schuler Strobe MF Application Performance Management Field Technical Support September 20, 2012

iStrobe 4.2 – DB2 Explain

Page 30: DB2 Performance & Tuning with iStrobe Frank Schuler Strobe MF Application Performance Management Field Technical Support September 20, 2012

iStrobe 4.2 – DB2 Catalog Statistics

Page 31: DB2 Performance & Tuning with iStrobe Frank Schuler Strobe MF Application Performance Management Field Technical Support September 20, 2012

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 – CIRCUIT_ID• 3 – PON• 4 – USOC• 5 – JURISDICTION_CD• 6 – BILL_DATE •

•Get Pages & CPU reduced

Page 32: DB2 Performance & Tuning with iStrobe Frank Schuler Strobe MF Application Performance Management Field Technical Support September 20, 2012

Consider what DB2 System Services is

doing on behalf of your SQL as part of your

analysis

34

Page 33: DB2 Performance & Tuning with iStrobe Frank Schuler Strobe MF Application Performance Management Field Technical Support September 20, 2012

DB2Data

Relational Data System(RDS)Relational Data System(RDS)

• Checks SQL statements• Processes Stage 2 predicates• Performs sort and optimization

• Checks SQL statements• Processes Stage 2 predicates• Performs sort and optimization

Data Manager(DM)Data Manager(DM)

• Processes Stage 1 predicates• Processes indexable predicates• Interfaces with IRLM

• Processes Stage 1 predicates• Processes indexable predicates• Interfaces with IRLM

Buffer Manager(BM)Buffer Manager(BM)

• Manages bufferpools• Moves data to and from DASD• Manages bufferpools• Moves data to and from DASD

Database Services Address Space

Page 34: DB2 Performance & Tuning with iStrobe Frank Schuler Strobe MF Application Performance Management Field Technical Support September 20, 2012

DB2 Address Space Reporting #PUP ** PROGRAM USAGE BY PROCEDURE **

.SYSTEM SYSTEM SERVICES .DB2 DB2 SYSTEM SERVICES MODULE SECTION FUNCTION % CPU TIME MARGIN OF ERROR 6.84% NAME NAME SOLO TOTAL 00 8.00 16.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)

Strobe will identify the DB2 services utilized by the SQL

Page 35: DB2 Performance & Tuning with iStrobe Frank Schuler Strobe MF Application Performance Management Field Technical Support September 20, 2012

DB2 Address Space Reporting #PUP ** PROGRAM USAGE BY PROCEDURE **

.SYSTEM SYSTEM SERVICES .DB2 DB2 SYSTEM SERVICES MODULE SECTION FUNCTION % CPU TIME MARGIN OF ERROR 6.84% NAME NAME SOLO TOTAL 00 8.00 16.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)

Strobe will identify the DB2 services utilized by the SQL

Page 36: DB2 Performance & Tuning with iStrobe Frank Schuler Strobe MF Application Performance Management Field Technical Support September 20, 2012

Thank You