Understanding IBM Tivoli OMEGAMON for DB2 Batch Reporting, Customization and Tuning Practices

  • View
    2.588

  • Download
    1

Embed Size (px)

Transcript

  • 1. Understanding IBM TivoliOMEGAMON for DB2 BatchReporting, Customization andTuning PracticesSession Number IDZ-1155BCneyt Gksu, VBTCuneyt.Goksu@vbt.com.tr #ibmiod

2. General Tuning Process Application Performance o Application Logic o SQL o Application Server Database Design o Tablespace, Table & Index Design o Normalization DB2 Subsystem o Pools, zParms, Logs, Locks, DDF Others o Network o Operating System o DASD#ibmiod 3. Two OptionsManual Tool Or- Explain - Data Studio- DB2 Commands- Omegamon Family- RTS - Other DB2 Tools such asQuery Monitor, Query Tuner#ibmiod 4. Or Both Manual Both Tool#ibmiod 5. DB2 System and Application Monitoring & Tuning Online Monitoring o Real Time or Near Real time o Snapshot (Interval Based) o Good for Real Time Problem solving such as Lock Conflicts, Pool Shortages EDM Pool Tuning: zParm EDM_SKELETON_POOL DB2 V10 CM8 #ibmiod 6. DB2 System and Application Monitoring & Tuning Batch Reporting o DB2 Traces o SMF Configuration o Reporting and Operation Structure DB2 Traces #ibmiod 7. DB2 System and Application Monitoring & Tuning DB2 Traces START TRACE CommandPERFM : performance analysis and tuning (specific events in the system)ACCTG : accounting for a particular program or authorization ID (for each thread)STAT : statistical data for various components of DB2 at time intervalsAUDIT: audit data from various components of DB2MONITOR: trace data available to DB2 monitor application programs DB2 Traces Start Automatically from zPARMFor Audit : AUDITST (YES|NO|List of Classes)For Accounting: SMFACCT (YES|NO|List of Classes)For Statistics: SMFSTAT (YES|NO|List of Classes)SMFACCT...................1,2,3,7,8,10SMFSTAT......................1,3,4,5,6,8AUDITST......................................2#ibmiod 8. DB2 System and Application Monitoring & Tuning SMF Configuration SMF Record IFCIDIFCIDIFCID 100 statistics (1) System (2) Database (202) SystemServices Services Parameters 100 statistics (225) System (230) DataServices Sharing 101 accounting (3) Agent(3) Agentaccounting accounting 102 perfor. SMF ConfigurationSMF must be active & SMFPRMxx member allows 100-102DSNW133I csect TRACE DATA LOST, dest NOT ACCESSIBLE RC=code #ibmiod 9. DB2 System and Application Monitoring & Tuning SMF ConfigurationWhat are OMEGAMON for DB2 recommendations for preventing DSNW133I?http://www-01.ibm.com/support/docview.wss?uid=swg21187080 SUBSYS(STC,TYPE(100:102)) ACTIVE SMFCOMP (OFF|ON) DB2 zPARM in V10 + The z/OS compression serviceCSRCESRV#ibmiod 10. DB2 System and Application Monitoring & Tuning Reporting and Operation Structure //OMEGA EXEC PGM=DB2PM,PARM=DATEFORMAT=DD-MM-YY //INPUTDD DD DISP=SHR,DSN=ISB.SMFBACK.SYSZ.Y2012.A07.G16 //SYSIN DD *SMF Input GLOBAL TIMEZONE (-2) STATISTICS Type of report REDUCE * FROM (21-06-11,11:00),TO(21-06-11,11:30) * INTERVAL (15)INCLUDE(MEMBER(PR4B)) REPORTLAYOUT(LONG) Layout *LAYOUT(SHORT) *DSETSTAT EXEC#ibmiod 11. DB2 System and Application Monitoring & Tuning Reporting and Operation Structure ReportTrace TypeClass AccountingAccounting1,2,3,5,7,8 Audit Audit 1,2,3,4,5,6,7,8 I/O ActivityPerformance 4,5,21 Locking Statistics3 Performance 4,6,7,17,20,21 SQL ActivityAccounting1,2,3,5,7,8 Performance 2, 3, 4, 6, 8, 9, 10, 13, 16, 17, 30, 31, 32 StatisticsStatistics1,3,4,5,6,8 System Parameters Performance Any Statistics5 Utility Accounting1 Performance 3, 4, 6, 10, 13, 16, 17#ibmiod 12. DB2 System and Application Monitoring & Tuning Fundamental Report Analysis with Accounting Report1LOCATION: PR0BPLOC OMEGAMON XE FOR DB2 PERFORMANCE MONITOR ( V4 )PAGE: 1-1GROUP: DSNPR0B ACCOUNTING REPORT - SHORTREQUESTED FROM: NOT SPECIFIED MEMBER: PR1B TO: NOT SPECIFIEDSUBSYSTEM: PR1B ORDER: PRIMAUTH-PLANNAME INTERVAL FROM: 15-07-12 23:01:05.38DB2 VERSION: V9 SCOPE: MEMBER TO: 16-07-12 23:04:47.05OCCURS COMMIT INSERTS OPENSPREPARE CLASS2 EL.TIME BUF.UPDT LOCK SUSPRIMAUTHDISTRS SELECTS UPDATES CLOSES CLASS1 EL.TIME CLASS2 CPUTIME SYN.READ LOCKOUT PLANNAME ROLLBK FETCHES MERGES DELETES CLASS1 CPUTIMEGETPAGES TOT.PREF--------------------------- ------- ------- ------- ------- -------------- -------------- -------- --------AINTRNAA 23230.00 10.13 0.00 0.014619 1.09 0.04 POFATURA 00.001.049.61 2.917138 0.004550 0.1701 15.260.000.00 0.11477040.13 0.48----------------------------------------------------------------------------------------------------------------!PROGRAM NAMETYPEOCCURS ALLOCS SQLSTMT CL7 ELAP.TIMECL7 CPU TIME CL8 SUSP.TIME CL8 SUSP!!TIBSQLGVPACKAGE23 71 2.04 0.001293 0.000336 0.0003810.17!!TIBSQLHSPACKAGE 815020.75 0.006328 0.001538 0.0034642.00!!TIBSQLISPACKAGE22220 9.00 0.003570 0.000663 0.0024371.32!!GET_AP1PACKAGE22 33 6.00 0.000564 0.000277 0.0000000.00!!GET_CU1PACKAGE 814219.25 0.000375 0.000236 0.0000000.00!!GET_EX3PACKAGE22 33 6.00 0.000524 0.000316 0.0000500.14!!GET_IF1PACKAGE22 33 6.00 0.000524 0.000336 0.0000000.00!---------------------------------------------------------------------------------------------------------------------------!TRUNCATED VALUEFULL VALUE!GET_AP1 GET_APP_TYPE_AND_ACC_REST!GET_CU1 GET_CUSTOMER_ACCOUNTS!GET_EX3 GET_EXTRA_RIGHT_INFO_FROM_GROUP_ID Packages listThis time is the period!GET_IF1 GET_IF_CHILD_OF_ROOT used to gather information. in this period#ibmiod 13. DB2 System and Application Monitoring & Tuning Fundamental Report Analysis with Accounting Report OCCURS is the number of transaction.This analysis show which is performance bottle neck, CLASS2 EL.TIME is average execution time of DB2 Application Server or DB2 Server. CLASS2 CPUTIME is average time that DB2 used CPU. Multiplying OCCURS by CLASS2 EL.TIME gives the total execution time of DB2 in this period(job). Multiplying OCCURS by CLASS2 CPUTIME gives the total time that DB2 used this period(job).OCCURS * CLASS2 EL.TIME OCCURS * CLASS2 CPUTIMEThe part of DAY3 report #ibmiod 14. DB2 System and Application Monitoring & Tuning Fundamental Report Analysis with Accounting Report PROGRAM NAME is package name used in this period(this job). CL7 ELAP.TIME is average execution time of the package. This analysis show what package is CL7 CPU TIME is average time that the package used CPU. performance bottle neck. OCCURS is number of the package called. Multiplying OCCURS by CL7 ELAP.TIME gives the total execution time of the package. Multiplying OCCURS by CL7 CPU TIME gives the total time that the package used CPU. OCCURS * CL7 ELAP.TIMEOCCURS * CL7 CPU TIMEThe part of DAY3 report#ibmiod 15. DB2 System and Application Monitoring & Tuning Fundamental Report Analysis with Accounting Report Local Response Time = Class 1 elapsed Time SQL = Class 2 elapsed time Non-SQL = Class 1 Class 2 elapsed time Lock Wait = Class 3 Lock Susp CPU Time = Class 2 CPU Time Sync Read = Class 3 Sync I/O Susp Wait for Prefetch = Class 3 Other read I/O Susp Other = SQL - (LOCK WAIT + CPU TIME + SYNCHRONOUS READ + WAIT FOR PREFETCH) #ibmiod 16. DB2 System and Application Monitoring & Tuning Fundamental Report Analysis with Accounting ReportELAPSED TIME 2.917138 Local Response Time (Class1)ELAPSED TIME 0.014619 SQL Elapsed Time (Class 2)ELAPSED TIME 2,902519 Non-SQL (Class 1 Class 2)LOCK/LATCH(DB2+IRLM) 0.000225 Class 3 Lock SuspCPU TIME 0.004550 Class 2 CPU TimeSYNCHRON. I/O0.003362 Class 3 Sync I/O SuspOTHER READ I/O 0.000000 Class 3 Other read I/O SuspOTHER = 0,014619 - 0,008137 = 0,006482First to look @If most time spent on non-SQL activities Look for reason for bad performance outside DB2 CICS / IMS-DC Access to other databases File processing Program instructions, etc. etc... #ibmiod 17. DB2 System and Application Monitoring & Tuning Fundamental Report Analysis with Accounting ReportSecond to look @What is the major contributor to class 2 elapsed time? High OTHER means System Related such as CPU Queuing, Paging,... High Class 3 Sync I/O Susp time o If (Sync I/O elapsed time / # Sync I/O events) > 10ms then system-related problemSYNCHRON. I/O 0.003362 / 2.22 < 10ms High Class 3 lock/latch suspension times (Application-related) High Class 2 CPU time (Application-related) For application-related problems, check: And for locking-related problems, check: Missing matching columns Duration of commit interval Nonindexable predicates Lock avoidance Non-Boolean term predicates Isolation level Avoidable sort Missing denormalization Not index-only #ibmiod 18. DB2 System and Application Monitoring & Tuning Fundamental Report Analysis with Statistics ReportClass Data Collected IFCIDs Activated1 Statistics data1, 2, 105,106, 202, 2252 Installation-defined statistics record 1523 Deadlock, lock escalation, group buffer pool, data set 172, 196, 250, 258, 261, 262, 313, 330, extension information, indications of long-running335, 337 URs, and active log space shortages4 DB2 exceptional conditions 173,191-195, 203-210, 235, 236, 238, 267, 268, 3435 DB2 data sharing statistics record 2306 Storage usage details2258 Data set I/O statistics199 CPU overhead of the DB2 Statistics Traces is negligible SMFSTAT YES (default) starts the trace for the default classes (1, 3, 4, 5, 6) STATIME set to 1 minute, Only 1440 intervals per day DB2 Statistics Records are written as SMF 100 records Recommendation to copy SMF records, and to keep them separately #ibmiod 19. DB2 System and Application Monitoring & Tuning Dataset Open/Close TuningOPEN/CLOSE ACTIVITY QUANTITY /SECOND /THREAD /COMMIT--------------------------- -------- ------- ------- -------OPEN DATASETS - HWM 15004.00 N/A N/A N/AOPEN DATASETS 14145.65 N/A N/A N/ADS NOT IN USE,NOT CLOSE-HWM 14786.00 N/A N/A N/ADS NOT IN USE,NOT CLOSED13104.75 N/A N/A N/AIN USE DATA SETS 1040.89 N/A N/A N/ADSETS CLOSED-THRESH.REACHED 400.000.000.00 0.00DSETS CONVERTED R/W -> R/O 16695.000.300.040.01TOTAL GENERAL QUANTITY /SECOND /THREAD /COMMIT---------------------------------- ------- ------- ------...NUMBER OF DATASET OPENS 20528.

Recommended

View more >