262
Tuning Guide OMEGAMON II® for DB2 Version 540 G251246600 August 2004 Candle Corporation 100 North Sepulveda Blvd. El Segundo, California 90245

OMEGAMON II for DB2 Tuning Guide, Version 540 - IBMpublib.boulder.ibm.com/tividd/td/ITOMEGAIIDB2/G251... · 2 OMEGAMON II for DB2 Tuning Guide, Version 540 Registered trademarks and

Embed Size (px)

Citation preview

Page 1: OMEGAMON II for DB2 Tuning Guide, Version 540 - IBMpublib.boulder.ibm.com/tividd/td/ITOMEGAIIDB2/G251... · 2 OMEGAMON II for DB2 Tuning Guide, Version 540 Registered trademarks and

Tuning GuideOMEGAMON II® for DB2

Version 540

G251246600

August 2004

Candle Corporation100 North Sepulveda Blvd.

El Segundo, California 90245

Page 2: OMEGAMON II for DB2 Tuning Guide, Version 540 - IBMpublib.boulder.ibm.com/tividd/td/ITOMEGAIIDB2/G251... · 2 OMEGAMON II for DB2 Tuning Guide, Version 540 Registered trademarks and

2 OMEGAMON II for DB2 Tuning Guide, Version 540

Registered trademarks and service marks of Candle Corporation: AF/OPERATOR, AF/REMOTE, Availability Command Center, Candle, Candle CIRCUIT, Candle Command Center, Candle Direct logo, Candle eDelivery, Candle Electronic Customer Support, Candle logo, Candle Management Server, Candle Management Workstation, CandleLight, CandleNet, CandleNet Command Center, CandleNet eBusiness Platform, CandleNet Portal, CL/CONFERENCE, CL/SUPERSESSION, CommandWatch, CT, CT/Data Server, CT/DS, DELTAMON, DEXAN, eBA, eBA*ServiceMonitor, eBA*ServiceNetwork, eBusiness at the speed of light, eBusiness Assurance, eBusiness Institute, ELX, EPILOG, ESRA, ETEWatch, IntelliWatch, IntelliWatch Pinnacle, MQSecure, MQView, OMEGACENTER, OMEGAMON, OMEGAMON II, OMEGAMON Monitoring Agent, OMEGAMON Monitoring Agents, OMEGAVIEW, OMEGAVIEW II, PQEdit, Response Time Network, Roma, SitePulse, Solutions for Networked Applications, Solutions for Networked Businesses, TMA2000, Transplex, and Volcano.Trademarks and service marks of Candle Corporation: AF/Advanced Notification, AF/PERFORMER, Alert Adapter, Alert Adapter Plus, Alert Emitter, AMS, Amsys, AutoBridge, AUTOMATED FACILITIES, Availability Management Systems, Business Services Composer, Candle Alert, Candle Business Partner Logo, Candle Command Center/SentinelManager, Candle CommandPro, Candle eSupport, Candle Insight, Candle InterFlow, Candle Managing what matters most, Candle Service Suite, Candle Technologies, CandleNet, CandleNet 2000, CandleNet Conversion, CandleNet eBP, CandleNet eBP Access for S.W.I.F.T., CandleNet eBP Administrator, CandleNet eBP Broker Access for Mercator or MQSI, CandleNet eBP Configuration, CandleNet eBP Connector, CandleNet eBP File Transfer, CandleNet eBP Host Connect, CandleNet eBP Object Access, CandleNet eBP Object Browser, CandleNet eBP Secure Access, CandleNet eBP Service Directory, CandleNet eBP Universal Connector, CandleNet eBP Workflow Access, CandleNet eBusiness Assurance, CandleNet eBusiness Exchange, CandleNet eBusiness Platform Administrator, CandleNet eBusiness Platform Connector, CandleNet eBusiness Platform Connectors, CandleNet eBusiness Platform Powered by Roma Technology, CandleNet eBusiness Platform Service Directory, Candle Vision, CCC, CCP, CCR2, CEBA, CECS, CICAT, CL/ENGINE, CL/GATEWAY, CL/TECHNOLOGY, CMS, CMW, Command & Control, Connect-Notes, Connect-Two, CSA ANALYZER, CT/ALS, CT/Application Logic Services, CT/DCS, CT/Distributed Computing Services, CT/Engine, CT/Implementation Services, CT/IX, CT/Workbench, CT/Workstation Server, CT/WS, !DB Logo, !DB/DASD, !DB/EXPLAIN, !DB/MIGRATOR, !DB/QUICKCHANGE, !DB/QUICKCOMPARE, !DB/SMU, !DB/Tools, !DB/WORKBENCH, Design Network, e2e, eBA*SE, eBAA, eBAAuditor, eBAN, eBANetwork, eBAAPractice, eBP, eBusiness Assurance Network, eBusiness at the speed of light, eBusiness at the speed of light logo, eBusiness Exchange, eBX, End-to-End, eNotification, ENTERPRISE, Enterprise Candle Command Center, Enterprise Candle Management Workstation, Enterprise Reporter Plus, ER+, ERPNet, ETEWatch Customizer, HostBridge, InterFlow, Candle InterFlow, Lava Console, Managing what matters most, MessageMate, Messaging Mastered, Millennium Management Blueprint, MMNA, MQADMIN, MQEdit, MQEXPERT, MQMON, NBX, NC4, NetGlue, NetGlue Extra, NetMirror, NetScheduler, New Times, New Team, New Readiness, OMA, OMC Gateway, OMC Status Manager, OMEGACENTER Bridge, OMEGACENTER Gateway, OMEGACENTER Status Manager, OMEGAMON/e, OMEGAMON Management Center, OSM, PathWAI, PC COMPANION, Performance Pac, Powered by Roma Technology, PowerQ, PQConfiguration, PQScope, Roma Application Manager, Roma Broker, Roma BSP, Roma Connector, Roma Developer, Roma FS/A, Roma FS/Access, RomaNet, Roma Network, Roma Object Access, Roma Secure, Roma WF/Access, Roma Workflow Access, RTA, RTN, SentinelManager, Somerset, Somerset Systems, Status Monitor, The Millennium Alliance, The Millennium Alliance logo, The Millennium Management Network Alliance, Tracer, Unified Directory Services, WayPoint, and ZCopy.Trademarks and registered trademarks of other companies: AIX, DB2, MQSeries and WebSphere are registered trademarks of International Business Machines Corporation. Citrix, WinFrame, and ICA are registered trademarks of Citrix Systems, Inc. Multi-Win and MetaFrame are trademarks of Citrix Systems, Inc. SAP is a registered trademark and R/3 is a trademark of SAP AG. UNIX is a registered trademark in the U.S. and other countries, licensed exclusively through X/Open Company Ltd. HP-UX is a trademark of Hewlett-Packard Company. SunOS is a trademark of Sun Microsystems, Inc. All other company and product names used herein may be trademarks or registered trademarks of their respective owners.

Copyright © August 2004, Candle Corporation, a California corporation. All rights reserved. International rights secured.

Threaded Environment for AS/400, Patent No. 5,504,898; Data Server with Data Probes Employing Predicate Tests in Rule Statements (Event Driven Sampling), Patent No. 5,615,359; MVS/ESA Message Transport System Using the XCF Coupling Facility, Patent No. 5,754,856; Intelligent Remote Agent for Computer Performance Monitoring, Patent No. 5,781,703; Data Server with Event Driven Sampling, Patent No. 5,809,238; Threaded Environment for Computer Systems Without Native Threading Support, Patent No. 5,835,763; Object Procedure Messaging Facility, Patent No. 5,848,234; End-to-End Response Time Measurement for Computer Programs, Patent No. 5,991,705; Communications on a Network, Patent Pending; Improved Message Queuing Based Network Computing Architecture, Patent Pending; User Interface for System Management Applications, Patent Pending.

NOTICE: This documentation is provided with RESTRICTED RIGHTS. Use, duplication, or disclosure by the Government is subject to restrictions set forth in the applicable license agreement and/or the applicable government rights clause.This documentation contains confidential, proprietary information of Candle Corporation that is licensed for your internal use only. Any unauthorized use, duplication, or disclosure is unlawful.

Page 3: OMEGAMON II for DB2 Tuning Guide, Version 540 - IBMpublib.boulder.ibm.com/tividd/td/ITOMEGAIIDB2/G251... · 2 OMEGAMON II for DB2 Tuning Guide, Version 540 Registered trademarks and

3

List of Figures . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7

Preface . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11Adobe Portable Document Format . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .12Candle Customer Service and Satisfaction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .14Documentation Conventions. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .15

What’s New . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19

Chapter 1. Getting Started . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23Overview. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .24Panel Format. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .25Using the Main Menu . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .27Function Keys . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .29Navigation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .30Customizing Cursor Placement . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .32Other Features. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .33Using the OMEGAMON II ISPF Menu. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .34Accessing Historical Features . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .36Features Within the ISPF Dialog . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .37Starting an OMEGAMON II Session . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .38Stopping an OMEGAMON II Session . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .40

Chapter 2. Defining Standards and Monitoring Performance . . . . . . . . . . . . . . . . . . . . . . . 41Chapter Overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .42Section A: Defining Performance Standards . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .44Characterizing System Performance . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .45Validating Default Exception Thresholds . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .46Modifying Exception Thresholds . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .48Writing Exception Rules . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .50Using Global Exclude Rules. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .52Saving Exception Settings . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .53Section B: Defining Historical Specifications . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .54Data Collection and Extraction Specifications . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .55Historical Reporting Options . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .56Section C: Monitoring System Performance. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .60Realtime Monitor. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .61

Chapter 3. Resolving Exception Conditions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 65Analyzing a Tripped Exception . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .66Monitoring DB2 and IRLM Messages. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .69

Contents

Page 4: OMEGAMON II for DB2 Tuning Guide, Version 540 - IBMpublib.boulder.ibm.com/tividd/td/ITOMEGAIIDB2/G251... · 2 OMEGAMON II for DB2 Tuning Guide, Version 540 Registered trademarks and

4 OMEGAMON II for DB2 Tuning Guide, Version 540

Guidelines for Resolving Exception Conditions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .70Using Historical Reports to Analyze Exceptions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .71

Chapter 4. Analyzing Thread Information. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 75Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .76Section A: Identify Threads by Connection Type . . . . . . . . . . . . . . . . . . . . . . . . . . . . .77Section B: Review Thread Information by Connection Type. . . . . . . . . . . . . . . . . . . . .78CICS Thread Information . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .80IMS Thread Information . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .83TSO Thread Information . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .84Batch Thread Information . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .85Utility Thread Information . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .86Distributed Thread Information . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .88Stored Procedures Thread Information . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .90System Thread Information . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .92Section C: Analyze Detailed Information . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .94Specify Application Trace . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .97Utility Detail . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .98Stopped Utility Information . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .99Section D: Reviewing SQL Information . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .100The SQL Call . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .102Section E: Other Methods for Analyzing Thread Detail . . . . . . . . . . . . . . . . . . . . . . . .103Analyzing Thread Information Using Historical Reports . . . . . . . . . . . . . . . . . . . . . . . .105Section F: Viewing Near-term Thread History. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .108Specifying Collection Options . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .110Specifying Report and Filter Options . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .113Viewing Thread Activity for a Report Period . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .116Viewing a Summary of Thread Activity . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .119Viewing Details About a Completed Thread . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .121Related Thread History Detail Panels . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .123Section G: Canceling a Thread. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .125

Chapter 5. Resolving Locking Conflicts . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .127Overview. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .128Locks, Claims Owned by a Thread . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .129Locks, Claims Causing a Thread to Wait . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .130Tracking Locking Conflicts Using Historical Reports. . . . . . . . . . . . . . . . . . . . . . . . . . .131

Chapter 6. Analyzing Application Performance with ATF . . . . . . . . . . . . . . . . . . . . . . . . . 133Section A: Basic ATF Functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .134Logging Screens . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .136Application Trace Facility Menu. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .137Starting a Trace . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .138Viewing Trace Data . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .140Stopping a Trace . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .143

Page 5: OMEGAMON II for DB2 Tuning Guide, Version 540 - IBMpublib.boulder.ibm.com/tividd/td/ITOMEGAIIDB2/G251... · 2 OMEGAMON II for DB2 Tuning Guide, Version 540 Registered trademarks and

5

Section B: Program Detail Information . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .144SQL Summary Information . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .146Sort Summary Information . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .147Lock Summary Information . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .148Scan Summary Information . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .149Section C: SQL Statement Level Information . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .151Lock Detail for an SQL Statement . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .154Event Detail for an SQL Statement . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .156Section D: Viewing Trace Data from a Dataset . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .158Specifying a Trace Dataset. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .159Selecting a Dataset . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .160Viewing the Dataset. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .161Releasing the Dataset . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .163

Chapter 7. Analyzing IFCID Trace Data . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .165Overview. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .166

Chapter 8. Analyzing Distributed Data Performance . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 169Overview. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .170Distributed Data Facility Statistics . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .171Distributed Data Facility VTAM Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .174Distributed Data Facility VTAM Detail . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .176Distributed Thread Detail . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .179

Chapter 9. Analyzing DB2 Objects . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 183Overview. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .184Analyzing Poor Response Time for a Volume. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .185Excessive Activity in Buffer Pool 0 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .188

Chapter 10. Analyzing DB2 Resource Manager Performance . . . . . . . . . . . . . . . . . . . . . . . 191Overview. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .192Buffer Manager . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .194Analyzing Buffer Pool Performance . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .196Log Manager. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .202Log Dataset Information . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .204EDM Pool . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .205EDM Pool Tuning Indications . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .208EDM Pool Snapshot . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .210Bind Statistics . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .213

Chapter 11. Analyzing Query Performance . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 215Overview. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .216How SQL Calls Affect Performance . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .218

Appendix A. Automated Facilities (XLF, ASF, TSF) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 221Overview. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .222

Page 6: OMEGAMON II for DB2 Tuning Guide, Version 540 - IBMpublib.boulder.ibm.com/tividd/td/ITOMEGAIIDB2/G251... · 2 OMEGAMON II for DB2 Tuning Guide, Version 540 Registered trademarks and

6 OMEGAMON II for DB2 Tuning Guide, Version 540

Controlling Automated Features . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .223Exception Logging Facility (XLF). . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .224Automatic Screen Facility (ASF) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .225Setting Parameters for XLF and ASF Operation. . . . . . . . . . . . . . . . . . . . . . . . . . . . . .226Timed Screen Facility (TSF). . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .228Setting Printer and Routing Options . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .230Using Screen Spaces in ASF and TSF . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .232

Appendix B. Navigation Flowcharts . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 235Section A: Realtime Panels . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .236Exception Analysis . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .237Thread Activity . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .238Locking Conflicts. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .240Resource Managers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .241Application Trace Facility. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .243Distributed Data Facility . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .245Object Analysis . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .247Miscellaneous Displays . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .249Profile Maintenance Facility . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .251Near-Term Historical Information. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .253Section B: Historical ISPF Panels . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .255

Index . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 257

Page 7: OMEGAMON II for DB2 Tuning Guide, Version 540 - IBMpublib.boulder.ibm.com/tividd/td/ITOMEGAIIDB2/G251... · 2 OMEGAMON II for DB2 Tuning Guide, Version 540 Registered trademarks and

7

FIGURE 1. OMEGAMON II Panel Format . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .25FIGURE 2. .Realtime Main Menu . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .27FIGURE 3. The Background Menu Option Is Selected. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .30FIGURE 4. OMEGAMON II ISPF Primary Options Menu . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .34FIGURE 5. Historical Main Menu . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .36FIGURE 6. Profile Maintenance Menu. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .48FIGURE 7. Exception Analysis Options Menu . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .49FIGURE 8. Set Exception Analysis Options for ETIM Exception Panel. . . . . . . . . . . . . . . . . . . . . . .51FIGURE 9. Save New/Altered User Profile Panel . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .53

FIGURE 10. Historical Reporter Menu . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .56FIGURE 11. Historical Reporter Options Menu . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .57FIGURE 12. Historical Reporter Selection Criteria Panel . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .57FIGURE 13. Historical Reporter Date/Time Criteria Panel . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .58FIGURE 14. Historical Reporter Specifications Panel. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .59FIGURE 15. Statistics Reports Panel . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .59FIGURE 16. Summary of DB2 Activity Panel . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .61FIGURE 17. All Threads Connected to DB2 Panel . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .66FIGURE 18. Exception Messages for All Exceptions panel. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .67FIGURE 19. Thread Detail Panel. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .68FIGURE 20. Accounting Summary Report . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .72FIGURE 21. Summary of DB2 Activity Panel . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .77FIGURE 22. CICS Thread Summary Panel . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .80FIGURE 23. CICS RCT Summary Panel . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .81FIGURE 24. Utility Summary Panel. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .86FIGURE 25. Inactive Threads Panel . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .87FIGURE 26. Distributed Database Access Thread Summary Panel . . . . . . . . . . . . . . . . . . . . . . . . . .88FIGURE 27. Distributed Allied Thread Summary Panel . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .89FIGURE 28. Stored Procedures Thread Summary Panel . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .90FIGURE 29. All Threads Connected to DB2 Panel . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .93FIGURE 30. Thread Detail Panel. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .95FIGURE 31. Specify Application Trace panel . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .97FIGURE 32. Utility Detail Information Panel . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .98FIGURE 33. Stopped Utility Detail Information Panel . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .99FIGURE 34. Current SQL Counts Panel . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .101FIGURE 35. SQL Call Being Executed Panel . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .102FIGURE 36. Buffer Manager Information Panel. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .105FIGURE 37. (Part 1 of 2) Buffer Pool Detail Panel . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .106FIGURE 38. (Part 2 of 2) Buffer Pool Detail Panel . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .107FIGURE 39. Data Collection Specifications Panel . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .110FIGURE 40. Online Historical Collection Options Panel . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .112

List of Figures

Page 8: OMEGAMON II for DB2 Tuning Guide, Version 540 - IBMpublib.boulder.ibm.com/tividd/td/ITOMEGAIIDB2/G251... · 2 OMEGAMON II for DB2 Tuning Guide, Version 540 Registered trademarks and

8 OMEGAMON II for DB2 Tuning Guide, Version 540

FIGURE 41. Near-Term Thread History Filter Options Panel . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .113FIGURE 42. Thread History by Report Interval Panel . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .116FIGURE 43. Sample Groupby Panel (Thread History by Plan) . . . . . . . . . . . . . . . . . . . . . . . . . . . .118FIGURE 44. Thread History Summary Panel . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .119FIGURE 45. Thread History Detail Panel. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .121FIGURE 46. Cancel Thread Panel . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .125FIGURE 47. Locking Conflicts Panel . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .128FIGURE 48. Locks/Claims Owned by a Thread Panel . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .129FIGURE 49. Locks/Claims Causing a Thread to Wait Panel . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .130FIGURE 50. Application Trace Facility Menu. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .137FIGURE 51. Specify Application Trace Panel. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .138FIGURE 52. Application Trace Thread Summary Panel. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .140FIGURE 53. Application Trace Unit of Work Summary Panel . . . . . . . . . . . . . . . . . . . . . . . . . . . . .141FIGURE 54. Application Trace Program Summary Panel . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .142FIGURE 55. Stop Application Trace Request Panel . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .143FIGURE 56. Application Trace Program Detail Panel. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .144FIGURE 57. Application Trace SQL Index Panel . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .151FIGURE 58. Application Trace SQL Detail Panel. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .152FIGURE 59. Application Trace Lock Detail Panel . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .154FIGURE 60. Application Trace Event Detail Panel . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .156FIGURE 61. Specify Application Trace Panel. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .159FIGURE 62. Select Dataset and Trace Parameters Panel . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .160FIGURE 63. Application Trace Thread Summary—View Dataset Panel . . . . . . . . . . . . . . . . . . . . . .161FIGURE 64. Application Trace Unit of Work Summary Panel . . . . . . . . . . . . . . . . . . . . . . . . . . . . .162FIGURE 65. Stop Viewing Trace Dataset Panel . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .163FIGURE 66. Distributed Data Facility Statistics Panel. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .171FIGURE 67. Distributed Data Facility VTAM Summary Panel . . . . . . . . . . . . . . . . . . . . . . . . . . . . .174FIGURE 68. Distributed Data Facility VTAM Detail Panel . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .176FIGURE 69. (Part 1 of 2) Distributed Thread Detail Panel . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .179FIGURE 70. (Part 2 of 2) Distributed Thread Detail Panel . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .180FIGURE 71. Volume Activity Summary Panel . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .185FIGURE 72. Volume Database Activity Panel . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .186FIGURE 73. Volume Spacename Activity Panel . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .187FIGURE 74. Object Activity Summary Panel . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .188FIGURE 75. Database Activity Panel . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .189FIGURE 76. Database Allocations Panel . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .190FIGURE 77. Resource Managers and Other DB2 Subsystem Information Menu . . . . . . . . . . . . . . .192FIGURE 78. Buffer Manager Information Panel. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .194FIGURE 79. (Part 1 of 2) Buffer Pool Detail Panel . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .197FIGURE 80. (Part 2 of 2) Buffer Pool Detail Panel . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .198FIGURE 81. Buffer Pool Snapshot Datasets Panel . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .201FIGURE 82. DB2 Log Manager Information Panel . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .202FIGURE 83. DB2 Log Dataset Information Panel . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .204FIGURE 84. EDM Pool Information Panel . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .206FIGURE 85. EDM Pool Snapshot Summary Panel . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .210

Page 9: OMEGAMON II for DB2 Tuning Guide, Version 540 - IBMpublib.boulder.ibm.com/tividd/td/ITOMEGAIIDB2/G251... · 2 OMEGAMON II for DB2 Tuning Guide, Version 540 Registered trademarks and

9

FIGURE 86. Bind Statistics Panel . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .213FIGURE 87. SQL Call Being Executed Panel . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .216FIGURE 88. OMEGAMON II for DB2 Realtime Main Menu . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .236FIGURE 89. Hierarchy of Exception Analysis Panels . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .237FIGURE 90. Hierarchy of Thread Activity Panels. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .238FIGURE 91. Hierarchy of Locking Conflict Panels . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .240FIGURE 92. Hierarchy of Resource Managers and Other Subsystem Information Panel . . . . . . . . .241FIGURE 93. Hierarchy of Application Trace Facility Panels . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .243FIGURE 94. Hierarchy of Distributed Database System Panels . . . . . . . . . . . . . . . . . . . . . . . . . . . .245FIGURE 95. Hierarchy of Object Analysis Panels. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .247FIGURE 96. Hierarchy of Address Space and OMEGAMON Commands Panels . . . . . . . . . . . . . . .249FIGURE 97. .Hierarchy of Profile Maintenance Facility Panels. . . . . . . . . . . . . . . . . . . . . . . . . . . . .251FIGURE 98. Hierarchy of Near-Term Historical Panels. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .253FIGURE 99. Hierarchy of Historical Component Panels . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .255

Page 10: OMEGAMON II for DB2 Tuning Guide, Version 540 - IBMpublib.boulder.ibm.com/tividd/td/ITOMEGAIIDB2/G251... · 2 OMEGAMON II for DB2 Tuning Guide, Version 540 Registered trademarks and

10 OMEGAMON II for DB2 Tuning Guide, Version 540

Page 11: OMEGAMON II for DB2 Tuning Guide, Version 540 - IBMpublib.boulder.ibm.com/tividd/td/ITOMEGAIIDB2/G251... · 2 OMEGAMON II for DB2 Tuning Guide, Version 540 Registered trademarks and

11

Preface

This guide is an introduction to the classic interface for OMEGAMON II® for DB2, Version 540. OMEGAMON II® for DB2 is a component of OMEGAMON XE for DB2 on z/OS. This guide covers basic information you need to get started, including how to sign on and off, how to get help, and how to set performance standards for monitoring your DB2 system. The guide also contains some common tuning scenarios that will help you maximize the efficiency of your DB2 system.

Who should read this bookThis manual is intended for data center personnel who are responsible for monitoring DB2 performance, systems programmers and performance analysts who are responsible for a DB2 subsystem, application programmers who wish to monitor their programs, and database administrators.

Where to look for more informationFor more information related to this product, please see the

� technical documentation CD-ROM that came with your product

� technical documentation information available on the Candle Web site at www.candle.com

� online help provided with this product

P

Page 12: OMEGAMON II for DB2 Tuning Guide, Version 540 - IBMpublib.boulder.ibm.com/tividd/td/ITOMEGAIIDB2/G251... · 2 OMEGAMON II for DB2 Tuning Guide, Version 540 Registered trademarks and

Adobe Portable Document Format

12 OMEGAMON II for DB2 Tuning Guide, Version 540

Adobe Portable Document Format

Printing this bookCandle supplies documentation in the Adobe Portable Document Format (PDF). The Adobe Acrobat Reader will print PDF documents with the fonts, formatting, and graphics in the original document. To print a Candle document, do the following:

1. Specify the print options for your system. From the Acrobat Reader Menu bar, select File > Page Setup… and make your selections. A setting of 300 dpi is highly recommended as is duplex printing if your printer supports this option.

2. To start printing, select File > Print... on the Acrobat Reader Menu bar.

3. On the Print pop-up, select one of the Print Range options for� All� Current page� Pages from: [ ] to: [ ]

4. (Optional). Select the Shrink to Fit option if you need to fit oversize pages to the paper size currently loaded on your printer.

Printing problems?The print quality of your output is ultimately determined by your printer. Sometimes printing problems can occur. If you experience printing problems, potential areas to check are:� settings for your printer and printer driver. (The dpi settings for both your driver and

printer should be the same. A setting of 300 dpi is recommended.)� the printer driver you are using. (You may need a different printer driver or the

Universal Printer driver from Adobe. This free printer driver is available at www.adobe.com.)

� the halftone/graphics color adjustment for printing color on black and white printers (check the printer properties under Start > Settings > Printer). For more information, see the online help for the Acrobat Reader.

� the amount of available memory in your printer. (Insufficient memory can cause a document or graphics to fail to print.)

For additional information on printing problems, refer to the documentation for your printer or contact your printer manufacturer.

Contacting AdobeIf additional information is needed about Adobe Acrobat Reader or printing problems, see the Readme.pdf file that ships with Adobe Acrobat Reader or contact Adobe at www.adobe.com.

Page 13: OMEGAMON II for DB2 Tuning Guide, Version 540 - IBMpublib.boulder.ibm.com/tividd/td/ITOMEGAIIDB2/G251... · 2 OMEGAMON II for DB2 Tuning Guide, Version 540 Registered trademarks and

13

Adobe Portable Document Format

Adding annotations to PDF filesIf you have purchased the Adobe Acrobat application, you can add annotations to Candle documentation in .PDF format. See the Adobe product for instructions on using the Acrobat annotations tool and its features.

Page 14: OMEGAMON II for DB2 Tuning Guide, Version 540 - IBMpublib.boulder.ibm.com/tividd/td/ITOMEGAIIDB2/G251... · 2 OMEGAMON II for DB2 Tuning Guide, Version 540 Registered trademarks and

Candle Customer Service and Satisfaction

14 OMEGAMON II for DB2 Tuning Guide, Version 540

Candle Customer Service and Satisfaction

BackgroundTo assist you in making effective use of our products, Candle offers a variety of easy-to-use online support resources. The Candle Web site provides direct links to a variety of support tools that include these services:

eSupport allows you to create and update service requests opened with Customer Service and Satisfaction (CSS).

eDelivery allows you to download products, documentation, and maintenance 24 hours a day, 7 days a week.

eNotification notifies you of product updates and new releases.

In addition, you can find information about training, maintenance plans, consulting and services, and other useful support resources. Refer to the Candle Web site at www.candle.com for detailed customer service information.

Candle Customer Service and Satisfaction contactsYou will find the most current information about how to contact Candle CSS by telephone or email on the Candle Web site. Go to the www.candle.com support section, and choose the link to Support Contacts to locate your regional support center.

Page 15: OMEGAMON II for DB2 Tuning Guide, Version 540 - IBMpublib.boulder.ibm.com/tividd/td/ITOMEGAIIDB2/G251... · 2 OMEGAMON II for DB2 Tuning Guide, Version 540 Registered trademarks and

15

Documentation Conventions

Documentation Conventions

IntroductionCandle documentation adheres to accepted typographical conventions for command syntax. Conventions specific to Candle documentation are discussed in the following sections.

Panels and figuresThe panels and figures in this document are representations. Actual product panels may differ.

Required blanksThe slashed-b (!) character in examples represents a required blank. The following example illustrates the location of two required blanks.

!!!!eBA*ServiceMonitor!!!!0990221161551000

Revision barsRevision bars (|) may appear in the left margin to identify new or updated material.

Variables and literals in command syntax examplesIn examples of command syntax for the OS/390, VM, OS/400, and NonStop Kernel platforms, uppercase letters indicate actual values (literals) that the user should type; lowercase letters indicate variables that represent data supplied by the user:

LOGON APPLID (cccccccc)

However, for the Windows and UNIX platforms, variables are shown in italics:

-candle.kzy.instrument.control.file=instrumentation_control_file_name-candle.kzy.agent.parms=agent_control_file_name

Note: In ordinary text, variable names appear in italics, regardless of platform.

SymbolsThe following symbols may appear in command syntax:

Table 1. Symbols in Command Syntax

Symbol Usage

| The “or” symbol is used to denote a choice. Either the argument on the left or the argument on the right may be used. Example:

YES | NOIn this example, YES or NO may be specified.

Page 16: OMEGAMON II for DB2 Tuning Guide, Version 540 - IBMpublib.boulder.ibm.com/tividd/td/ITOMEGAIIDB2/G251... · 2 OMEGAMON II for DB2 Tuning Guide, Version 540 Registered trademarks and

Documentation Conventions

16 OMEGAMON II for DB2 Tuning Guide, Version 540

[ ] Denotes optional arguments. Those arguments not enclosed in square brackets are required. Example:

APPLDEST DEST [ALTDEST]In this example, DEST is a required argument and ALTDEST is optional.

{ } Some documents use braces to denote required arguments, or to group arguments for clarity. Example:

COMPARE {workload} -REPORT={SUMMARY | HISTOGRAM}

The workload variable is required. The REPORT keyword must be specified with a value of SUMMARY or HISTOGRAM.

_ Default values are underscored. Example:

COPY infile outfile - [COMPRESS={YES | NO}]In this example, the COMPRESS keyword is optional. If specified, the only valid values are YES or NO. If omitted, the default is YES.

Table 1. Symbols in Command Syntax

Symbol Usage

Page 17: OMEGAMON II for DB2 Tuning Guide, Version 540 - IBMpublib.boulder.ibm.com/tividd/td/ITOMEGAIIDB2/G251... · 2 OMEGAMON II for DB2 Tuning Guide, Version 540 Registered trademarks and

17

Page 18: OMEGAMON II for DB2 Tuning Guide, Version 540 - IBMpublib.boulder.ibm.com/tividd/td/ITOMEGAIIDB2/G251... · 2 OMEGAMON II for DB2 Tuning Guide, Version 540 Registered trademarks and

18 OMEGAMON II for DB2 Tuning Guide, Version 540

Page 19: OMEGAMON II for DB2 Tuning Guide, Version 540 - IBMpublib.boulder.ibm.com/tividd/td/ITOMEGAIIDB2/G251... · 2 OMEGAMON II for DB2 Tuning Guide, Version 540 Registered trademarks and

19

What’s New

IntroductionThis section identifies the enhancements made to OMEGAMON II for DB2, Version 540. These changes were made in conjunction with OMEGAMON XE for DB2 on z/OS, Version 300. The changes in OMEGAMON II for DB2 provide new function in addition to reflecting support for features in IBM DB2 Version 8.1. OMEGAMON II for DB2 enables you to obtain additional information about the performance of your systems. This information allows you more flexibility in managing various types of threads. An overview of each new or changed function follows.

Note: With this release, OMEGAMON II for DB2 no longer supports IBM DB2 Version 5.

Historical Reporter redesignWith OMEGAMON II for DB2, significant enhancements were made to the historical reporting component. Some of these new features are:

� Sequential output files are produced from the online collector.

� All record types can be loaded into DB2 tables using either the LOAD utility or using SQL INSERT.

� Near term history collector for displays is configured separately from long term history for reports.

� New fields have been added to the Summarizer.

New IFCID-based reports� Numerous new IFCID-based reports are provided. See the OMEGAMON II for DB2

Historical Reporting Guide, Version 540, for a list of the supported IFCIDs. See the README provided with this product for instructions on generating the IFCID-based reports.

� You can generate your own reports, based on the IFCIDS selected, using the product-provided COBOL, C, and SAS record layouts. All instrumentation record types (IFCIDs) are supported. The data are extracted from SMF, GTF or from the Online Collector input.

W

Page 20: OMEGAMON II for DB2 Tuning Guide, Version 540 - IBMpublib.boulder.ibm.com/tividd/td/ITOMEGAIIDB2/G251... · 2 OMEGAMON II for DB2 Tuning Guide, Version 540 Registered trademarks and

20 OMEGAMON II for DB2 Tuning Guide, Version 540

64-bit addressing supportVersion 8 of DB2 UDB for z/OS supports 64-bit virtual storage. The zSeries 64-bit architecture allows DB2 UDB for z/OS to move various storage areas above the 2-GB bar. OMEGAMON II for DB2 now provides the ability to display information from above the 2-GB bar structures.

64-bit addressing support applies to the:

� EDM pool

� buffer pools

� sort pools

� RID pools

Long name supportOMEGAMON II for DB2 includes support for long object names. New displays are provided in support of this feature.

Unicode supportUnicode support includes character conversion from Unicode to EBCDIC for online displays and batch reports.

Enclave supportNew displays for stored procedures using Work Load Manager (WLM) enclaves include:

� Enclave Token

� Service Class Period

� Performance Index

� Service Class

� WLM Environment Name

Stored procedure Address Spaces is being phased out in DB2 Version 8. All stored procedures now use WLM.

New filtering for Near Term History displayThese keywords are added to the Near Term History display:

� COMMIT

� CORRID

� DB2 CPU TIME

� DB2 ELAP TIME

� DEADLK/TIMEOUT

� I/O ELAP TIME

Page 21: OMEGAMON II for DB2 Tuning Guide, Version 540 - IBMpublib.boulder.ibm.com/tividd/td/ITOMEGAIIDB2/G251... · 2 OMEGAMON II for DB2 Tuning Guide, Version 540 Registered trademarks and

21

� GETPAGES

� LOCK ESCAL

� PACKAGE

See the OMEGAMON II for DB2 Reference Manual, Version 540, for descriptions of these new fields.

New DSNZPARM fieldsThe DSNZPARM Thread Parameters panel now includes numerous new fields.

Distributed Thread display improvementsThe Distributed Thread display improvements include the addition of these fields:

� Host Name

� Workstation identifier

� End user ID on workstation

� Transaction ID on workstation

Page 22: OMEGAMON II for DB2 Tuning Guide, Version 540 - IBMpublib.boulder.ibm.com/tividd/td/ITOMEGAIIDB2/G251... · 2 OMEGAMON II for DB2 Tuning Guide, Version 540 Registered trademarks and

22 OMEGAMON II for DB2 Tuning Guide, Version 540

Page 23: OMEGAMON II for DB2 Tuning Guide, Version 540 - IBMpublib.boulder.ibm.com/tividd/td/ITOMEGAIIDB2/G251... · 2 OMEGAMON II for DB2 Tuning Guide, Version 540 Registered trademarks and

Getting Started 23

Getting Started

Chapter ContentsOverview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 24Panel Format . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25Using the Main Menu . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 27Function Keys . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 29Navigation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 30Customizing Cursor Placement . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 32Other Features . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 33Using the OMEGAMON II ISPF Menu . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 34Accessing Historical Features . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 36Features Within the ISPF Dialog . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 37Starting an OMEGAMON II Session . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 38Stopping an OMEGAMON II Session . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 40

1

Page 24: OMEGAMON II for DB2 Tuning Guide, Version 540 - IBMpublib.boulder.ibm.com/tividd/td/ITOMEGAIIDB2/G251... · 2 OMEGAMON II for DB2 Tuning Guide, Version 540 Registered trademarks and

Overview

24 OMEGAMON II for DB2 Tuning Guide, Version 540

Overview

OMEGAMON is a software performance monitor for the IBM product DATABASE 2™ (DB2). It includes both realtime and historical components, which provide a comprehensive view of your DB2 subsystem(s).

Realtime monitor interfaces

The realtime monitor includes two user interfaces: the classic interface and the CUA interface. The classic interface, which is the original interface for OMEGAMON II, includes conventional menus and display panels to facilitate navigation through the product.

The CUA interface complies with IBM's SAA®/CUA™ (Systems Application Architecture®/Common User Access™) guidelines, which promote ease of use in software interfaces. This manual describes using OMEGAMON II with the classic interface. For information about using the CUA interface, see the OMEGAMON II for DB2 Users’ Guide.

About this chapter

This chapter describes the classic interface's main menu panels and function keys, provides navigation instructions, and explains how to start and stopOMEGAMON II realtime and historical sessions.

Page 25: OMEGAMON II for DB2 Tuning Guide, Version 540 - IBMpublib.boulder.ibm.com/tividd/td/ITOMEGAIIDB2/G251... · 2 OMEGAMON II for DB2 Tuning Guide, Version 540 Registered trademarks and

Getting Started 25

Panel Format

Panel Format

This section describes a typical realtime panel.

ExampleThe OMEGAMON II panel consists of: the INFO-line and the general display and input area. Figure 1 shows the format of a typical OMEGAMON II realtime panel.

FIGURE 1. OMEGAMON II Panel Format

_______________ cccccccc mode LOG O2 V540.cc $DB2 mm/dd/yy hh:mm:ss nnn B

| | | | +-------------+ +-------------------------------------------------------------+ input area display area

| INFO-line | +----------------------------------------------------------------------------+

General display and input area

Page 26: OMEGAMON II for DB2 Tuning Guide, Version 540 - IBMpublib.boulder.ibm.com/tividd/td/ITOMEGAIIDB2/G251... · 2 OMEGAMON II for DB2 Tuning Guide, Version 540 Registered trademarks and

Panel Format

26 OMEGAMON II for DB2 Tuning Guide, Version 540

INFO-lineThe INFO-line, which is the top line of the panel, consists of two sections:

General display areaThe general display and input portion of the panel is where OMEGAMON II data is displayed.

input area Enter navigation fast path or menu options to move to another panel. Press Enter after you type an option.

display area Consists of the following components:

cccccccc The 1–8 character panel name currently in use. It is the name of a member in the RKO2PROC or RKO2PCSV library.

mode The mode you use to access the 3270. The possible values are

DED Dediciated mode

VTM VTAM mode

VTT TSO mode

VTS ISPF mode

LOG Indicates the panel logging status. LOG indicates that logging is on; blanks indicate that logging is off.

O2 Indicates the installed product. The previous figure shows O2(for OMEGAMON II for DB2).

V540 Indicates the product level. (The previous figure shows Version 500.)

cc Indicates the suffix of the current user profile. The default is /C

$DB2 Indicates the subsystem ID of the DB2 subsystem being monitored.

mm/dd/yy Indicates the date the panel was last refreshed. (You may also set this value to European format, dd/mm/yy.)

hh:mm:ss Indicates the time the panel was last refreshed.

nnn Indicates that the top line of the general display area is the nth logical row of the display. This field is blank if the current physical panel is the top of the logical panel.

B Indicates that the alarm feature is active. The bell sounds on the 3270 to warn when exceptions occur.

Page 27: OMEGAMON II for DB2 Tuning Guide, Version 540 - IBMpublib.boulder.ibm.com/tividd/td/ITOMEGAIIDB2/G251... · 2 OMEGAMON II for DB2 Tuning Guide, Version 540 Registered trademarks and

Getting Started 27

Using the Main Menu

Using the Main Menu

The Realtime Main Menu shows the navigation options available within an OMEGAMON II realtime session. This menu provides a list of panels to which you may navigate, and shows PF key definitions.

Main MenuFollowing is an example of the Realtime Main Menu

FIGURE 2. .Realtime Main Menu

To choose one of these menu options:

� Type the option letter on the top line, and press Enter.

Result: The selected option panel appears.

Navigation optionsThe following list briefly describes each of the panels you can navigate to from the Realtime Main Menu:

Summary Provides an overview of current DB2 activity.

Exceptions Shows which OMEGAMON II exceptions have exceeded their thresholds.

Thread Activity Provides information about threads connected to DB2.� T indicates that the information is categorized by plan.� U indicates that the information is categorized by package.

Locking Conflicts Displays all lock conflicts. This panel displays information about the object in contention, as well as its owners and all waiters.

____________ ZMENU VTM O2 V540./C $DB2 mm/dd/yy 08:30:12 > Help/News/Index PF1 Exit PF3 PF Keys PF5> Type a selection letter at the left end of the top line and press ENTER.================================================================================> OMEGAMON II FOR DB2 CLASSIC INTERFACE -- REALTIME MAIN MENU _ S SUMMARY .............. Summary of DB2 activity_ E EXCEPTIONS ........... Current or potential system problems_ T THREAD ACTIVITY ...... Thread activity information__U THREAD ACTIVITY ...... Thread activity information by Package_ L LOCKING CONFLICTS .... Locking conflict information_ R RESOURCE MANAGERS .... Resource manager, other DB2 subsystem information_ A APPLICATION TRACE .... Trace and view application activity_ D DISTRIBUTED DATA ..... Distributed database system information_ O OBJECT ANALYSIS ...... Object and Volume information_ C MVS CONSOLE .......... MVS console to issue commands and view messages_ B DB2 CONSOLE .......... DB2 console to issue commands and view messages_ M MISCELLANEOUS ........ Address space information, OMEGAMON commands, etc._ P PROFILE .............. Customize OMEGAMON session and exception settings_ H HISTORICAL ..........Online historical information_ I IFCID TRACE............ Start an IFCID Trace _ Z OTHER DB2 ............ Redirect monitoring to another DB2================================================================================

Page 28: OMEGAMON II for DB2 Tuning Guide, Version 540 - IBMpublib.boulder.ibm.com/tividd/td/ITOMEGAIIDB2/G251... · 2 OMEGAMON II for DB2 Tuning Guide, Version 540 Registered trademarks and

Using the Main Menu

28 OMEGAMON II for DB2 Tuning Guide, Version 540

Resource Managers Displays information related to the DB2 subsystem (such as Buffer Manager, Log Manager, and EDM pool information), installation parameters (DSNZPARM), active traces, and IRLM startup options and CSA usage.

Application Trace Allows you to trace applications executing within DB2 and view the resulting information.

Distributed Data Displays DDF-related information, including DDF statistics, DDF VTAM™ session activity, and DDF VTAM conversation activity.

Object Analysis Displays information that helps you evaluate DB2 objects.

MVS Console Displays MVS messages and allows you to issue MVS commands.

DB2 Console Displays DB2 and IRLM messages and allows you to issue DB2 commands.

Miscellaneous Allows you to view DB2 address spaces, and issue OMEGAMON II commands.

Profile Allows you to alter or define all OMEGAMON II session options, such as exception levels.

Historical Displays near-term historical trace information and information about online historical data collection.

IFCID Trace Start an IFCID trace.

Other DB2 Directs OMEGAMON II to monitor a different DB2 system.

Page 29: OMEGAMON II for DB2 Tuning Guide, Version 540 - IBMpublib.boulder.ibm.com/tividd/td/ITOMEGAIIDB2/G251... · 2 OMEGAMON II for DB2 Tuning Guide, Version 540 Registered trademarks and

Getting Started 29

Function Keys

Function Keys

Candle ships OMEGAMON II with the following default function (PF) key settings:

To set additional PF keys or change the default settings of these PF keys, see the OMEGAMON II for DB2 Reference Manual.

Table 1. Default Function Keys

Key Function Description

PF1 Help From a display panel, provides help information about the current panel. From a help panel, displays general help information.

PF2 Not used Normally used for ISPF split-panel.

PF3 Back Returns to the previous panel displayed.

PF4 Return Returns directly to the Realtime Main Menu from any product panel.

PF5 PF keys Displays the current PF key definitions.

PF6 Print Prints the current panel.

PF7 Scroll-up Scrolls back one full panel.

PF8 Scroll-down Scrolls forward one full panel.

PF9 Not used Normally used for ISPF swap-panel.

PF10 Recommendations/ Sort

From exception analysis panels, navigates to a recommendation panel.

From certain panels, performs a sorting function.

PF11 Zoom Navigates to a panel that contains more details about the selected field.

PF12 Not used

Page 30: OMEGAMON II for DB2 Tuning Guide, Version 540 - IBMpublib.boulder.ibm.com/tividd/td/ITOMEGAIIDB2/G251... · 2 OMEGAMON II for DB2 Tuning Guide, Version 540 Registered trademarks and

Navigation

30 OMEGAMON II for DB2 Tuning Guide, Version 540

Navigation

OMEGAMON II offers several ways to navigate through its realtime product panels. We strongly recommend that you use the methods described below; otherwise you may disrupt the structured navigation system, producing a variety of undesirable results.

MenusThe easiest way to move from one panel to another is to select a menu option. On the INFO-line, type the letter that appears next to the desired option and press Enter. OMEGAMON II takes you to the panel corresponding to the selection you made. When you press PF3, OMEGAMON II returns you to the previous panel. To go directly to the Realtime Main Menu, press PF4.

OMEGAMON IIdisplays navigation options in vertical and horizontal menus. Vertical menus display only navigation options; they do not display any DB2 information. Horizontal menus appear across the top of panels whose primary function is to display DB2 information.

Horizontal menus indicate the current panel by placing an asterisk in front of that menu option instead of a letter, as shown in Figure .

FIGURE 3. The Background Menu Option Is Selected

Horizontal options provide movement between panels that display similar information about a particular concept (such as threads, exceptions, or connections). From any of these panels, you will return to the same entry point when you press PF3. However, when you select an option from a vertical menu, pressing PF3 returns you back through the hierarchy of each panel you selected.

________________ZBACKT VTM O2 V540./C D41A mm/dd/yy 14:55:06 2> Help PF1 Back PF3 Up PF7 Down PF8 Sort PF10 Zoom PF11> T.E> THREAD ACTIVITY: Enter a selection letter on the top line. > A-ALL B-TSO C-CICS D-IMS *-BACKGROUND F-DIST ALLIED G-DIST DBAC> H-UTIL I-INACT J-FILTER K-FUNCTIONS L-STORED PROC M-TRIGGERS N-SYSPLEX========================================================================> BACKGROUND THREAD SUMMARY BATA+ Job Name CPU% Connection Threads+ -------- ----- ---------- -------+ TDO2S07 00.0 1 1 THDB+ Elapsed Planname CPU Status GetPg Update Commit Jobname+ ---------- -------- ----- ------------ ------ ------ ------ -------+ 01:13:42.1 KO2270HP 00.0% NOT IN-DB2 0 0 0 TDO+ 00:53:59.05 PLAN0090 12.2% IN-DB2 6432 6381 23 BATCHJB1+ 00:12:37.16 PLAN0070 11.1% SQL CALL 1943 879 14 BATCHJB2+ 00:09:29.27 PLAN0031 2.0% IN-DB2 1111 948 15 BATCHJB3+ 00:05:12.38 PLAN0100 3.9% TERM 396 54 5 BATCHJB4

Page 31: OMEGAMON II for DB2 Tuning Guide, Version 540 - IBMpublib.boulder.ibm.com/tividd/td/ITOMEGAIIDB2/G251... · 2 OMEGAMON II for DB2 Tuning Guide, Version 540 Registered trademarks and

Getting Started 31

Navigation

Fast pathsIf you are familiar with the options on panels, you can navigate to a panel directly by stringing together its selection letters using periods. We call this string a fast path.

For example, if you are currently at the All Threads Connected to DB2 panel and you want to go directly to the Exceptions path, you can type E. on the INFO-line and bypass the Main Menu. To go directly to the Exception Messages for CICS Exceptions panel, you can type E.C and bypass both the Main Menu and the Exception Messages for All Exceptions panel.

When you navigate to a panel (whether by menu path or fast path), the fast path letters will be displayed in the upper left corner of the destination panel. This will help you memorize the fast paths for the panels you use most often.

ZoomingOMEGAMON II's zooming feature allows you to quickly navigate to more details about data on the current panel. To zoom, move the cursor to the field (or line) about which you want more information, and press PF11. When you finish viewing the detailed information, press PF3 to return to the panel from which you zoomed.

Sometimes when you zoom, OMEGAMON II transfers you to another logical path in the menu system to reach the appropriate detail panel. In these cases, when you press PF3, OMEGAMON II returns you back through the new logical path, and not to the panel from which you zoomed.

Page 32: OMEGAMON II for DB2 Tuning Guide, Version 540 - IBMpublib.boulder.ibm.com/tividd/td/ITOMEGAIIDB2/G251... · 2 OMEGAMON II for DB2 Tuning Guide, Version 540 Registered trademarks and

Customizing Cursor Placement

32 OMEGAMON II for DB2 Tuning Guide, Version 540

Customizing Cursor Placement

You can customize the placement of the cursor on any OMEGAMON II panel. For example, when you navigate to a panel, you may want to locate the cursor on the first zoomable line.

ProcedureTo save a customized cursor position for a panel, perform the following steps.

Note: Be sure that the O2CI started task has update authorization for the rhilev.RKO2PCSV dataset. Otherwise, you will get a security abend.

Note: As a result, the new cursor position is now saved with the panel space. Repeat this procedure to change the standard cursor placement on any panel.

Step Action

1 Navigate to a panel where you want to change the standard cursor placement.

2 Type /REP on the INFO-line.

3 Press Enter twice.

4 Type /REP on the INFO-line.

5 Space over (delete) the comment (>) sign next to the two immediate commands (.LOGPOP and .LOC) that appear below the INFO-line. (This prevents the commands from appearing on the “new” panel you are saving.)

6 Place the cursor in the desired position, then move it up two lines (to adjust for deleting the two immediate commands).

7 Press Enter.

Page 33: OMEGAMON II for DB2 Tuning Guide, Version 540 - IBMpublib.boulder.ibm.com/tividd/td/ITOMEGAIIDB2/G251... · 2 OMEGAMON II for DB2 Tuning Guide, Version 540 Registered trademarks and

Getting Started 33

Other Features

Other Features

The following sections describe features of OMEGAMON II that will assist you in using the interface to resolve DB2 problems:

� highlighting� recommendations� help

HighlightingIf run on an extended color terminal, OMEGAMON II will highlight a field when an exception related to that field occurs. Exceptions indicate a current or potential problem in the system. You can navigate from a highlighted field to the appropriate Exception Messages panel for more information about the exception.

To make highlighting available on your terminal, go to the Set Display Options panel (P.A.A), set the Display field to COLOR, and press Enter.

Note: If you do not have a color terminal, selecting Display=COLOR may cause your OMEGAMON II session to terminate.

RecommendationsOMEGAMON II provides recommendations for exception conditions. These recommendations guide you to the OMEGAMON II panels and DB2 commands you need to analyze exception conditions and quickly resolve them.

To view the recommendation associated with an exception, navigate to the Exception Messages for All Exceptions panel, and do the following:

� Move the cursor to the exception line, and press PF10.

Result: An explanation and recommendation for the selected exception appears.

Help OMEGAMON II provides panel help about each of its realtime panels, and general help about how to use the product.

� Panel help provides information about the purpose of a panel, including field definitions and navigation options.

� General help explains how to use OMEGAMON II menus, PF keys, zooming, and command helps.

To view help for any panel, press PF1 from that panel. To view general help information, press PF1 from any help panel.

Page 34: OMEGAMON II for DB2 Tuning Guide, Version 540 - IBMpublib.boulder.ibm.com/tividd/td/ITOMEGAIIDB2/G251... · 2 OMEGAMON II for DB2 Tuning Guide, Version 540 Registered trademarks and

Using the OMEGAMON II ISPF Menu

34 OMEGAMON II for DB2 Tuning Guide, Version 540

Using the OMEGAMON II ISPF Menu

You can access a number of OMEGAMON II features from an ISPF platform, via the OMEGAMON II ISPF Primary Options Menu. This menu allows you to access the historical reporting feature, as well as other product components listed below:

� OMEGAMON II realtime sessions

� OMEGAMON II historical reports and graphs

� data collection specifications

� data extraction specifications

� data summarization specifications

� data dictionary

� OMEGAMON II messages

� VSAM-stored performance data using ATF (application trace facility)

� DB2 tools

In addition, the ISPF menu enables you to set global options and parameters for historical reporting through a series of panels.

Invoking the OMEGAMON II ISPF menuYou can invoke the OMEGAMON II ISPF Primary Options Menu in one of two ways:

� Enter %KD2SPF from native TSO (outside of ISPF).

� Enter %KD2SPF from PDF option 6 of the ISPF main menu.

Both methods result in the display of the ISPF Primary Options Menu as shown in Figure 4 .

FIGURE 4. OMEGAMON II ISPF Primary Options Menu

Candle --------- OMEGAMON FOR DB2 V540------------------OPTION ===> 1 REALTIME - Execute realtime functions 2 HISTORICAL - Generate reports/graphs; execute data management functions 3 DB2 TOOLS - Execute DB2 tools X EXIT - Exit dialog Enter END command to exit dialog

Page 35: OMEGAMON II for DB2 Tuning Guide, Version 540 - IBMpublib.boulder.ibm.com/tividd/td/ITOMEGAIIDB2/G251... · 2 OMEGAMON II for DB2 Tuning Guide, Version 540 Registered trademarks and

Getting Started 35

Using the OMEGAMON II ISPF Menu

Navigation optionsThe following briefly describes the navigation options available from the Primary Options Menu.

Realtime Provides access to OMEGAMON II realtime panels.Using ISPF split screen panel mode, you can toggle between realtime displays and historical reports or online OMEGAMON II messages.

Historical Provides access to the OMEGAMON II historical reporter and other historical features, as well as OMEGAMON II messages.

DB2 Tools Provides access to the following DB2 tools, if they have been installed on your system:� !DB/WORKBENCH� !DB/MIGRATOR� !DB/SMU� !DB/EXPLAIN� !DB/DASD

Exit Returns you to ISPF.

Page 36: OMEGAMON II for DB2 Tuning Guide, Version 540 - IBMpublib.boulder.ibm.com/tividd/td/ITOMEGAIIDB2/G251... · 2 OMEGAMON II for DB2 Tuning Guide, Version 540 Registered trademarks and

Accessing Historical Features

36 OMEGAMON II for DB2 Tuning Guide, Version 540

Accessing Historical Features

To generate historical reports and graphs, execute data management functions, and display OMEGAMON II messages, choose the HISTORICAL option on the Primary Options Menu.

Historical Main MenuThis figure shows the Historical Main Menu.

FIGURE 5. Historical Main Menu

Navigation optionsThe following briefly describes the navigation options available from the Historical Main Menu.

For more information on historical reporting and the ISPF dialog, see the OMEGAMON II for DB2 Historical Reporting Guide.

Report Provides access to historical reports.

Collect Sets or changes collection specifications.

Extract Sets or changes data extraction specifications.

Summarize Sets or changes data summarization specifications.

Dictionary Displays and optionally prints the online data dictionary.

Messages Displays and optionally prints OMEGAMON II messages.

ATF Report Provides access to panels that display historical performance data stored in VSAM datasets.

Exit Returns you to the OMEGAMON II ISPF Primary Options Menu.

Candle --------- HISTORICAL MAIN MENU -------------- OMEGAMON for DB2OPTION ===> 1 REPORT - Generate historical reports 2 COLLECT - Edit data collection specifications 3 EXTRACT - Edit SMF/GTF extract specifications 4 SUMMARIZE - Edit data summarization specifications 5 DICTIONARY - Display data dictionary 6 MESSAGES - Display OMEGAMON II messages 7 ATF REPORT - Display ATF trace from VSAM dataset X EXIT - Return to OMEGAMON II primary menu Enter END command to return to OMEGAMON II primary menu

Page 37: OMEGAMON II for DB2 Tuning Guide, Version 540 - IBMpublib.boulder.ibm.com/tividd/td/ITOMEGAIIDB2/G251... · 2 OMEGAMON II for DB2 Tuning Guide, Version 540 Registered trademarks and

Getting Started 37

Features Within the ISPF Dialog

Features Within the ISPF Dialog

Function KeysFunction keys used within ISPF include the following:

Additional standard ISPF function keys are valid during the dialog.

Note: Within the help facility for the historical features, not all of the PF keys function as described above. Navigation is controlled by the conventions of the ISPF help tutorial. Press PF1 on any historical help panel to display conventions for the help tutorial.

NavigationTo navigate to various options on the ISPF menus:� Type the option character on the command line, and press Enter.

Result: The selected option appears.

Function key navigation

When panels require you to enter input parameters and specifications, you can use function keys to navigate to the appropriate panels. To display a list of valid keys and their functions at the bottom of each panel:� Type PFSHOW on the command line, and press Enter.

Result: The ISPF function keys appear.

Note: The function keys display overlays the last few lines of the OMEGAMON II panel. To turn off the keys display, type PFSHOW OFF on the command line, and press Enter.

Help OMEGAMON II provides detailed help about each of its ISPF panels and report displays. This includes information about the purpose of a panel or report and some field definitions.

To obtain help about a report or ISPF panel, press PF1/13 on any panel or report display. To continue from one help panel to the next, press Enter. You may exit from help and return to your original display at any time by pressing PF3/15.

Table 2. Function Key Settings

Key Function

PF1/13 Help

PF2/14 Split

PF3/15 Exit/Save

PF7/19 Scroll backward

PF8/20 Scroll forward

Page 38: OMEGAMON II for DB2 Tuning Guide, Version 540 - IBMpublib.boulder.ibm.com/tividd/td/ITOMEGAIIDB2/G251... · 2 OMEGAMON II for DB2 Tuning Guide, Version 540 Registered trademarks and

Starting an OMEGAMON II Session

38 OMEGAMON II for DB2 Tuning Guide, Version 540

Starting an OMEGAMON II Session

You can run OMEGAMON II in any of the following modes of operation:

� VTAM � ISPF � TSO� Dedicated

Operating in VTAM modeVTAM mode lets you run OMEGAMON II sessions directly from a VTAM terminal without the intervention of an intermediate online application, such as TSO. Candle highly recommends running OMEGAMON II in VTAM mode because it provides the most flexibility while incurring the least amount of overhead.

Note: VTAM is the only mode that supports the CUA interface to OMEGAMON II. For more information about the CUA interface, see the OMEGAMON II for DB2 Users’ Guide.

Systems programmers or performance analysts normally use VTAM mode to analyze DB2 performance in real time when the extra availability of dedicated mode is not required, and when TSO mode would be undesirable.

The following are among the advantages of VTAM mode over TSO mode:

� Allows you to use OMEGAMON II in automatic update mode so that the panel refreshes as in dedicated mode, but also responds immediately to the Enter and program function keys, as in TSO mode.

� Leaves OMEGAMON II unaffected if TSO is experiencing problems or is inoperable. Your system will have higher availability.

Starting a session in VTAM

To start an OMEGAMON II session in VTAM mode, issue the following command from a VTAM terminal:

LOGON APPLID(aaaaaaaa) DATA ('DB2=cccc')

Where aaaaaaaa is the application ID associated with OMEGAMON II, and cccc is the subsystem ID of the DB2 subsystem you wish to monitor.

Operating in ISPF modeIf you run with TSO and ISPF Version 2 or above, OMEGAMON II has an ISPF split-panel mode that lets you swap back and forth between two OMEGAMON II’s monitoring two DB2 subsystems, or an OMEGAMON II realtime session and an OMEGAMON II historical session.

Page 39: OMEGAMON II for DB2 Tuning Guide, Version 540 - IBMpublib.boulder.ibm.com/tividd/td/ITOMEGAIIDB2/G251... · 2 OMEGAMON II for DB2 Tuning Guide, Version 540 Registered trademarks and

Getting Started 39

Starting an OMEGAMON II Session

Starting a session in ISPF

To start an OMEGAMON II realtime session in ISPF mode, perform the following steps at your TSO terminal:

1. Select REALTIME on the OMEGAMON II Primary Options Menu.2. On the next panel, log onto OMEGAMON II by providing the required information,

typing L on the Option line, and pressing Enter.

Starting an OMEGAMON II historical session

To start an OMEGAMON II historical session:

� from the TSO READY PROMPT enter %KD2SPF.

� from ISPF PDF option 6, enter %KD2SPF.

� from the ISPF Primary Options Menu, select the HISTORICAL option.

Operating in TSO modeIf you are running in TSO mode without ISPF, OMEGAMON II communicates with the TSO address space via a VTAM application. DBAs, systems programmers, and performance analysts normally use this mode if ISPF is not available. In TSO mode, the panel does not refresh automatically; it refreshes when you press Enter.

Starting a session in TSO

To start an OMEGAMON II realtime session in TSO mode, issue the following command from your TSO terminal (at the READY prompt):

%KO2TSO DB2(cccc)

Where cccc is the subsystem ID of the DB2 subsystem you want to monitor.

Operating in dedicated modeDedicated mode offers the highest OMEGAMON II availability. In dedicated mode, OMEGAMON II uses no telecommunications access. This allows OMEGAMON II to report hardware and software problems so severe that they disable other mechanisms, including MVS system consoles. As a feature of dedicated mode, OMEGAMON II refreshes the panel automatically every few seconds without operator intervention.

The dedicated mode device and its optional secondary consoles must be local non-SNA devices.

Starting a dedicated session

To start an OMEGAMON II session in dedicated mode, issue the following command from the operator console:

F O2CI,EXEC O2CIDED

In this example, O2CIDED is the name of the member that you want to execute from the rhilev.RKD2PAR dataset. Your installation may use another name.

Page 40: OMEGAMON II for DB2 Tuning Guide, Version 540 - IBMpublib.boulder.ibm.com/tividd/td/ITOMEGAIIDB2/G251... · 2 OMEGAMON II for DB2 Tuning Guide, Version 540 Registered trademarks and

Stopping an OMEGAMON II Session

40 OMEGAMON II for DB2 Tuning Guide, Version 540

Stopping an OMEGAMON II Session

To stop an OMEGAMON II realtime session in any mode, press PF4 to return to the Main Menu and then select option X, and press Enter. In TSO and ISPF modes, press Enter again.

The OMEGAMON II session ends, but OMEGAMON II remains active in the system. You can start another session at a later time.

Historical sessionTo stop an OMEGAMON II historical session, return to the ISPF dialog Primary Options Menu and perform one of the following actions.

� Type X on the command line and press Enter.

� Type END on the command line and press Enter.

� Press PF3/15.

Page 41: OMEGAMON II for DB2 Tuning Guide, Version 540 - IBMpublib.boulder.ibm.com/tividd/td/ITOMEGAIIDB2/G251... · 2 OMEGAMON II for DB2 Tuning Guide, Version 540 Registered trademarks and

Defining Standards and Monitoring Performance 41

Defining Standards andMonitoring Performance

This chapter provides details about the steps in the logical tuning approach that help you identify and then resolve performance problems.

� defining standards� defining historical specifications� monitoring system performanceNote: For background information on issues discussed in this chapter (for example, CPU

utilization), refer to the OMEGAMON II for DB2 Reference Manual.

Chapter Contents Chapter Overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 42Section A: Defining Performance Standards . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 44Characterizing System Performance . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 45Validating Default Exception Thresholds . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 46Modifying Exception Thresholds . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 48Writing Exception Rules . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 50Using Global Exclude Rules . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 52Saving Exception Settings. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 53Section B: Defining Historical Specifications . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 54Data Collection and Extraction Specifications . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 55Historical Reporting Options. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 56Section C: Monitoring System Performance . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 60Realtime Monitor . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 61

2

Page 42: OMEGAMON II for DB2 Tuning Guide, Version 540 - IBMpublib.boulder.ibm.com/tividd/td/ITOMEGAIIDB2/G251... · 2 OMEGAMON II for DB2 Tuning Guide, Version 540 Registered trademarks and

Chapter Overview

42 OMEGAMON II for DB2 Tuning Guide, Version 540

Chapter Overview

All of OMEGAMON II's features and facilities are designed around the concept of a logical tuning approach for improving the performance of your system. The logical tuning approach consists of these steps:

� Defining standards for DB2 performance at your installation.

� Defining specifications for the historical reporter.

� Monitoring your DB2 system to measure actual performance against these standards.

� Identifying the cause of performance problems and correcting them.

Defining performance standardsOMEGAMON II monitors your DB2 subsystem against user-defined performance values called thresholds. When a threshold is exceeded, OMEGAMON II notifies you that there is a problem or potential problem in your system. These problems are called exceptions.

Defining historical specificationsYou use the ISPF dialog to define the data collection and extraction specifications used in historical reporting. The specifications define the types of data that will be collected or extracted. The data is used to generate reports about past system performance in order to pinpoint trouble areas and to project future trends.

You also specify how much of the collected or extracted data to include in a report and how the data will be formatted, by defining historical reporter options from within the ISPF dialog.

Monitoring DB2 performanceMonitoring DB2 performance addresses two basic questions:

� Is communication between DB2 and its connected address spaces adequate?

OMEGAMON II provides data by monitoring CPU usage, locking activity, and thread performance.

� Are there problems in the DB2 subsystem?

Exception analysis issues automatic warning messages that alert you to DB2 subsystem problems, and recommendations that provide ways to resolve them.

When you assess DB2 performance using historical data, you expand your realtime performance analysis by addressing the following two questions:

� Does a system level problem exist?

OMEGAMON II historical reports and graphs help you analyze key performance areas within DB2. For example, you can track and evaluate buffer pool performance, EDM pool performance, and pageset open activities.

Page 43: OMEGAMON II for DB2 Tuning Guide, Version 540 - IBMpublib.boulder.ibm.com/tividd/td/ITOMEGAIIDB2/G251... · 2 OMEGAMON II for DB2 Tuning Guide, Version 540 Registered trademarks and

Defining Standards and Monitoring Performance 43

Chapter Overview

� Does an application level problem exist?

OMEGAMON II historical reports provide in-depth analysis of application activity. Historical graphs and related detailed reports help you resolve application problems quickly, and prevent them from recurring.

Identifying and correcting performance problemsWhen response time exceeds your installation's performance standards, OMEGAMON II realtime and historical data help you identify the cause of the problem. OMEGAMON II provides realtime and historical information about DB2 bottlenecks that may be causing poor performance, and identifies the subsystems connected to DB2. You then can track potential problems and take the necessary actions to correct them.

Page 44: OMEGAMON II for DB2 Tuning Guide, Version 540 - IBMpublib.boulder.ibm.com/tividd/td/ITOMEGAIIDB2/G251... · 2 OMEGAMON II for DB2 Tuning Guide, Version 540 Registered trademarks and

Section A: Defining Performance Standards

44 OMEGAMON II for DB2 Tuning Guide, Version 540

Section A: Defining Performance Standards

The initial process in the logical tuning approach consists of defining performance standards for your subsystem. Defining standards consists of the following steps:

1. Characterize system performance.2. Validate default exception thresholds.3. Modify exception thresholds (and other exception options).

Page 45: OMEGAMON II for DB2 Tuning Guide, Version 540 - IBMpublib.boulder.ibm.com/tividd/td/ITOMEGAIIDB2/G251... · 2 OMEGAMON II for DB2 Tuning Guide, Version 540 Registered trademarks and

Defining Standards and Monitoring Performance 45

Characterizing System Performance

Characterizing System Performance

The first step in defining performance standards is to monitor current activity and decide whether performance is satisfactory.

Where do I start?For an overview of the current status of the DB2 system you are monitoring, look at the Summary of DB2 Activity panel. To see this panel:

� Choose SUMMARY from the Realtime Main Menu.

Result:The Summary for of DB2 Activity panel appears.

Summary of DB2 Activity panelThis panel helps you locate problems and potential problems by highlighting fields that reach or exceed their threshold values.

For example, OMEGAMON II highlights the CPU field when the TCPU exception detects a high CPU rate for one or more threads within a connection type. Then you can zoom on the connection line to see which threads have exceeded the TCPU threshold, and to verify the status of the problem thread(s).

Page 46: OMEGAMON II for DB2 Tuning Guide, Version 540 - IBMpublib.boulder.ibm.com/tividd/td/ITOMEGAIIDB2/G251... · 2 OMEGAMON II for DB2 Tuning Guide, Version 540 Registered trademarks and

Validating Default Exception Thresholds

46 OMEGAMON II for DB2 Tuning Guide, Version 540

Validating Default Exception Thresholds

Candle supplies a set of default thresholds with OMEGAMON II for DB2. However, they may not be appropriate values for your installation. You should adjust the threshold for each OMEGAMON II exception to fit the performance standards at your installation.

For information about default exception thresholds and exceptions, see the OMEGAMON II for DB2 Reference Manual.

Reported exception informationOMEGAMON II reports information about exceptions that can help you determine how to adjust their thresholds. For each exception it shows:

� the current threshold value set for the exception

� the value that caused the exception to trip

� the date and time the exception last tripped

� the number of times this exception tripped during the current session

� the number of times this exception tripped since the last, worst, and total trip counter values were reset

� the current state of the exception. ON (it is being monitored), OFF (it is not being monitored), TEST (it is being tested)

� the value of the exception the last time it tripped

� the worst value for the exception during the current OMEGAMON II session

� the 2-character group to which this exception belongs (CI for CICS, IM for IMS, SY for DB2 system, or TH for thread)

Where do I start?OMEGAMON II displays exception information on the Current Status for All Exceptions panel. To navigate to this panel:

� Type fast path E.F.A on the top line of any panel.

Result: The Current Status for All Exceptions panel appears.

Current Status for All Exceptions panelTo find out how often the current thresholds are tripping, review the information on the Current Status for All Exceptions panel.

If an exception is tripping often, its threshold may not be a useful value for your site. An exception should trip only when a monitored condition is a problem for your site.

If you determine that a threshold for an exception is not an appropriate value for your site, follow the instructions in “Modifying Exception Thresholds” on page 48 to change the threshold value.

Page 47: OMEGAMON II for DB2 Tuning Guide, Version 540 - IBMpublib.boulder.ibm.com/tividd/td/ITOMEGAIIDB2/G251... · 2 OMEGAMON II for DB2 Tuning Guide, Version 540 Registered trademarks and

Defining Standards and Monitoring Performance 47

Validating Default Exception Thresholds

Once your exception thresholds are set, you are ready to monitor your system. (See “Section C: Monitoring System Performance” on page 60 for more information.)

Page 48: OMEGAMON II for DB2 Tuning Guide, Version 540 - IBMpublib.boulder.ibm.com/tividd/td/ITOMEGAIIDB2/G251... · 2 OMEGAMON II for DB2 Tuning Guide, Version 540 Registered trademarks and

Modifying Exception Thresholds

48 OMEGAMON II for DB2 Tuning Guide, Version 540

Modifying Exception Thresholds

You can use the OMEGAMON II profile maintenance facility to change exception thresholds or other session options.

Where do I start?To begin modifying your session profile:

� Select PROFILE from the Realtime Main Menu.

Result: The Profile Maintenance Menu appears.

FIGURE 6. Profile Maintenance Menu

From this menu, you can access panels to change the characteristics of exceptions, change the options for the current OMEGAMON II session, save or delete a profile, see a list of all profiles, or add a description to a profile.

Selecting an exception for analysisThe Exceptions Analysis Options Menu allows you to select an exception type in order to view or set options for that exception.

To display the Exception Analysis Options Menu, select EXCEPTION ANALYSIS from the Profile Maintenance Menu.

____________ ZPROF VTM O2 V540./C $DB2 mm/dd/yy. 08:30:17> Help PF1 Back PF3> Type a selection letter on the top line and press ENTER.==============================================================================> PROFILE MAINTENANCE MENU _ A SESSION OPTIONS ...... Set session options _ B EXCEPTION ANALYSIS ... Exception analysis options _ C LIST PROFILES ........ List profiles_ D DESCRIBE PROFILE ..... Describe a profile _ E SAVE USER ............ Save new/altered user profile_ F DELETE USER .......... Delete user profile_ G SAVE INSTALL ......... Save new/altered installation profile_ H DELETE INSTALL ....... Delete installation profile _ I LOGGING .............. Exception and automatic panel logging_ J MESSAGES ............. Set DB2/IRLM messages that MSGE exception monitors==============================================================================

Page 49: OMEGAMON II for DB2 Tuning Guide, Version 540 - IBMpublib.boulder.ibm.com/tividd/td/ITOMEGAIIDB2/G251... · 2 OMEGAMON II for DB2 Tuning Guide, Version 540 Registered trademarks and

Defining Standards and Monitoring Performance 49

Modifying Exception Thresholds

FIGURE 7. Exception Analysis Options Menu

If you choose an exception group from this menu, OMEGAMON II displays a list of the exceptions in that group. If you choose SINGLE, OMEGAMON II displays a panel on which you can enter a specific exception name.

Specifying exception optionsTo set options for a specific exception:

� Select SINGLE from the Exception Analysis Options Menu, and press Enter.

The top portion of this panel allows you to turn monitoring for the exception on and off, set its threshold, and define several other attributes. (For more information about these options, see the OMEGAMON II for DB2 Reference Manual.) This panel also allows you to turn exception logging and automatic panel logging on and off, and to select logging options.

The bottom portion of the panel appears only for thread exceptions. It allows you to specify the types of threads for which you want the exception to trip.

This means that you can specify different exception thresholds for threads from each connection type or by transaction group. For example, you can create an ETIM exception rule that sets a higher threshold for batch threads than for threads originating from CICS.

____________ ZEXCEP VTM O2 V540./C $DB2 mm/dd/yy 08:30:17> Help PF1 Back PF3> Enter a selection on the top line.==============================================================================> EXCEPTION ANALYSIS OPTIONS MENU _ A SYSTEM ............. Set exception analysis options for System exceptions_ B THREAD ............. Set exception analysis options for Thread exceptions_ C CICS ............... Set exception analysis options for CICS exceptions_ D IMS ................ Set exception analysis options for IMS exceptions_ E SINGLE ............. Set options for individual exception==============================================================================

Page 50: OMEGAMON II for DB2 Tuning Guide, Version 540 - IBMpublib.boulder.ibm.com/tividd/td/ITOMEGAIIDB2/G251... · 2 OMEGAMON II for DB2 Tuning Guide, Version 540 Registered trademarks and

Writing Exception Rules

50 OMEGAMON II for DB2 Tuning Guide, Version 540

Writing Exception Rules

Exception rules are filtering criteria or qualifiers that identify a thread or group of threads with a particular thread exception. You can use exception rules to narrow the scope of threads that trip an exception, making it easier to isolate a performance problem. Use exception rules to� exclude a group of threads from exception processing

� specify unique thresholds for thread groups. For example, you can specify that all batch threads will trip the exception at a value that is higher than the exception threshold value.

You can also use global exclude rules to exclude a thread or thread group from all exception processing. See “Using Global Exclude Rules” on page 52 for information about using global exclude rules.

ExampleFigure 8 on page 51 illustrates the rules that you might write for the ETIM exception, if it is constantly tripped by the threads used by the online collector to gather historical DB2 data. Since it is normal for these threads to stay active for long periods of time, you probably will not be concerned about their elapsed time.

ExampleIn the sample panel shown in Figure 8 on page 51, the threshold for ETIM has been set to 600 (seconds), which is the default for all threads not affected by the rules at the bottom of the panel.

� Rule 1 identifies a group of threads used by the historical extractor. Since these jobs should run quickly, the threshold is set to 300 seconds. (PLAN indicates that these are historical threads, AUTHID specifies the job name, and the CONNTYPE specifies that the connection type is batch.)

� Rule 2 specifies that ETIM should use a much higher threshold of 1200 seconds for all other batch threads.

� Rule 3 specifies that all historical threads, other than those specified in Rule 1, are to be excluded from this exception (EXCLUDE=YES).

Sequence of rulesOMEGAMON II executes these rules in sequence, so the order in which they appear is essential to their effectiveness. For example, if the order of Rule 3 and Rule 1 is reversed, the conditions specified in Rule 3 will be overwritten by Rule 1 which excludes all historical threads from this exception.

Likewise, if Rules 1 and 2 are reversed, the threshold of 300 seconds will be overwritten by the threshold of 1200 seconds set for all batch threads. However, Rules 2 and 3 could be reversed because they do not conflict or overlap.

In summary, the exceptions to a general rule, must precede the rule.

Page 51: OMEGAMON II for DB2 Tuning Guide, Version 540 - IBMpublib.boulder.ibm.com/tividd/td/ITOMEGAIIDB2/G251... · 2 OMEGAMON II for DB2 Tuning Guide, Version 540 Registered trademarks and

Defining Standards and Monitoring Performance 51

Writing Exception Rules

FIGURE 8. Set Exception Analysis Options for ETIM Exception Panel

_______________ ZXTETIM VTM O2 V520./C $DB2 mm/dd/yy 10:4041 2> Help PF1 Up PF7 Down PF8 Back PF3==============================================================================> SET EXCEPTION ANALYSIS OPTIONS FOR ETIM EXCEPTION > Warns when the elapsed time for a DB2 thread is > n seconds. > To change the value of an exception option, type the new value over the> current one. Press ENTER to record the change. XACB LIST=ETIM: ETIM+ DISPLAY Parameters: THRESHOLD Parameters: XLF Parameters:: State=ON Threshold=600 Auto=OFF: Group=TH Display=CLR3 Log=OFF: Bell=OFF Attribute=NONE Limit=0 (0): BOX Parameters: CYCLE Parameters: Repeat=NO: Boxchar=NO BOX ExNcyc=0 Persist=0: Boxclr=NONE Stop=0 (62) SS=ZTHLOG: Boxattr=NONE Cumulative=62 >mm/dd/yy 3:30:48<============================================================================== XTHD ETIM: FUNCTION=DIS(*) | (DIS/ADD/DEL)+-----------------------------------------------------------------------------+ RULE=01 | THREAD EXCEPTION RULE PARAMETERS:: | PLAN=KO2???HP AUTHID=H2XTRACT CONNTYPE=BATCH: | CICS PARAMETERS: CICSTRAN=____ CICSCONN=________: | IMS PARAMETERS: PSBNAME=________ IMSID=________: | THRSHOLD=300 EXCLUDE=NO+-----------------------------------------------------------------------------+ RULE=02 | THREAD EXCEPTION RULE PARAMETERS:: | PLAN=________ AUTHID=________ CONNTYPE=BATCH: | CICS PARAMETERS: CICSTRAN=____ CICSCONN=________: | IMS PARAMETERS: PSBNAME=________ IMSID=________: | THRSHOLD=1200 EXCLUDE=NO+-----------------------------------------------------------------------------+ RULE=03 | THREAD EXCEPTION RULE PARAMETERS:: | PLAN=KO2???HP AUTHID=________ CONNTYPE=_______: | CICS PARAMETERS: CICSTRAN=____ CICSCONN=________: | IMS PARAMETERS: PSBNAME=________ IMSID=________: | THRSHOLD=________ EXCLUDE=YES==============================================================================

Page 52: OMEGAMON II for DB2 Tuning Guide, Version 540 - IBMpublib.boulder.ibm.com/tividd/td/ITOMEGAIIDB2/G251... · 2 OMEGAMON II for DB2 Tuning Guide, Version 540 Registered trademarks and

Using Global Exclude Rules

52 OMEGAMON II for DB2 Tuning Guide, Version 540

Using Global Exclude Rules

You can use global exclude rules to exclude a thread or group of threads from all thread exception processing. Global exclude rules apply to all thread exceptions, eliminating the need to set up the same rule for each thread exception.

Global exclude rules

� are processed before thread exception rules

� apply to ALL thread exceptions

� always exclude threads from thread exception processing

� do not allow threshold values

Using the Global Exclude Rules panelUse the Global Exclude Rules panel to view a list of all the global exclude rules that are defined, or to add, modify, or show the details for a rule.

To access the Global Exclude Rules panel:

� Select Set Thresholds from the Options pull-down menu.

� Select Global Exclude Rules from the Thresholds Index menu.

Result: The Global Exclude Rules panel appears. If no rules exist, the Add a Global Exclude Rule panel appears.

Global exclude rule actionsYou can do the following from the Global Exclude Rules panel:

� add a rule

� modify a rule

� delete a rule

� show details for a rule

Refer to “Writing Exception Rules” on page 50 for general information about using rules. For definitions of each panel field, press F1 to access online help.

+--------------------------------------------------------------+| KD2UERSD Global Exclude Rules || || A=Add D=Delete M=Modify S=Show details || Lines 1 to 1 of 1 || +----------------------------------------------------------+ || | | Plan | | Conn | Thresholds | | || | Rule | Name | Authid | Type |--------+---------|Excl| || | | | | |Warning |Critical | | || |------+---------+---------+-------+--------+---------+----| || | 1 | |BATCH | | N/A| N/A|YES | || +----------------------------------------------------------+ || |+--------------------------------------------------------------+

Page 53: OMEGAMON II for DB2 Tuning Guide, Version 540 - IBMpublib.boulder.ibm.com/tividd/td/ITOMEGAIIDB2/G251... · 2 OMEGAMON II for DB2 Tuning Guide, Version 540 Registered trademarks and

Defining Standards and Monitoring Performance 53

Saving Exception Settings

Saving Exception Settings

OMEGAMON II uses any new threshold settings that you have chosen for the rest of the current session. If you wish to use these settings in future sessions, you must save the new values in a user profile.

Where do I start?To save a user profile, use the Save New/Altered User Profile panel. To display this panel:

� Choose SAVE USER from the Profile Maintenance Menu (Figure 6 on page 48).

Result: The Save New/Altered User Profile panel (Figure 9 ) is displayed.

FIGURE 9. Save New/Altered User Profile Panel

Saving a new user profileTo identify the changes that you wish to save:

� Type a two-character profile identifier after PPRF SAVE (such as PPRF SAVE 01), and press Enter.

Result: OMEGAMON II checks to see if a profile exists with the name you specified. If a profile does not exist, OMEGAMON II saves the profile with the specified name. If a profile already exists with the name you specified, OMEGAMON II displays a confirmation panel and asks you if you wish to replace the existing profile. OMEGAMON II does not allow you to change the default profile (/C).

Note: Before you attempt to save a user profile, be sure that space is available in the profile dataset. If your site uses external security, the O2CI started task must have authority to update the profile dataset. Otherwise, OMEGAMON II will not allow you to save the profile.

____________ ZSAVEU VTM O2 V540./C $DB2 mm/dd/yy 08:30:17 > Help PF1 Back PF3==============================================================================> SAVE NEW/ALTERED USER PROFILE > To save or replace a user profile, space over the comment character (>) that> precedes PPRF SAVE. Then, type a space followed by the profile's 2-character> suffix after PPRF SAVE. Press ENTER to record the change. >PPRF SAVE==============================================================================

Page 54: OMEGAMON II for DB2 Tuning Guide, Version 540 - IBMpublib.boulder.ibm.com/tividd/td/ITOMEGAIIDB2/G251... · 2 OMEGAMON II for DB2 Tuning Guide, Version 540 Registered trademarks and

Section B: Defining Historical Specifications

54 OMEGAMON II for DB2 Tuning Guide, Version 540

Section B: Defining Historical Specifications

For a historical view of the performance of your system, you must define a set of specifications to be used by the historical data collector, data extractor, and reporter. You set these specifications on various panels in the ISPF dialog.

Page 55: OMEGAMON II for DB2 Tuning Guide, Version 540 - IBMpublib.boulder.ibm.com/tividd/td/ITOMEGAIIDB2/G251... · 2 OMEGAMON II for DB2 Tuning Guide, Version 540 Registered trademarks and

Defining Standards and Monitoring Performance 55

Data Collection and Extraction Specifications

Data Collection and Extraction Specifications

Where do I start?To set data collection or extraction specifications:

� Select COLLECT or EXTRACT from the Historical Main Menu.

Result: A panel appears that prompts you for either data collection or extraction specifications.

Types of specificationsSome of the specifications you can define include:

� types of data to collect or extract (for example, statistics, accounting, or audit data and which trace class in each category)

� criteria that must be met before data is collected or extracted (for example, collect or extract data only for specific authorization or connection IDs)

� the collection interval (this interval applies to statistics data and to accounting data when grouping was performed at collection or extraction time)

� the time period for which data will be extracted (for example, from 9:00 a.m. to 3:00 p.m. every day from June 5, 1994 to July 10, 1994).

Evaluating your specificationsYou will probably set these specifications during or shortly after installation, and only occasionally reset them. Evaluate your system activity carefully before setting specifications, as they determine the types of information you will receive from the historical reporter. For example:

� If you do not collect or extract accounting trace classes 2 or 3, some of the reports you generate may contain blanks or zeroes in the fields that were meant to reflect this information.

� If you do not collect or extract accounting trace classes 7 and 8, you will not be able to generate package reports.

� If you specify the collection or extraction of data only for a certain authorization ID or plan name, you will not be able to generate reports for other authorization IDs or plan names.

See the OMEGAMON II for DB2 Historical Reporting Guide for more information on data collection and extraction specifications.

Page 56: OMEGAMON II for DB2 Tuning Guide, Version 540 - IBMpublib.boulder.ibm.com/tividd/td/ITOMEGAIIDB2/G251... · 2 OMEGAMON II for DB2 Tuning Guide, Version 540 Registered trademarks and

Historical Reporting Options

56 OMEGAMON II for DB2 Tuning Guide, Version 540

Historical Reporting Options

Using panels in the ISPF dialogYou set historical reporting options on these panels within the ISPF dialog:

� Historical Reporter Specifications� Historical Reporter Source Datasets� Historical Reporter Source DB2 Tables� Historical Reporter Selection Criteria� Historical Reporter Date/Time Criteria

These panels enable you to specify options that control information such as:

� which DB2 subsystem's data will be used� what information will appear on the report� how the information will be grouped on the report.

Where do I start?To view the Historical Reporter Menu, follow the steps outlined in “Using the OMEGAMON II ISPF Menu” on page 34 to access the Historical Main Menu, then do the following:

� Select REPORT to display the Historical Reporter Menu.

Result: The Historical Reporter Menu appears.

FIGURE 10. Historical Reporter Menu

The Historical Reporter Menu enables you to specify reporter options and to select the category of reports you wish to generate.

Candle ----------------- Historical Reporter Menu ----------- OMEGAMON for DB2 OPTION ===> 0 OPTIONS - Set reporter options 1 STATISTICS - Display statistics report menu 2 ACCOUNTING - Display accounting report menu 3 AUDIT - Display audit report menu 4 DSNZPARM - Display DSNZPARM report menu 5 PERFORMANCE - Display performance report menu 6 GRAPHICS - Display graphical report menu B BATCH - Process batch report requests X EXIT - Return to historical menu Enter END command to return to historical menu

Page 57: OMEGAMON II for DB2 Tuning Guide, Version 540 - IBMpublib.boulder.ibm.com/tividd/td/ITOMEGAIIDB2/G251... · 2 OMEGAMON II for DB2 Tuning Guide, Version 540 Registered trademarks and

Defining Standards and Monitoring Performance 57

Historical Reporting Options

Choosing optionsChoose OPTIONS from the Historical Reporter Menu to display the Historical Reporter Options Menu.

FIGURE 11. Historical Reporter Options Menu

This menu allows you to select the set of options you want to modify. You can also reach this panel by entering OPTIONS on the command line of any report selection panel.

Choosing selectionsChoose SELECTIONS from the Historical Reporter Options Menu to display the Historical Reporter Selection Criteria panel. This panel allows you to specify conditions for including data in a report. You can restrict the report to include data for only a particular element. The figure that follows shows a sample criteria panel.

FIGURE 12. Historical Reporter Selection Criteria Panel

Specifying date and time criteria for reportsThe Date/Time Criteria panel appears when you select DATE/TIME from the Historical Reporter Options Menu.

Candle ----------- Historical Reporter Options Menu ------ OMEGAMON II for DB2OPTION ===> 1 SPECIFICATIONS - Set Filtering criteria and reporting options 2 SOURCE - Specify input datasets to use for reporting 3 TABLES - Specify DB2 table names to use for reporting 4 SELECTIONS - Specify report filtering selection criteria 5 DATE/TIME - Specify report date and time criteria X EXIT - Return to previous menu Enter END command to return to previous menu

COMMAND ===> To limit data selected, enter operator (=, ^=, >, >=, <, <=) and values: DB2ID __ ____ ____ ____ ____ ____ ELAPSED __ _______________ hh:mm:ss.thtAUTHID __ ________ ________ ________ DB2TIME __ _______________ hh:mm:ss.thtOAUTH __ ________ ________ ________ DB2CPU __ _______________ hh:mm:ss.thtPLAN __ ________ ________ ________ DBID __ ____ ____ ____ ____ ____ ____PROGRAM __ ________ ________ ________ PSID __ ____ ____ ____ ____ ____ ____CONNID __ ________ ________ ________ DBNAME __ ________ ________ ________CORRID __ ____________ ____________ PSNAME __ ________ ________ ________BPID __ ____ ____ ____ ____ ____ ____ IFCID __ ____ ____ ____ ____ ____ ____ ____ ____ ____ ____ ____ ____ ____ ____ ______ Start time: ____ __ __ __ __ __ ______ ____ __ __ __ __ __ ______(THREAD/UOW/PGM) ____ __ __ __ __ __ ______ ____ __ __ __ __ __ ______ yyyy-mm-dd-hh.mm.ss.thtthm yyyy-mm-dd-hh.mm.ss.thtthmPress ENTER to process options; press END to cancel

Page 58: OMEGAMON II for DB2 Tuning Guide, Version 540 - IBMpublib.boulder.ibm.com/tividd/td/ITOMEGAIIDB2/G251... · 2 OMEGAMON II for DB2 Tuning Guide, Version 540 Registered trademarks and

Historical Reporting Options

58 OMEGAMON II for DB2 Tuning Guide, Version 540

FIGURE 13. Historical Reporter Date/Time Criteria Panel

Date/time fieldsThe parameters on this panel enable you to restrict the reporting period to a specific range of dates and times. By using these parameters, you can reduce the number of pages that are generated for each report, and concentrate on only the information that interests you.

Start and end dates

Start and end dates are used when you know the exact time period for which you want to report. Relative dates are used when you want reporting to begin at an increment of time prior to the current date. You may specify either a start and end date or a relative date, but not both. If you leave both parameters blank, the reporting period begins seven days prior to the current date.

Start and end times

When start and end times are specified, the reporting period is treated as a series of time intervals over a number of days. In other words, if you specified start and end dates of 2/15/97 and 7/10/97, and start and end times of 9:00 a.m. and 3:30 p.m., data will be reported between the hours of 9:00 a.m. and 3:30 p.m. each day from February 15 to July 10.

Choosing specificationsWhen used in conjunction with the date and time parameters, you can control the level of detail with which information is reported by using the Group by field on the Historical Reporter Specifications panel. (See Figure 14 on page 59.) To access this panel, choose SPECIFICATIONS on the Historical Reporter Options Menu. (See Figure 11 on page 57.)

Candle -------- Historical Reporter Date/Time Criteria---- OMEGAMON II for DB2COMMAND ===> Limit input data to records in the following absolute or relative range: European dates ...: N (Y/N, dd.mm.yyyy rather than mm/dd/yyy) Start date/time ..: __ / __ / ____ __ : __ End date/time ....: __ / __ / ____ __ : __ Relative start ...: ___ ______ ago (1-999, DAYS, WEEKS, MONTHS) Relative end .....: ___ ______ (1-999, DAYS, WEEKS, MONTHS) Limit data selection to specific times of day: (Default = 00:00 - 24:00) Start time........: 00 : 00 End time.......: 24 : 00 Press ENTER to process options; press END to cancel

Page 59: OMEGAMON II for DB2 Tuning Guide, Version 540 - IBMpublib.boulder.ibm.com/tividd/td/ITOMEGAIIDB2/G251... · 2 OMEGAMON II for DB2 Tuning Guide, Version 540 Registered trademarks and

Defining Standards and Monitoring Performance 59

Historical Reporting Options

FIGURE 14. Historical Reporter Specifications Panel

For example, suppose data is collected every 30 minutes, and you wish to generate a report for system statistics reflecting the past week. You can use the Group by specification to specify what data is reported on.

Selecting a report to generateWhen you select a report type from the Historical Reporter Menu, a selection panel for that type of report appears, such as the one in Figure 15 . Each of these panels contains a list of the reports that are available for the category you selected.

FIGURE 15. Statistics Reports Panel

Sample historical reportsTo see examples of the types of historical reports that can be generated, refer to the Historical Reporting Guide.

Candle ---------- Historical Reporter Specifications ----- OMEGAMON II for DB2COMMAND ===> Date display format .....: U (U/E/I/J/A - see Help for explanation) Use DB2 tables for input : N (Y/N; If N, specified source datasets are used) Group by ....: ________ ________ ________ ________ ________ ________ ________ (any of: HOUR/DAY|DB2ID|PLANNAME|CONNID|CORRID|AUTHID|ORIGAUTH) (or ONE of: THREAD|PROGRAM|UOW) Order by ....: ________ ________ ________ ________ ________ ________ ________ (any of: TIME|DB2ID|PLANNAME|CONNID|CORRID|AUTHID|ORIGAUTH) Values ......: T (T=Total, C=PerCommit, H=PerThread) Press ENTER to process options; press END to cancel

Candle ----------------- STATISTICS REPORTS ----------------- OMEGAMON II for DB2OPTION ===> Enter an action code next to the desired report. S = Show report P = Print report H = Report help B = Batch submission _ Summary _ Detail _ CPU Time Summary _ Subsystem Activity _ Buffer Pool Activity _ EDM Pool Activity _ Log Activity _ Lock Activity _ SQL Activity _ Command Activity _ Bind Activity _ Distributed Data Facility Activity _ Open/Close Activity * (indicates queued for batch submission)

Page 60: OMEGAMON II for DB2 Tuning Guide, Version 540 - IBMpublib.boulder.ibm.com/tividd/td/ITOMEGAIIDB2/G251... · 2 OMEGAMON II for DB2 Tuning Guide, Version 540 Registered trademarks and

Section C: Monitoring System Performance

60 OMEGAMON II for DB2 Tuning Guide, Version 540

Section C: Monitoring System Performance

Once you have defined your performance standards (by setting exception thresholds, and providing data collection, extraction, and historical reporting options), you must monitor your system’s performance to verify that the standards you set are appropriate for your site. You can do this using the following OMEGAMON II features:

� realtime monitor

� historical reporter

Note: OMEGAMON II has a number of automated facilities that can monitor your DB2 system without operator intervention. For more information about these automated features, see the OMEGAMON II for DB2 Reference Manual.

Page 61: OMEGAMON II for DB2 Tuning Guide, Version 540 - IBMpublib.boulder.ibm.com/tividd/td/ITOMEGAIIDB2/G251... · 2 OMEGAMON II for DB2 Tuning Guide, Version 540 Registered trademarks and

Defining Standards and Monitoring Performance 61

Realtime Monitor

Realtime Monitor

OMEGAMON II monitors your system for exception conditions, and reports which exceptions have tripped during each cycle. (In dedicated mode, a cycle is five seconds, by default. In VTAM, TSO, and ISPF modes, a cycle is the length of time between two consecutive presses of the Enter key.)

Summary of DB2 activityYou can see how well your system is performing by looking at the Summary of DB2 Activity panel, which provides an overview of current DB2 activity. Figure 16 shows a typical Summary of DB2 Activity panel.

FIGURE 16. Summary of DB2 Activity Panel

This panel presents overall DB2 system activity and resource utilization information, as well as connection activity summaries, which are grouped by the connections that communicate with DB2: TSO, IMS, CICS, batch, and utilities. In addition, OMEGAMON II highlights some fields on the Summary of DB2 Activity panel to indicate potential problems in the system.

You can use the Summary of DB2 Activity panel to alert you to problems in the areas described in the sections that follow.

Exception conditionsThe Synch Read I/O Rate field displays the number of synchronous read I/Os per second. The Prefetch Req Rate field displays the number of sequential prefetch requests per second. These fields are highlighted when exception conditions exist.

See “Resolving the exception condition” on page 73 for information about how to resolve problems in these areas.

____________ ZSUMM VTM O2 V540./C $DB2 mm/dd/yy 08:30:17> Help PF1 Back PF3 Zoom PF11==============================================================================> SUMMARY OF DB2 ACTIVITY DSYS+ SSAS+DBAS+IRLM+DIST CPU = 5.0% Thread Commit Rate = 7.6/sec+ Create Thread Rate = 5.0/sec Thread Signon Rate = 6.2/sec+ Synch Read I/O Rate = 102.0/sec Prefetch Req Rate = 14.3/sec+ Update Request Rate = 19.9/sec Write I/O Rate = 12.2/sec+ Getpages/Read I/O = 10.21 Pages/Write I/O = 12.20+ Current Lock Suspensions = 5 Locking Timeouts = 21+ Locking Deadlocks = 29 Locking Escalations = 3++ Connection Type Connections Threads CPU Getpage Rate Elapsed Time+ ------------------ ------------ ------- ----- ------------ ------------+ IMS 13 10 11.5% 3.1/sec 00:00:01.2+ CICS 2 2 2.3% 2.1/sec 00:00:02.5+ TSO Foreground 34 14 3.3% 1.3/sec 00:00:12.2+ Batch 4 3 1.3% 16.1/sec 00:00:02.5+ Utilities 1 1 4.8% 9.3/sec 00:04:12.3+ Distributed 0 0 0.0% 0.0/sec 00:00:00.0+ All Connections 53 29 18.4% 22.6/sec 00:00:04.1==============================================================================

Page 62: OMEGAMON II for DB2 Tuning Guide, Version 540 - IBMpublib.boulder.ibm.com/tividd/td/ITOMEGAIIDB2/G251... · 2 OMEGAMON II for DB2 Tuning Guide, Version 540 Registered trademarks and

Realtime Monitor

62 OMEGAMON II for DB2 Tuning Guide, Version 540

Thread informationThe Connection Type field lists all of the DB2 connection types (IMS, CICS, TSO, distributed database, batch, and utility) for which summary information is displayed. The Connections field displays the number of active connections for each connection type. The Threads field displays the number of active threads for each connection type. This field is highlighted when the number of active threads exceeds the threshold for the TMAX exception.

The values in these fields indicate the current status of threads within the DB2 subsystem. If these values do not meet your installation's performance standards, see “Analyzing Thread Information” on page 75 for information about how to resolve thread problems.

Locking informationThe Current Lock Suspensions field displays the current number of threads that are waiting due to a lock request issued for a resource that is unavailable. The Locking Timeouts field displays the number of locking timeouts that occurred since DB2 was started. The Locking Deadlocks field displays the number of deadlocks that occurred since DB2 was started. The Locking Escalations field displays the number of lock escalations that occurred since DB2 was started.

The values in these fields indicate problems or potential problem with DB2 locks. If these values do not meet the performance standards of your installation, see “Resolving Locking Conflicts” on page 127 to resolve any locking problems.

Application performanceThe CPU field displays the total CPU utilization for each connection type. (For information about CPU utilization, see the OMEGAMON II for DB2 Reference Manual.) The Getpage Rate field displays the total number of getpages per second for all active threads by connection type.

The Elapsed Time field displays the average elapsed time for all active threads by connection type.

The values in these fields indicate how well applications are processing within the system. If these values do not meet the performance standards of your installation, see “Analyzing Query Performance” on page 215 and “Analyzing Application Performance with ATF” on page 133 for information about analyzing your system's application and query performance.

DB2 resource managersThe Update Request Rate field displays the number of update requests per second. The Synch Read I/O Rate field displays the number of synchronous read I/Os per second. The Prefetch Req Rate field displays the number of sequential prefetch requests per second.

The Write I/O Rate field displays the number of write I/Os per second. The Getpages/Read I/O field displays the getpage to read I/O ratio. The Pages/Write I/O field displays the average number of pages written per write I/O.

Page 63: OMEGAMON II for DB2 Tuning Guide, Version 540 - IBMpublib.boulder.ibm.com/tividd/td/ITOMEGAIIDB2/G251... · 2 OMEGAMON II for DB2 Tuning Guide, Version 540 Registered trademarks and

Defining Standards and Monitoring Performance 63

Realtime Monitor

The values in these fields indicate how well DB2's resource managers are performing. If these values do not meet your installation's performance standards, see “Analyzing DB2 Resource Manager Performance” on page 191 for information about resolving resource problems.

DB2 system environmentThe SSAS+DBAS+IRLM+DIST CPU field is the CPU rate (percent) used by these DB2 address spaces. The Thread Commit Rate field displays the number of commits per second. The Create Thread Rate field displays the number of create thread requests per second. The Thread Signon Rate field displays the number of thread signon requests per second.

The values in these fields provide information about the general status of your DB2 system.

Page 64: OMEGAMON II for DB2 Tuning Guide, Version 540 - IBMpublib.boulder.ibm.com/tividd/td/ITOMEGAIIDB2/G251... · 2 OMEGAMON II for DB2 Tuning Guide, Version 540 Registered trademarks and

Realtime Monitor

64 OMEGAMON II for DB2 Tuning Guide, Version 540

Page 65: OMEGAMON II for DB2 Tuning Guide, Version 540 - IBMpublib.boulder.ibm.com/tividd/td/ITOMEGAIIDB2/G251... · 2 OMEGAMON II for DB2 Tuning Guide, Version 540 Registered trademarks and

Resolving Exception Conditions 65

Resolving Exception Conditions

Chapter ContentsAnalyzing a Tripped Exception . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 66Monitoring DB2 and IRLM Messages . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 69Guidelines for Resolving Exception Conditions. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 70Using Historical Reports to Analyze Exceptions. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 71

3

Page 66: OMEGAMON II for DB2 Tuning Guide, Version 540 - IBMpublib.boulder.ibm.com/tividd/td/ITOMEGAIIDB2/G251... · 2 OMEGAMON II for DB2 Tuning Guide, Version 540 Registered trademarks and

Analyzing a Tripped Exception

66 OMEGAMON II for DB2 Tuning Guide, Version 540

Analyzing a Tripped Exception

OMEGAMON II displays exception messages to indicate current or potential problems in the system. There are four exception groups: CICS, IMS, system, and thread.

ScenarioSuppose you are monitoring the Summary of DB2 Activity panel (as Figure 16 on page 61 shows) and you see that the CPU field is highlighted. You know that this exception exceeded its threshold value.

Identifying the problem threadTo find out why this exception tripped, do the following:

� Move the cursor to the All Connections line below the Connection Type heading, and press PF11.

Result: The All Threads Connected to DB2 panel appears.

FIGURE 17. All Threads Connected to DB2 Panel

This panel shows the plan name of each thread currently connected to DB2. There are a number of ways to determine which threads are using too much CPU:

� You can position the cursor on any data line under the column heading CPU and press the sort key to display the threads in descending sequence by CPU rate.

� You can select option J (FILTER) to restrict the threads displayed to only those threads with high In-DB2 times.

____________ ZALLT VTM O2 V540./C $DB2 mm/dd/yy 08:30:12> Help PF1 Back PF3 Up PF7 Down PF8 Sort PF10 Zoom PF11 > THREAD ACTIVITY: Enter a selection letter on the top line. > *-ALL B-TSO C-CICS D-IMS E-BACKGROUND F-DIST ALLIED> G-DIST DBAC H-UTILITY I-INACTIVE J-FILTER==============================================================================> ALL THREADS CONNECTED TO DB2 THDA+ *+ Elapsed Planname CPU Status GetPg Update Commit Jobname+ ----------- -------- ----- ------------ ------ ------ ------ --------+ 00:53:59.05 PLAN0090 12.2% IN-DB2 6231 381 123 CICSPROD+ 00:12:37.16 PLAN0100 11.1% IN-SQL-CALL 1943 0 189 TSOUSER1+ 00:09:29.27 PLAN0001 2.0% IN-DB2 1111 21 14 IMSA+ 00:05:12.38 PLAN0001 3.9% IN-TERM-THRD 396 953 3 IMSA+ 00:03:57.49 PLAN0001 4.8% IN-COMT-PHS2 241 0 0 CICSPRD2+ 00:03:12.50 PLAN3000 0.7% IN-SIGNON 0 0 0 CICSPROD+ 00:02:49.61 PLAN0200 10.6% IN-DB2 482 7 1 CICSPROD+ 00:01:37.72 PLAN0405 5.5% IN-SQL-CALL 232 1 4 CICSPRD2+ 00:00:55.83 PLAN9081 6.4% IN-DB2 93 451 7 CICSTEST+ 00:00:38.94 PLAN8905 3.3% IN-TERM-THRD 45 17 3 TSOUSER2+ 00:00:37.05 PLAN1000 2.2% IN-COMT-PHS1 13 0 1 IMSB+ 00:00:00.00 PLAN0090 0.1% IN-CRTE-THRD 0 0 1 BATCHJB1==============================================================================

Page 67: OMEGAMON II for DB2 Tuning Guide, Version 540 - IBMpublib.boulder.ibm.com/tividd/td/ITOMEGAIIDB2/G251... · 2 OMEGAMON II for DB2 Tuning Guide, Version 540 Registered trademarks and

Resolving Exception Conditions 67

Analyzing a Tripped Exception

To find out the name of the tripped exception:

� Type E. on the INFO-line.

Result: The Exception Messages for All Exceptions panel appears. (Figure 18 shows a typical Exception Messages for All Exceptions panel.)

FIGURE 18. Exception Messages for All Exceptions panel

Analyzing thread detailIn this example, the tripped exception is related to CPU use. You see that the TCPU exception under the heading Thread Exceptions has tripped. For more detailed information about the threads causing the TCPU exception to trip:

� Move the cursor anywhere on the line of the TCPU message, and press PF11.

Result: The Thread Detail panel (Figure 19 on page 68) appears.

____________ ZEXSY VTM O2 V510./C $DB2 mm/dd/yy 08:30:17> Help PF1 Back PF3 Up PF7 Down PF8 Recommendations PF10 Zoom PF11>> EXCEPTIONS: Enter a selection letter on the top line. > *-ALL B-THREAD C-CICS D-IMS E-SYSTEM F- STATUS==============================================================================> EXCEPTION MESSAGES FOR ALL EXCEPTIONS LEXSY OMEGAMON Exception Analysis+============ CICS EXCEPTIONS ============+ CICT nn.n% of Thread Max (THRDMAX) Reached *HIGH*+ ENTO nn Transactions Overflowed to Pool Thread, Plan=cccccccc.aaaa *HIGH*+ ENTW nn Transactions Waiting for Entry Thread, Plan=cccccccc.aaaa *HIGH*============ IMS EXCEPTIONS ============+ IMCN Region MPPREG01 defined to DB2 but connection failed. *HIGH*============ SYSTEM EXCEPTIONS ============+ INDT Number of Indoubt Threads is nn *HIGH*+ LOGN Number of Primary Logs Available for Use is nn *LOW*+ SUSL nn Threads Currently Suspended Due to Locking Conflict *HIGH*+ THDQ nn Threads Currently Queued for Create Thread *HIGH*============ THREAD EXCEPTIONS ============+ PLAN=pppppppp CONNID=iiiiiiii CORRID=cccccccccccc AUTHID=aaaaaaaa+ COMT Thread Commit Rate > nnn:n (nnn updates in m commits) *LOW*+ CTHD Waiting for Create Thread+ INDB Thread is Terminated and Indoubt+ PLAN=pppppppp CONNID=iiiiiiii CORRID=cccccccccccc AUTHID=aaaaaaaa+ TCPU CPU Utilization is 31.7% *HIGH*==============================================================================

Page 68: OMEGAMON II for DB2 Tuning Guide, Version 540 - IBMpublib.boulder.ibm.com/tividd/td/ITOMEGAIIDB2/G251... · 2 OMEGAMON II for DB2 Tuning Guide, Version 540 Registered trademarks and

Analyzing a Tripped Exception

68 OMEGAMON II for DB2 Tuning Guide, Version 540

FIGURE 19. Thread Detail Panel

The Thread Detail panel provides more detailed information about the thread to help you analyze the problem. Press PF3 to return to the Exception Messages for All Exceptions panel.

Using exception recommendationsFrom the Exceptions Messages for All Exceptions panel:� Move the cursor to the TCPU exception line, and press PF10.

Result: An exception recommendation panel for the TCPU exception is displayed. Review the information on this panel to determine how to resolve the exception condition.

Navigate to the appropriate panels to take the actions necessary to resolve the problem. If you determine that this condition is not a problem for your system, you may want to change the threshold for TCPU to a value more appropriate for your site. “Modifying Exception Thresholds” on page 48 describes how to change exception thresholds.

________________ ZTDTL VTM O2 V540./C $DB2 mm/dd/yy 16:42:43 2> Help PF1 Back PF3 > THREAD INFORMATION: Enter a selection letter on the top line. > *-THREAD DETAIL B-LOCK COUNTS C-LOCK WAITS D-LOCKS OWNED E-GLOBAL LOCKS> F-CURRENT SQL G-SQL COUNTS H-DISTRIBUTED I-BUFFER POOL J-GROUP BP> K-PACKAGES L-RES LIMIT M-PARALLEL TASKS N-UTILITY O-CANCEL THREAD> P-DB2 CONSOLE R-DSN ACTIVITY=============================================================================> THREAD DETAIL PLAN+ Thread: Plan=KO2400HP Connid=DB2CALL Corrid=TDO2aaa Authid=TDO2aaa+ Attach: BATCH JOB Name=TDO2aaa JOB asid= 164+ Package:SP61B Collection= act+ DB2 Status = NOT IN-DB2 MVS Status = WAIT-MISC+ Total Elapsed Time = 06:37:01.601 CPU Utilization = 00.1%+ Total CPU Time = 00:00:05.205 Total Parallel Tasks = 0+ Total Stored Proc CPU = 00:00:00.000 Current Parallel Tasks = 0++ In-DB2 Times Total Current+ ------------------------------ ------------ ------------+ Elapsed Time 00:00:01.864 00:00:18.026+ CPU Time 00:00:00.448 00:00:00.900+ Stored Procedure CPU Time 00:00:00.000 00:00:00.000++ Waits Count Total Current+ ------------------------------ ---------- ------------ ------------+ Synchronous I/O Wait 0 00:00:15.516 00:00:00.000+ Asynchronous Read I/O Wait 0 00:00:02.062 00:00:00.008+ Asynchronous Write I/O Wait 0 00:00:00.000 00:00:00.000+ Local Lock/Latch Wait 0 00:00:00.004 00:00:00.000+ Page Latch Wait 0 00:00:00.000 00:00:00.000+ Drain Lock Wait 0 00:00:00.000 00:00:00.000+ Drain of Claims Wait 0 00:00:00.000 00:00:00.000+ Global Lock Wait 0 00:00:00.000 00:00:00.000+ Inter-System Message Send Wait 0 00:00:00.000 00:00:00.000+ DB2 Service Task Wait 8 00:00:00.000 00:00:00.000+ Archive Log Mode(Quiesce) Wait 0 00:00:00.000 00:00:00.000+ Archive Read from Tape Wait 0 00:00:00.000 00:00:00.000+ Stored Procedure Schedule Wait 0 00:00:00.000 00:00:00.000++ Current I/O Wait Resource+ DB=DB000001 PS=TS000001=============================================================================

Page 69: OMEGAMON II for DB2 Tuning Guide, Version 540 - IBMpublib.boulder.ibm.com/tividd/td/ITOMEGAIIDB2/G251... · 2 OMEGAMON II for DB2 Tuning Guide, Version 540 Registered trademarks and

Resolving Exception Conditions 69

Monitoring DB2 and IRLM Messages

Monitoring DB2 and IRLM Messages

The MSGE exception allows you to specify DB2 and IRLM messages to be monitored like an exception. You can do this on the Set DB2/IRLM Messages That MSGE Exception Monitors panel. You can access this panel from the Profile Maintenance Menu, or by entering P.J on the INFO-line of any panel.

MessagesThe messages listed below are examples of messages that you might want to select using MSGE. See the IBM DB2 Messages and Codes manual for detailed information about DB2 messages.

DSNB224I Buffer manager I/O error.

DSNB601I Buffer pool nn is full and cannot be expanded.

DSNJ004I Log is in single mode.

DSNJ110E Last copy. Active log is 75% full.

DSNI013I Potentially inconsistent data.

DSNJ111E Out of space in active log datasets.

DSNB227I DFHSM recall failed for dsname.

DSNC011I Transaction abended because CICS threads are unavailable.

DSNI004I Resource has been stopped (for example, Open error).

DSNJ006I Allocation for new archive log DSN cancelled by operator.

DSNJ007I Operator cancelled mount of archive dataset.

DXR004I IRLM xxxxxx, where xxxxxx can be trace started, trace stopped, etc.

DSNB209I Critical function cleanup initiated for pageset.

DSNT375I Plan is deadlocked.

DSNT500I Resource is unavailable for system functions.

DSNT501I Resource is unavailable for thread.

DSNT376I Plan A timed out because lock is held by plan B.

Page 70: OMEGAMON II for DB2 Tuning Guide, Version 540 - IBMpublib.boulder.ibm.com/tividd/td/ITOMEGAIIDB2/G251... · 2 OMEGAMON II for DB2 Tuning Guide, Version 540 Registered trademarks and

Guidelines for Resolving Exception Conditions

70 OMEGAMON II for DB2 Tuning Guide, Version 540

Guidelines for Resolving Exception Conditions

ProcedureYou can follow these general steps to resolve exception conditions in your system.

1. Monitor the Summary of DB2 Activity panel for highlighted fields and unusual values.

2. Press PF11 to zoom to more information by placing the cursor on the line of the specific connection type related to the exception (if you know the connection type) or the All Connections line (if you do not know the connection type).

3. Navigate to the Exception Messages for All Exceptions panel (by typing E. on the INFO-line) to view the text of the exception message.

4. Zoom to detailed information about the exception by pressing PF11 on the text of the exception message.

5. Analyze the detailed information.

6. Press PF3 to return to the Exception Messages for All Exceptions panel.

7. Review the exception recommendation panel by moving the cursor to the exception line and pressing PF10.

8. Resolve the exception condition with the appropriate action. This includes issuing DB2 commands from the OMEGAMON II System Console and Message Traffic panel (use fastpath C.). If the condition reported by an exception is not a problem for your system, change the exception threshold value to a value that meets the performance standards of your site.

Page 71: OMEGAMON II for DB2 Tuning Guide, Version 540 - IBMpublib.boulder.ibm.com/tividd/td/ITOMEGAIIDB2/G251... · 2 OMEGAMON II for DB2 Tuning Guide, Version 540 Registered trademarks and

Resolving Exception Conditions 71

Using Historical Reports to Analyze Exceptions

Using Historical Reports to Analyze Exceptions

You can use OMEGAMON II historical reports to further investigate exception conditions by tracking trends and locating peak periods that may have tripped exceptions in the past.

ScenarioTo illustrate the use of historical reports, we can continue with the previous CPU utilization scenario described in “Scenario” on page 66. Suppose for this scenario, that the Exception Messages for All Exceptions panel indicated that the tripped exception related to CPU use was IDBC instead of TCPU. (IDBC trips when the threshold for the amount of CPU time used by DB2 to process a thread is exceeded.) The following sections will describe how to use historical reports to resolve the problem.

Creating a historical reportYou first may want to display exception recommendations for IDBC. Then you may want to look at the OMEGAMON II historical accounting reports to review and validate thread usage over the last 30 days. Follow these steps:

1. Make sure your reporter options are set to reflect a daily reporting period for the past 30 days. See “Section B: Defining Historical Specifications” on page 54 for more information on setting reporter options.

2. Choose the GRAPHICS option on the Historical Reporter Menu. For more information on navigating through the historical reporter panels, see the OMEGAMON II for DB2 Historical Reporting Guide.

3. Select the In-DB2 CPU Time Per Commit - Daily graphic report.You notice that CPU utilization was consistent until last week. Then it drastically increased for two days before stabilizing at a slightly lower level.

4. Return to the Historical Reporter Menu and choose the ACCOUNTING option.5. Change your reporter options to the time periods you want to report.6. Select the Accounting Summary report. Figure 20 on page 72 shows data for two

days for the specified time period.

Page 72: OMEGAMON II for DB2 Tuning Guide, Version 540 - IBMpublib.boulder.ibm.com/tividd/td/ITOMEGAIIDB2/G251... · 2 OMEGAMON II for DB2 Tuning Guide, Version 540 Registered trademarks and

Using H

istorical Reports to A

nalyze Exceptions

72O

ME

GA

MO

N II for D

B2 Tuning G

uide, Version 540

FIG

UR

E 20.

Acco

un

ting

Su

mm

ary Rep

ort

An

alyzing

the h

istorical rep

ort

The report shows that the getpage requests increased from

1042 to 25091 over this period. You recall that an application changed during this tim

e, which suggests that an

SQL®

call that once utilized an index may no longer be using it. You can run additional

reports such as the Accounting B

uffer Pool Activity report to isolate the application

responsible for the increase in getpage requests.

Omegamon II for DB2 V540 Accounting Summary Page 1 Run Date=mm/dd/yy Grouped by DB2id, Day Run Time=10:09:07 Start Date=mm/dd/yy; Sysid=SYSG, DB2id=DSNP, Threads=217, Commits=2382, Aborts=0 ---------------------------------------------------------------------------------------------------------------------------

Total Total In-DB2 In-DB2 I/O Wait Lock Wait Total SQL GetPage Read Prefetch LockElapTime CPU Time Time CPU Time Time Time Requests Requests Requests Requests Requests----------- ---------- ----------- --------- ---------- --------- --------- --------- -------- -------- --------1542.714570 424.227752 345.297621 129.075069 63.488245 0.393426 142234 1042 3657 3946 111352 Start Date=mm/dd/yy; Sysid=SYSG, DB2id=DSNP, Threads=336, Commits=6353, Aborts=4--------------------------------------------------------------------------------------------------------------------------

Total Total In-DB2 In-DB2 I/O Wait Lock Wait Total SQL GetPage Read Prefetch LockElapTime CPU Time Time CPU Time Time Time Requests Requests Requests Requests Requests------------- ----------- ---------- ---------- ---------- ---------- --------- --------- -------- -------- ---------212669.426687 2043.195248 3217.843101 848.787382 1108.543882 7.002847 531437 25091 47431 22741 791374

Page 73: OMEGAMON II for DB2 Tuning Guide, Version 540 - IBMpublib.boulder.ibm.com/tividd/td/ITOMEGAIIDB2/G251... · 2 OMEGAMON II for DB2 Tuning Guide, Version 540 Registered trademarks and

Resolving Exception Conditions 73

Using Historical Reports to Analyze Exceptions

You can confirm your findings with the EXPLAIN tool on the DB2 Tools Menu, or you can perform an IBM DB2 EXPLAIN on the SQL statements associated with the application. The results of the EXPLAIN confirm that the application is now employing tablespace scans instead of utilizing the index to access the data.

Resolving the exception conditionBased upon the information you discovered from the historical graphs and reports, you might choose to take any of the following actions:

� Redesign the application to again make use of the index.

� Create another index for this application to use and rebind the plan or package.

� Examine the current state of the tablespace in question to see whether reorganization is necessary.

Page 74: OMEGAMON II for DB2 Tuning Guide, Version 540 - IBMpublib.boulder.ibm.com/tividd/td/ITOMEGAIIDB2/G251... · 2 OMEGAMON II for DB2 Tuning Guide, Version 540 Registered trademarks and

Using Historical Reports to Analyze Exceptions

74 OMEGAMON II for DB2 Tuning Guide, Version 540

Page 75: OMEGAMON II for DB2 Tuning Guide, Version 540 - IBMpublib.boulder.ibm.com/tividd/td/ITOMEGAIIDB2/G251... · 2 OMEGAMON II for DB2 Tuning Guide, Version 540 Registered trademarks and

Analyzing Thread Information 75

Analyzing Thread Information

Chapter Contents Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 76Section A: Identify Threads by Connection Type. . . . . . . . . . . . . . . . . . . . . . . . . . . . . 77Section B: Review Thread Information by Connection Type . . . . . . . . . . . . . . . . . . . . 78CICS Thread Information . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 80IMS Thread Information . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 83TSO Thread Information . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 84Batch Thread Information. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 85Utility Thread Information . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 86Distributed Thread Information. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 88Stored Procedures Thread Information . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 90System Thread Information . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 92Section C: Analyze Detailed Information . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 94Specify Application Trace . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 97Utility Detail . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 98Stopped Utility Information . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 99Section D: Reviewing SQL Information . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 100The SQL Call . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 102Section E: Other Methods for Analyzing Thread Detail . . . . . . . . . . . . . . . . . . . . . . . 103Analyzing Thread Information Using Historical Reports . . . . . . . . . . . . . . . . . . . . . . 105Section F: Viewing Near-term Thread History . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 108Specifying Collection Options . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 110Specifying Report and Filter Options . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 113Viewing Thread Activity for a Report Period . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 116Viewing a Summary of Thread Activity . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 119Viewing Details About a Completed Thread . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 121Related Thread History Detail Panels . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 123Section G: Canceling a Thread . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 125

4

Page 76: OMEGAMON II for DB2 Tuning Guide, Version 540 - IBMpublib.boulder.ibm.com/tividd/td/ITOMEGAIIDB2/G251... · 2 OMEGAMON II for DB2 Tuning Guide, Version 540 Registered trademarks and

Introduction

76 OMEGAMON II for DB2 Tuning Guide, Version 540

Introduction

While monitoring your DB2 subsystem from the Summary of DB2 Activity panel, you might detect that SQL calls from online transactions to DB2 are not being processed efficiently. This chapter describes how to obtain more detailed information about threads connected to DB2 and how to adjust DB2 thread parameters so that the threads process faster.

ProcedureYou can follow these steps to analyze thread information.

1. Identify which connection type owns the thread in question.

2. Review the thread information for the threads by connection type.

3. Analyze additional detailed information for the thread you selected.

4. Review the SQL information for the thread you selected.

After you have analyzed this information, you can take the appropriate actions to correct any conditions that do not meet your site's performance standards.

Page 77: OMEGAMON II for DB2 Tuning Guide, Version 540 - IBMpublib.boulder.ibm.com/tividd/td/ITOMEGAIIDB2/G251... · 2 OMEGAMON II for DB2 Tuning Guide, Version 540 Registered trademarks and

Analyzing Thread Information 77

Section A: Identify Threads by Connection Type

Section A: Identify Threads by Connection Type

To begin resolving thread problems you can identify the DB2 address space that owns the thread in question. Use the Summary of DB2 Activity panel to access this information.

Summary of DB2 Activity panelAs the primary panel for general monitoring of DB2, the Summary of DB2 Activity panel will show any values that fall outside your performance standards. These values will be highlighted. You must then determine which connection type owns the problem.

FIGURE 21. Summary of DB2 Activity Panel

The bottom half of this panel displays one line for each connection type or subsystem that can communicate with DB2. For IMS connections, the number of connections includes the IMS control region and IMS batch jobs.

OMEGAMON II displays an additional line called All Connections to provide totals or averages for all of the connection information. This line also provides access to information about system threads.

Note: The number of threads is the number of active threads.

Identify connection type with a problemLook for values that suggest a problem in one of the connection types (for example, an unusually high CPU percentage). To review the information about that connection type, continue with the next section, “Section B: Review Thread Information by Connection Type” on page 78.

____________ ZSUMM VTM O2 V540./C $DB2 mm/dd/yy 08:30:12> Help PF1 Back PF3 Zoom PF11==============================================================================> SUMMARY OF DB2 ACTIVITY DSYS+ SSAS+DBAS+IRLM+DIST CPU = 5.0% Thread Commit Rate = 7.6/sec+ Create Thread Rate = 5.0/sec Thread Signon Rate = 6.2/sec+ Synch Read I/O Rate = 102.0/sec Prefetch Req Rate = 14.3/sec+ Update Request Rate = 19.9/sec Write I/O Rate = 12.2/sec+ Getpages/Read I/O = 10.21 Pages/Write I/O = 12.20+ Current Lock Suspensions = 5 Locking Timeouts = 21+ Locking Deadlocks = 29 Locking Escalations = 3++ Connection Type Connections Threads CPU Getpage Rate Elapsed Time+ ------------------ ------------ ------- ----- ------------ ------------+ IMS 13 10 11.5% 3.1/sec 00:00:01.2+ CICS 2 2 2.3% 2.1/sec 00:00:02.5+ TSO Foreground 34 14 3.3% 1.3/sec 00:00:12.2+ Batch 4 3 1.3% 16.1/sec 00:00:02.5+ Utilities 1 1 4.8% 9.3/sec 00:04:12.3+ Distributed 0 0 0.0% 0.0/sec 00:00:00.0+ Stored Procedures 1 0 0.0% 0.0/sec 00:00:00.0+ All Connections 53 29 18.4% 22.6/sec 00:00:04.1==============================================================================

Page 78: OMEGAMON II for DB2 Tuning Guide, Version 540 - IBMpublib.boulder.ibm.com/tividd/td/ITOMEGAIIDB2/G251... · 2 OMEGAMON II for DB2 Tuning Guide, Version 540 Registered trademarks and

Section B: Review Thread Information by Connection Type

78 OMEGAMON II for DB2 Tuning Guide, Version 540

Section B: Review Thread Information by Connection Type

Now that you have identified a subsystem with one or more problem threads, you will want to look at more detailed information about those threads.

OMEGAMON II provides general and detailed information panels about the threads connected to each DB2 subsystem, and a panel that shows you the SQL call that generated the thread.

Where to find informationYou can use the information in the following sections to guide you through the appropriate panels to resolve your thread problem.

For information about

� CICS panels, see “CICS Thread Information” on page 80.� IMS panels, see “IMS Thread Information” on page 83.� TSO panels, see “TSO Thread Information” on page 84.� Batch panels, see “Batch Thread Information” on page 85.� Utility panels, see “Utility Thread Information” on page 86.� Distributed panels, see “Distributed Thread Information” on page 88.� Stored procedures panels, see “Stored Procedures Thread Information” on page 90.� All Connections panels, see “System Thread Information” on page 92.

Filtering and sorting dataOn some thread panels, you can sort or filter the data that is displayed. To sort the thread data:

� Position the cursor on any data line under a column heading, and press PF10.

Result: The data appears in descending sequence, sorted by the selected column heading.

To limit the amount of data that appears:

� Select J=FILTER, and press Enter.

Result: The Filter Option Panel appears. On this panel you can specify filtering options that will limit the scope of the display.

Near-term thread history informationOMEGAMON II's near-term thread history facility provides online information about completed threads. See “Information About Completed Threads” on page 108 for information about thread history displays.

Page 79: OMEGAMON II for DB2 Tuning Guide, Version 540 - IBMpublib.boulder.ibm.com/tividd/td/ITOMEGAIIDB2/G251... · 2 OMEGAMON II for DB2 Tuning Guide, Version 540 Registered trademarks and

Analyzing Thread Information 79

Section B: Review Thread Information by Connection Type

Historical reportsIn addition to display panels, OMEGAMON II provides summary reports to trace thread activity over a longer period of time. You can use these reports to obtain historical information about a particular thread or group of threads. For information about generating historical reports, see the OMEGAMON II for DB2 Historical Reporting Guide.

Page 80: OMEGAMON II for DB2 Tuning Guide, Version 540 - IBMpublib.boulder.ibm.com/tividd/td/ITOMEGAIIDB2/G251... · 2 OMEGAMON II for DB2 Tuning Guide, Version 540 Registered trademarks and

CICS Thread Information

80 OMEGAMON II for DB2 Tuning Guide, Version 540

CICS Thread Information

Where do I start?To investigate potential CICS thread problems, look at the CICS Thread Summary panel (fast path T.C). To display this panel from the DB2 Summary panel:

� Move the cursor to the CICS line under the Connection Type heading, and press PF11.

Result: The CICS Thread Summary panel appears.

CICS Thread Summary panelThe CICS Thread Summary panel provides an overview of DB2 thread activity originating from connected CICS subsystems. It provides information on a connection level about all CICS regions identified to DB2. It also presents information about individual CICS threads, such as thread elapsed time and buffer manager activity. Figure 22 on page 80 shows a typical CICS Thread Summary panel.

FIGURE 22. CICS Thread Summary Panel

The center portion of this panel, under the CICA command, displays a line for each CICS subsystem that has a connection to DB2.

The bottom portion of this panel, under the THDC command, displays a line for each CICS-DB2 thread.

____________ ZCICST VTM O2 V540./C $DB2 mm/dd/yy 08:30:12> Help PF1 Back PF3 Up PF7 Down PF8 Sort PF10 Zoom PF11 > THREAD ACTIVITY: Enter a selection letter on the top line. > A-ALL B-TSO *-CICS D-IMS E-BACKGROUND F-DIST ALLIED G-DIST DBAC> H-UTIL I-INACT J-FILTER K-FUNCTIONS L-STORED PROC M-TRIGGERS N-SYSPLEX===============================================================================> CICS THREAD SUMMARY CICA+ Total DB2 Pct. of Active Commit RO Commit+ Jobname CPU CPU THRDMAX Threads Rate/Sec Rate/Sec+ -------- ------ ----- ------- ------- -------- ---------+ CICSPROD 11.5% 4.0% 80.0% 14 14.1/sec 12.5/sec+ CICSTEST 0.4% 0.2% 30.0% 3 0.5/sec 0.5/sec THDC+ *+ Elapsed Planname Tran CPU Status GetPg Update Commit Jobname+ ----------- -------- ---- ----- ------------ ----- ------ ------ --------+ 00:53:59.05 PLAN0008 TRN8 0.0% IN-DB2 6432 6381 23 CICSTEST+ 00:12:37.16 PLAN0001 TRN1 4.5% IN-SQL CALL 1943 0 1 CICSPROD+ 00:01:37.72 PLAN0001 TRN1 11.3% IN-SQL CALL 232 1 189 CICSPROD+ 00:00:55.83 PLAN0002 TRN2 0.0% IN-DB2 93 451 7 CICSTEST+ 00:00:38.94 PLAN0001 TRN1 3.4% IN-TERM-THRD 45 17 3 CICSPROD+ 00:00:00.00 PLAN0001 TRN1 0.0% WAIT-CTHREAD 0 0 1 CICSPROD===============================================================================

Page 81: OMEGAMON II for DB2 Tuning Guide, Version 540 - IBMpublib.boulder.ibm.com/tividd/td/ITOMEGAIIDB2/G251... · 2 OMEGAMON II for DB2 Tuning Guide, Version 540 Registered trademarks and

Analyzing Thread Information 81

CICS Thread Information

To get more detailed information about a thread:

� Move the cursor to one of the thread lines, and press PF11.

Result: OMEGAMON II displays the Thread Detail panel, which provides more information about the thread you selected. See “Section C: Analyze Detailed Information” on page 94.

Analyzing CICS subsystemsAfter examining the data on the CICS Thread Summary panel, you may want to know more about one of the CICS subsystems that is connected to DB2.

To obtain more information:

� Move the cursor to the jobname of the selected subsystem, and press PF11.

Result: The CICS RCT Summary panel appears. This panel provides information about the CICS-DB2 connection.

FIGURE 23. CICS RCT Summary Panel

The CICS RCT Summary panel displays information about the CICS-DB2 connection, as defined in the CICS resource control table (RCT). This information includes the RCT name and the maximum number of threads that can exist between this CICS subsystem and DB2. One line appears for the command, pool, and each entry definition in the RCT.

________________ ZCICSTR VTM O2 V540./C $DB2 mm/dd/yy 12:43:53 2> Help PF1 Back PF3 Up PF7 Down PF8 Zoom PF11>=============================================================================> CICS RCT SUMMARY RCTS+: CICS=TDO2S04 (REQUIRED)++ DSNCRCT Name (SUFFIX)= DSNCRCTL Statistics Dest (SHDDEST)= CSSL+ Error MSG Dest 1 (ERRDEST)= CSMT SNAP SYSOUT Class (SNAP)= A+ Error MSG Dest 2 = **** CICS Auth Name (SIGNID)= O2VTAMG5+ Error MSG Dest 3 = **** THRD Purge Time Interval = 30+ Traceid 1 (TRACEID)= 192 Maximum Threads (THRDMAX)= 120+ Traceid 2 = 193 Active MVS Subtasks = 26+ Traceid 3 = 194+: TXID=____ PLANNAME=________++ TXID Calls Waits Aborts THRDM THRDA THRDS TCB Time+ ---- -------- -------- -------- ------- ------- ------- --------+ DSNC 0 0 0 3 3 0 .17+ POOL 0 0 0 50 50 0 .00+ XD01 17 0 0 5 2 0 .44+ XD02 0 0 0 5 2 0 .03+ XD03 0 0 0 5 2 0 .02+ SUKE 0 0 0 30 0 0 .00+ SUK2 0 0 0 30 0 0 .00+ DEW1 0 0 0 40 30 0 .57============================================================================

Page 82: OMEGAMON II for DB2 Tuning Guide, Version 540 - IBMpublib.boulder.ibm.com/tividd/td/ITOMEGAIIDB2/G251... · 2 OMEGAMON II for DB2 Tuning Guide, Version 540 Registered trademarks and

CICS Thread Information

82 OMEGAMON II for DB2 Tuning Guide, Version 540

For more information about a specific RCT entry:

� Place the cursor on an entry line, and press PF11.

Result: The CICS RCT Detail panel appears. This panel provides more information about the RCT parameters in use for that specific entry.

Running historical reportsTo obtain historical information about a CICS thread:

1. Change your reporter options to the date and time period you want. Then enter the CICS connection ID in the Select when CONNID= field. You can limit the scope of the report by specifying a DB2 plan name and authorization identifier.

2. Run the Accounting Detail report.If you are not sure of the connection ID of the CICS thread, you can run the Accounting Summary report, grouping the report by CONNID. It will identify all active threads for the specified time period, allowing you to isolate a particular CICS connection ID.

Page 83: OMEGAMON II for DB2 Tuning Guide, Version 540 - IBMpublib.boulder.ibm.com/tividd/td/ITOMEGAIIDB2/G251... · 2 OMEGAMON II for DB2 Tuning Guide, Version 540 Registered trademarks and

Analyzing Thread Information 83

IMS Thread Information

IMS Thread Information

Where do I start?To investigate potential IMS thread problems, look at the IMS Thread Summary panel. To display this panel from the DB2 Summary panel:� Move the cursor to the IMS line under the Connection Type heading, and press PF11.

Result: The IMS Thread Summary panel appears.

IMS Thread Summary panelThe IMS Thread Summary panel provides an overview of DB2 thread activity originating from connected IMS subsystems including IMS DL/I batch jobs and BMPs. It provides information on a connection level about all IMS subsystems identified to DB2. It also presents information about individual IMS threads (such as thread elapsed time, DB2 and MVS CPU utilization, and DB2 activity).

The center of the panel, under the IMSA command, displays a line for each IMS subsystem that has a connection to DB2. For more information about a subsystem, move the cursor to one of these lines and press PF11.

The bottom portion of this panel, under the THDI command, displays a line for each IMS-DB2 thread. For more detailed thread information:� Move the cursor to one of these lines, and press PF11.

Result: The Thread Detail panel appears. This panel provides more information about the thread you selected.

IMS Connection DetailAfter examining the data on the IMS Thread Summary panel, you may want to know more about one of the IMS subsystems that are connected to DB2. To do this, move the cursor to the IMS ID of the selected subsystem, and press PF11. The IMS Connection Detail Information panel, which contains more information about the specified subsystem, is displayed.

The IMS Connection Detail Information panel displays one line of data for each of the regions (within the selected subsystem) that have active connections with DB2.

Running historical reportsTo obtain historical information relating to a particular IMS thread:

1. Change your reporter options to the date and time period you want. Then enter the IMS connection ID in the Select when CONNID= field.

2. Run the Accounting Detail report.If you are not sure of the connection ID of the IMS thread, you can run the Accounting Summary report, grouping the report by CONNID. It will identify all active threads for the specified time allowing you to isolate a particular IMS connection ID.

Page 84: OMEGAMON II for DB2 Tuning Guide, Version 540 - IBMpublib.boulder.ibm.com/tividd/td/ITOMEGAIIDB2/G251... · 2 OMEGAMON II for DB2 Tuning Guide, Version 540 Registered trademarks and

TSO Thread Information

84 OMEGAMON II for DB2 Tuning Guide, Version 540

TSO Thread Information

Where do I start?To investigate potential TSO thread problems, look at the TSO Thread Summary panel. To display this panel from the DB2 Summary Panel:

� Move the cursor to the TSO from the TSO Thread Summary panel Foreground line under the Connection Type heading, and press PF11.

Result: The TSO Thread Summary panel appears.

TSO Thread Summary panelThe TSO Thread Summary panel provides an overview of the activity of all foreground TSO threads connected to DB2. Each line shows information about an individual thread, such as thread elapsed time, DB2 and MVS resource consumption, and DB2 activity.

If you need more detailed thread information after analyzing the data on this panel, move the cursor to one of the thread lines, and press PF11. The Thread Detail panel, which provides more information about the thread you selected, is displayed. See “Section C: Analyze Detailed Information” on page 94.

Running historical reportsTo obtain historical information relating to a particular TSO thread:

1. Change your reporter options to the date and time period you want, then enter the TSO connection ID in the Select when CONNID= field.

2. Run the Accounting Detail report.If you are not sure of the connection ID of the TSO thread, you can run the Accounting Summary report, grouping the report by CONNID. It will identify all active threads for the specified time period, allowing you to isolate a particular TSO connection ID.

Page 85: OMEGAMON II for DB2 Tuning Guide, Version 540 - IBMpublib.boulder.ibm.com/tividd/td/ITOMEGAIIDB2/G251... · 2 OMEGAMON II for DB2 Tuning Guide, Version 540 Registered trademarks and

Analyzing Thread Information 85

Batch Thread Information

Batch Thread Information

Where do I start?To investigate potential background thread problems, look at the Background Thread Summary panel. To display this panel from the DB2 Summary panel:

� Move the cursor to the Batch line under the Connection Type heading, and press PF11.

Result: The Background Thread Summary panel appears.

Background Thread Summary panelThe Background Thread Summary panel provides an overview of the activity of all background threads connected to DB2. Each line shows information about an individual thread, such as thread elapsed time, DB2 and MVS resource consumption, and DB2 activity.

If you need more detailed thread information after analyzing the data on this panel, move the cursor to one of the thread lines, and press PF11. The Thread Detail panel, which provides more information about the thread you selected is displayed. See “Section C: Analyze Detailed Information” on page 94.

Running historical reportsTo obtain historical information relating to a particular batch thread:

1. Change your reporter options to the date and time period you want, then enter the batch connection ID in the Select when CONNID= field.

2. Run the Accounting Detail report.

If you are not sure of the connection ID of the batch thread, you can run the Accounting Summary report, grouping the report by CONNID. It will identify all active threads for the specified time period, allowing you to isolate a particular batch connection ID.

Page 86: OMEGAMON II for DB2 Tuning Guide, Version 540 - IBMpublib.boulder.ibm.com/tividd/td/ITOMEGAIIDB2/G251... · 2 OMEGAMON II for DB2 Tuning Guide, Version 540 Registered trademarks and

Utility Thread Information

86 OMEGAMON II for DB2 Tuning Guide, Version 540

Utility Thread Information

Where do I start?To investigate potential utility thread problems, look at the Utility Summary panel. To display this panel from the DB2 Summary panel:

� Move the cursor to the Utilities line under the Connection Type heading, and press PF11.

Result: The Utility Summary panel appears.

Utility Summary panelThe Utility Summary panel displays all active utilities and utilities that have been started but have not yet completed running due to abnormal termination. Each row provides information about an individual utility, such as thread elapsed time, utility phase, and pages/records count. Figure 24 on page 86 shows a typical Utility Summary panel.

FIGURE 24. Utility Summary Panel

If you need more detailed information about a utility:

� Move the cursor to one of the thread lines, and press PF11.

Result: The Utility Detail panel appears. This panel provides more information about the thread you selected. See “Utility Detail” on page 98.

Running historical reportsTo obtain historical information relating to a particular utility thread:

� Change your reporter options to the date and time period you want, then enter the utility connection ID in the Select when CONNID= field.

� Run the Accounting Detail report.

____________ ZUTIA VTM O2 V540./C $DB2 mm/dd/yy 08:30:17> Help PF1 Back PF3 Up PF7 Down PF8 Zoom PF11>> THREAD ACTIVITY: Enter a selection letter on the top line. > A-ALL B-TSO C-CICS D-IMS E-BACKGROUND F-DIST ALLIED G-DISTDBAC>*-UTIL I-INACT J-FILTER K-FUNCTIONS L-STORED PROC M-TRIGGERS N-SYSPLEX==============================================================================> UTILITY SUMMARY UTIL+ Elapsed Utility UtilID Phase Count Status CPU+ ---------- -------- ---------------- -------- -------- ------------ -----+ 00:25:00.5 RECOVERY DIRK UTILINIT 0 IN-DB2 00.2%+ 00:30:12.1 LOAD PARTLOAD RELOAD 4567 IN-DB2 01.0%+ N/A COPY TSDB07A.TSDB07AA UTILINIT 0 UTIL-STOP N/A==============================================================================

Page 87: OMEGAMON II for DB2 Tuning Guide, Version 540 - IBMpublib.boulder.ibm.com/tividd/td/ITOMEGAIIDB2/G251... · 2 OMEGAMON II for DB2 Tuning Guide, Version 540 Registered trademarks and

Analyzing Thread Information 87

Utility Thread Information

If you are not sure of the connection ID of the utility thread, you can run the Accounting Summary report, grouping the report by CONNID. It will identify all active threads for the time period desired, allowing you to isolate a particular utility connection ID.

Inactive Threads panelThe Inactive Threads panel displays information about threads placed in an inactive state after they have performed a commit, or when the maximum number of remote threads has been reached.

To reach the Inactive Threads panel:

� Select I from the All Threads Connected to DB2 panel (or fast path T.I), and press Enter.

Result: The Inactive Threads panel appears.

FIGURE 25. Inactive Threads Panel

On this panel, a thread's status will be QUEUED when the maximum number of active database access threads (MAXDBAT) has been reached. When MAXDBAT has been reached, any additional DBATs will be queued when they try to start. If a thread is queued, look at the MAXDBAT value in DSNZPARM. Change the MAXDBAT parameter if it is too low for your environment.

________________ ZINACT VTM O2 V540/C $DB2 mm/dd/yy 15:16:45 2> Help PF1 Back PF3 Up PF7 Down PF8 Sort PF10> T.A> THREAD ACTIVITY: Enter a selection letter on the top line. > A-ALL B-TSO C-CICS D-IMS E-BACKGROUND F-DIST ALLIED G-DIST DBAC> H-UTIL *-INACT J-FILTER K-FUNCTIONS L-STORED PROC M-TRIGGERS N-SYSPLEX=============================================================================> INACTIVE THREADS THDW+ Location Authid Corrid LUWID Status+ ---------------- -------- ------------ ----------------------------- ------+10.11.32.148 DBAD12 DB2BP.EXE C6D23392.AF13.02164155038 INUSER+Plan Name: DISTSERV Netid” Unit of Recov:000000000000+Connection Name: SERVER Thread Token: 703 Source type: DIST+Connection Type Application-directed access=============================================================================

Page 88: OMEGAMON II for DB2 Tuning Guide, Version 540 - IBMpublib.boulder.ibm.com/tividd/td/ITOMEGAIIDB2/G251... · 2 OMEGAMON II for DB2 Tuning Guide, Version 540 Registered trademarks and

Distributed Thread Information

88 OMEGAMON II for DB2 Tuning Guide, Version 540

Distributed Thread Information

Where do I start?To investigate potential distributed thread problems, look at the Distributed Database Access Thread Summary panel. To display this panel from the DB2 Summary panel:

� Move the cursor to the Distributed line under Connection Type, and press PF11.

Result: The Distributed Database Access Thread Summary panel appears.

Types of distributed threadsThere are two types of distributed threads: database access threads (DBATs) and distributed allied threads (DISTs).

The statistics reported on the Distributed line of the DB2 Summary panel reflect the activity of database access threads only. From the Distributed Database Access Thread Summary panel (Figure 26 on page 88), you can navigate to the Distributed Allied Thread Summary panel (or to any other thread summary panel) by selecting the option letter from the horizontal menu.

Distributed Database Access Thread Summary panelThis panel provides an overview of the activity of all the DBATs connected to the local DB2. Each line provides information about an individual thread, such as the number of getpage requests and the amount of SQL activity.

FIGURE 26. Distributed Database Access Thread Summary Panel

DBAT A thread created by a DB2 subsystem to service SQL requests from another DB2 subsystem.

DIST A thread created by a DB2 subsystem to issue SQL requests to another DB2 subsystem.

________________ ZDBACT VTM O2 V540/C $DB2 mm/dd/yy 17:35:16 2> Help PF1 Back PF3 Up PF7 Down PF8 Sort PF10 Zoom PF11> T.G> THREAD ACTIVITY: Enter a selection letter on the top line. > A-ALL B-TSO C-CICS D-IMS E-BACKGROUND F-DIST ALLIED G-DIST DBAC>H-UTIL I-INACT J-FILTER K-FUNCTIONS L-STORED PROC M-TRIGGERS N-SYSPLEX=============================================================================> DISTRIBUTED DATABASE ACCESS THREAD SUMMARYPTHDR+ Remote SQL Rows+ *+ Elapsed Package Authid CPU Status Luname Cv GetPg Recv Sent+ -------- -------- -------- ----- ------------ -------- -- ------ ----- ------+ 00:00:37 DSNESPRR TDO214 00.0% WAIT-REMREQ O2D23GB 1 53 10 13+ 00:00:23 DSNESPRR TDO214A 00.3% IN-SQL-CALL O2D23GA 1 65 4 34=============================================================================

Page 89: OMEGAMON II for DB2 Tuning Guide, Version 540 - IBMpublib.boulder.ibm.com/tividd/td/ITOMEGAIIDB2/G251... · 2 OMEGAMON II for DB2 Tuning Guide, Version 540 Registered trademarks and

Analyzing Thread Information 89

Distributed Thread Information

If you need more detailed thread information after analyzing the data on this panel, move the cursor to one of the thread lines, and press PF11. The Distributed Thread Detail panel is displayed. For more about this panel and how to monitor and tune the distributed component of DB2, see “Analyzing Distributed Data Performance” on page 169.

Distributed Allied Thread Summary panelThis panel provides an overview of the activity of all DISTs connected to the local DB2. Each line provides information about an individual thread, such as the number of conversation requests and the amount of SQL activity.

FIGURE 27. Distributed Allied Thread Summary Panel

If you need more detailed thread information after analyzing the data on this panel, move the cursor to one of the thread lines, and press PF11. The Distributed Thread Detail panel is displayed. For more information about this panel and how to monitor and tune the distributed component of DB2, see “Analyzing Distributed Data Performance” on page 169.

________________ ZDALLT VTM O2 V540./C $DB2 mm/dd/yy 21:49:52 2> Help PF1 Back PF3 Up PF7 Down PF8 Sort PF10 Zoom PF11 > THREAD ACTIVITY: Enter a selection letter on the top line. > A-ALL B-TSO C-CICS D-IMS E-BACKGROUND *-DIST ALLIED G-DIST DBAC> H-UTIL I-INACT J-FILTER K-FUNCTIONS L-STORED PROC M-TRIGGERS N-SYSPLEX==============================================================================> DISTRIBUTED ALLIED THREAD SUMMARY THDD+ Remote SQL Dist Local Dist Remote Remote+ *+Planname Status LUname CV Sent Elapsed Elapsed CPU+-------- ------------ -------- -- ------ ------------ ------------ --------+XD03 NOT IN-DB2 O2D22GC 5 3 00:00:05.268 00:00:04.198 .051+ O2D22GB 5 3 00:00:05.120 00:00:05.832 .110+DSNESPRR IN-SQL-CALL O2D22GB 1 1 00:00:11.177 00:00:03.586 1.861==============================================================================

Page 90: OMEGAMON II for DB2 Tuning Guide, Version 540 - IBMpublib.boulder.ibm.com/tividd/td/ITOMEGAIIDB2/G251... · 2 OMEGAMON II for DB2 Tuning Guide, Version 540 Registered trademarks and

Stored Procedures Thread Information

90 OMEGAMON II for DB2 Tuning Guide, Version 540

Stored Procedures Thread Information

Where do I start?To investigate potential Stored Procedures thread problems, look at the Stored Procedures Thread Summary panel (fast path T.L). To display this panel from the DB2 Summary panel:

� Move the cursor to the Stored Procedures line under the Connection Type heading, and press PF11.

Result: The Stored Procedures Thread Summary panel appears.

Stored Procedures Thread Summary panelThe Stored Procedures Thread Summary panel provides an overview of DB2 thread activity originating from connected stored procedures. It provides information on a connection level about all stored procedures identified to DB2. It also presents information about individual stored procedures threads, such as job name, address space identifier, and percent of CPU usage. Figure 28 shows a typical Stored Procedures Thread Summary panel.

FIGURE 28. Stored Procedures Thread Summary Panel

The center portion of this panel, under the WLMA command, displays a line for each stored procedure address space that is connect to DB2.

The bottom portion of this panel, under the THDZ command, displays a line for each active stored procedure thread.

____________ ZSTPT VTM O2 V540./C D61D 06/29/01 08:30:12> Help PF1 Back PF3 Up PF7 Down PF8 Sort PF10 Zoom PF11 > THREAD ACTIVITY: Enter a selection letter on the top line. > A-ALL B-TSO *-CICS D-IMS E-BACKGROUND F-DIST ALLIED G-DIST DBAC> H-UTIL I-INACT J-FILTER K-FUNCTIONS L-STORED PROC M-TRIGGERS N-SYSPLEX=================================================================================> STORED PROCEDURES THREAD SUMMARYWLMA+ + Jobname ASID CPU% Connection Threads + -------- ------ ----- ----------- ------- + D61DSPAS 0092 1.0% 1 0 THDZ+ *+ Elapsed Planname Tran CPU Status GetPg Update Commit Jobname+ ----------- -------- ---- ----- ------------ ----- ------ ------ --------+ 00:53:59.05 PLAN0008 TRN8 0.0% IN-DB2 6432 6381 23 CICSTEST+ 00:12:37.16 PLAN0001 TRN1 4.5% IN-SQL CALL 1943 0 1 CICSPROD+ 00:01:37.72 PLAN0001 TRN1 11.3% IN-SQL CALL 232 1 189 CICSPROD+ 00:00:55.83 PLAN0002 TRN2 0.0% IN-DB2 93 451 7 CICSTEST+ 00:00:38.94 PLAN0001 TRN1 3.4% IN-TERM-THRD 45 17 3 CICSPROD+ 00:00:00.00 PLAN0001 TRN1 0.0% WAIT-CTHREAD 0 0 1 CICSPROD================================================================================

Page 91: OMEGAMON II for DB2 Tuning Guide, Version 540 - IBMpublib.boulder.ibm.com/tividd/td/ITOMEGAIIDB2/G251... · 2 OMEGAMON II for DB2 Tuning Guide, Version 540 Registered trademarks and

Analyzing Thread Information 91

Stored Procedures Thread Information

To get more detailed information about a thread:

� Move the cursor to one of the thread lines, and press PF11.

Result: OMEGAMON II displays the Thread Detail panel, which provides more information about the thread you selected. See “Section C: Analyze Detailed Information” on page 94.

Analyzing stored procedures After examining the data on the Stored Procedures Thread Summary panel, you may want to know more about one of the stored procedure that is connected to DB2.

Page 92: OMEGAMON II for DB2 Tuning Guide, Version 540 - IBMpublib.boulder.ibm.com/tividd/td/ITOMEGAIIDB2/G251... · 2 OMEGAMON II for DB2 Tuning Guide, Version 540 Registered trademarks and

System Thread Information

92 OMEGAMON II for DB2 Tuning Guide, Version 540

System Thread Information

System threads are initiated by several types of DB2 events, including display database, archive log read, automatic rebind, and dataset extend. They are sometimes created to perform work for an application thread, and sometimes to perform some type of asynchronous, nonapplication-related work.

Plans used by system threadsThe following list describes some common plans used by system threads:

Where do I start?Whenever a system thread owns a lock or is waiting for a lock, information about that thread will be displayed on the All Threads Connected to DB2 panel (Figure 29 on page 93). System threads always appear at the top of the panel, and their elapsed time is always 00:00:00.00.

To display the All Threads panel from the DB2 Summary panel:

� Move the cursor to the All Connections line under the Connection Type heading, and press PF11.

Result: The ALL Threads panel appears.

All Threads Connected to DB2 panelIf you need more detailed thread information after analyzing the data on this panel, move the cursor to one of the thread lines, and press PF11. The Thread Detail panel, which provides more information about the thread you selected is displayed. See “Section C: Analyze Detailed Information” on page 94.

ACT The internal authorization plan used while the system determines whether a user has the authority to access a specified plan. Although the lock issued by this plan is of short duration, it occurs frequently since it gets issued every time a thread is created.

BCT The internal plan used while the system performs service tasks; for example, while it writes to SYSLGRNG or performs an OPEN or a CLOSE of a dataset. Normally, the lock issued by this plan is of short duration.

BINDCT The internal plan used for all BINDS. It consumes the largest amount of the time needed to complete a BIND. This plan is used to populate the DB2 catalog tables SYSPLAN and SYSPLANDEP with information from the BIND process.

Page 93: OMEGAMON II for DB2 Tuning Guide, Version 540 - IBMpublib.boulder.ibm.com/tividd/td/ITOMEGAIIDB2/G251... · 2 OMEGAMON II for DB2 Tuning Guide, Version 540 Registered trademarks and

Analyzing Thread Information 93

System Thread Information

FIGURE 29. All Threads Connected to DB2 Panel

Note: The panels that display locking information also provide information about system threads, if any are involved in lock conflicts. See “Resolving Locking Conflicts” on page 127 for more information.

____________ ZALLT VTM O2 V540./C $DB2 mm/dd/yy 08:30:12> Help PF1 Back PF3 Up PF7 Down PF8 Sort PF10 Zoom PF11> T.A> THREAD ACTIVITY: Enter a selection letter on the top line. > *-ALL B-TSO C-CICS D-IMS E-BACKGROUND F-DIST ALLIED G-DIST DBAC> H-UTI I-INACT J-FILTER K-FUNCTIONS L-STORED PROC M-TRIGGERS N-SYSPLEX=============================================================================> ALL THREADS CONNECTED TO DB2 THDA+ *+ Elapsed Planname CPU Status GetPg Update Commit Jobname+ ---------- -------- ----- ------------ ------ ------ ------ --------+ 02:47:12.2 DSNESPCS 00.0% SWAPPED-OUT 3702 0 0 TDO214+ 00:00:11.3 DSNUTIL 00.0% WAIT-SERVICE 5 0 0 TDO214RC+ 00:00:00.0 BCT 00.0% IN-DB2 0 0 0 D31ADBM1=============================================================================

Page 94: OMEGAMON II for DB2 Tuning Guide, Version 540 - IBMpublib.boulder.ibm.com/tividd/td/ITOMEGAIIDB2/G251... · 2 OMEGAMON II for DB2 Tuning Guide, Version 540 Registered trademarks and

Section C: Analyze Detailed Information

94 OMEGAMON II for DB2 Tuning Guide, Version 540

Section C: Analyze Detailed Information

Thread Detail panelAfter reviewing thread information for the connection type indicating a problem, you can look at the Thread Detail panel and its menu options for detailed information. Figure 30 on page 95 shows a typical Thread Detail panel.

Note: In the following figure, some fields are specific to DB2 Version 7.1 and above. These fields are:

– SavePoint Requests

– Release Savepoints

– Rollback Savepoints

– Global Child L-Locks

– Global Other L-Locks

– Global Pageset/Partition P-Locks

– Global Page P-Locks

– Global Other P-Locks

Page 95: OMEGAMON II for DB2 Tuning Guide, Version 540 - IBMpublib.boulder.ibm.com/tividd/td/ITOMEGAIIDB2/G251... · 2 OMEGAMON II for DB2 Tuning Guide, Version 540 Registered trademarks and

Analyzing Thread Information 95

Section C: Analyze Detailed Information

FIGURE 30. Thread Detail Panel

________________ ZTDTL VTM O2 V540./C D61D mm/dd/yy 16:42:43 2> Help PF1 Back PF3 > THREAD INFORMATION: Enter a selection letter on the top line. > *-THREAD DETAIL B-LOCK COUNTS C-LOCK WAITS D-LOCKS OWNED E-GLOBAL LOCKS> F-CURRENT SQL G-SQL COUNTS H-DISTRIBUTED I-BUFFER POOL J-GROUP BP> K-PACKAGES L-RES LIMIT M-PARALLEL TASKS N-UTILITY O-OBJECTS> P-CANCEL THREAD Q-DB2 CONSOLE R-DSN ACTIVITY S-APPL TRACE=============================================================================> THREAD DETAIL PLAN+ Thread: Plan=KO2520AP Connid=DB2CALL Corrid=D2DB026 Authid=D2DB026+ Attach: BATCH JOB Name=D2DB026 JOB asid= 218+ Package: Collection= act+ Thread Activity User Defined Functions--------------------------------------- -------------------------------------+ DB2 Status = NOT-IN-DB2 TCB Time (SQL) = 00.00.00.000+ MVS Status = WAIT-MISC Wait for TCB Time = 00.00.00.000+ Total Elapsed Time = 00:06:44.996 Elapsed Time = 00.00.00.000+ CPU Utilization = 00.0% Elapsed Time (SQL) = 00.00.00.000+ Total CPU Time = 00:00:08.936 SQL Events = 0+ Total Parallel Tasks = 0 + Current Parallel Tasks= 0++ Stored Procedures Triggers + ------------------------------------- -------------------------------------+ Total CPU = 00.00.00.000 TCB not in Enclave = 00.00.00.000+ Elapsed Time = 00.00.00.000 Elapsed not in Enclave = 00.00.00.000+ Elapsed Time (SQL) = 00.00.00.000 TCB prior to Enclave = 00.00.00.000+ + SavePoints+ -------------------------------------+ Savepoint Requests = 0+ Release Savepoints = 0+ Rollback Savepoints = 0++ In-DB2 Times Total Current+ ------------------------------ ------------ ------------+ Elapsed Time 00:00:18.735 00:00:18.026+ CPU Time 00:00:01.017 00:00:00.900+ Stored Procedure CPU Time 00:00:00.000 00:00:00.000++ Waits Count Total Current+ ------------------------------ ---------- ------------ ------------+ Synchronous I/O Wait 545 00:00:15.516 00:00:00.000+ Asynchronous Read I/O Wait 17 00:00:02.062 00:00:00.008+ Asynchronous Write I/O Wait 0 00:00:00.000 00:00:00.000+ Local Lock/Latch Wait 3 00:00:00.004 00:00:00.000+ Page Latch Wait 0 00:00:00.000 00:00:00.000+ Drain Lock Wait 0 00:00:00.000 00:00:00.000+ Drain of Claims Wait 0 00:00:00.000 00:00:00.000+ Global Lock Wait 0 00:00:00.000 00:00:00.000+ Inter-System Message Send Wait 0 00:00:00.000 00:00:00.000+ DB2 Service Task Wait 0 00:00:00.000 00:00:00.000+ Archive Log Mode(Quiesce) Wait 0 00:00:00.000 00:00:00.000+ Archive Read from Tape Wait 0 00:00:00.000 00:00:00.000+ Stored Procedure Schedule Wait 0 00:00:00.000 00:00:00.000+ Switch to Open/Close Wait 0 00:00:00.000 00:00:00.000+ Switch to SYSLGRNG Service Wait 0 00:00:00.000 00:00:00.000+ Switch to DMS Waits 0 00:00:00.000 00:00:00.000+ Other Service Waits 0 00:00:00.000 00:00:00.000+ Force at Commit Waits 0 00:00:00.000 00:00:00.000+ Global Child L-Locks 0 00.00.00.000 00.00.00.000+ Global Other L-Locks 0 00.00.00.000 00.00.00.000+ Global Pageset/Partition L-Locks 0 00.00.00.000 00.00.00.000+ Global Page P-Locks 0 00.00.00.000 00.00.00.000+ Global Other P-Locks 0 00.00.00.000 00.00.00.000==============================================================================

Page 96: OMEGAMON II for DB2 Tuning Guide, Version 540 - IBMpublib.boulder.ibm.com/tividd/td/ITOMEGAIIDB2/G251... · 2 OMEGAMON II for DB2 Tuning Guide, Version 540 Registered trademarks and

Section C: Analyze Detailed Information

96 OMEGAMON II for DB2 Tuning Guide, Version 540

Accessing SQL informationTo obtain SQL information:

� Select SQL counts or SQL Call Executing (options D or E).

Result: See the following table.

For more information, see “The SQL Call” on page 102.

Running historical reportsTo review similar types of thread SQL activity over a period of time, run any of the following historical reports:

� Accounting SQL Activity� Statistics SQL Activity� Accounting Time Summary

If... THEN...

you select SQL Counts (D) the Current SQL Counts panel appears. This panel provides information about the thread's SQL activity.

you select SQL Call Executing (E) the SQL Call Being Executed panel appears. This panel presents information about the call currently being executed by the thread.

Page 97: OMEGAMON II for DB2 Tuning Guide, Version 540 - IBMpublib.boulder.ibm.com/tividd/td/ITOMEGAIIDB2/G251... · 2 OMEGAMON II for DB2 Tuning Guide, Version 540 Registered trademarks and

Analyzing Thread Information 97

Specify Application Trace

Specify Application Trace

For further analysis of a thread problem you can initiate the Application Trace facility by entering option S on the command line of the Thread Detail panel. Figure 31 shows the Specify Application Trace panel.

FIGURE 31. Specify Application Trace panel

For more detailed information about application trace facility, refer to “Analyzing Application Performance with ATF” on page 133.

________________ ZATRQ2 VTM 02 V540./C D61D MM/DD/YY 14:35:46 2> Help PF1

> THREAD INFORMATION: Enter a selection letter on the top line.

> A-THREAD DETAIL B-LOCK COUNTS C-LOCK WAITS D-LOCKS OWNED E-GLOBAL LOCKS> F-CURRENT SQL G-SQL COUNTS H-DISTRIBUTED I-BUFFER POOL J-GROUP BP> K-PACKAGES L-RES LIMIT M-PARALLEL TASKS N-UTILITY O-OBJECTS> P-CANCEL THREAD Q-DB CONSOLE R-DSN ACTIVITY *-APPL TRACE = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = =

SPECIFY APPLICATION TRACE >ATRQ

+ Type DB2 Plan name to be traced. Also, provide additional optional + selection information to limit trace output. To save trace records + for later viewing you must specify a data set name for DSN + : DSN=_________________________________________________ Data set name : TIME=005 Number of mins to trace (001-060): PLANNAME=KD2500HP Plan name or ALL for all active threads : AUTHID=D2DB016 DB2 authorization identifier : TSOUSER=________ TSO USERID (TSO foreground app) : JOBNAME=________ Jobname (TSO batch app): CICSTRAN=____ CICS trans id : CICSCONN=________ CICS connection id : PSBNAME=________ IMS PSB name : IMSID=________ IMS ID of the IMS region : LOCKDATA=Y Collect DB2 lock trace recs? (Y/N) : SCANDATA=Y Collect DB2 scan trace recs? (Y/N) : SQLDATA=Y Collect DB2 sql trace recs? (Y/N) : THRDDATA=Y Collect DB2 thread trace recs? (Y/N) : CONNDATA=Y Collect DB2 connect trace recs? (Y/N) : SMF=N Write trace data to SMF? (Y/N) : GTF=N Wrote trace data tp GTF? (Y/N) : MEMSIZE=02 Collection workarea memory size (01-04 meg) = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = =

Page 98: OMEGAMON II for DB2 Tuning Guide, Version 540 - IBMpublib.boulder.ibm.com/tividd/td/ITOMEGAIIDB2/G251... · 2 OMEGAMON II for DB2 Tuning Guide, Version 540 Registered trademarks and

Utility Detail

98 OMEGAMON II for DB2 Tuning Guide, Version 540

Utility Detail

You can further analyze a thread problem using the Utility Detail Information panel and its menu options, as shown in Figure 32 on page 98.

The Utility Detail panel provides detailed information about the activity of an individual utility. This information includes the relative utility statement position, the contents of the currently executing utility statement, and data specific to a certain utility. This panel does not apply to utilities that have been started but have not yet completed running due to abnormal termination. See “Stopped Utility Information” on page 99 for information on stopped utilities.

FIGURE 32. Utility Detail Information Panel

Utility plan DSNUTIL is the internal plan used by the utility control program DSNUTILB, which executes as an MVS batch application program controlled by DB2.

Accessing lock informationSelect Lock/Claim Waits or Locks/Claims Owned to obtain information about locks.

The duration of locks held by utilities depends on two factors:

� the type of utility invoked� the parameters

It is usual to see a cursor stability read drain lock (CDRN) or a write drain lock (WDRN) among the locks held by a utility.

Running historical reportsTo review utility activity over a period of time, run any of the following historical reports:� Audit Utility Access� Accounting Time Summary

____________ ZUTID VTM O2 V540./C $DB2 mm/dd/yy 08:30:12> Help PF1 Back PF3 > THREAD INFORMATION: Enter a selection letter on the top line. .* input from FFS 9/18/94 - ks> A-THREAD DETAIL B-LOCK COUNTS C-LOCK WAITS D-LOCKS OWNED E-GLOBAL LOCKS> F-CURRENT SQL G-SQL COUNTS H-DISTRIBUTED I-BUFFER POOL J-GROUP BP> K-PACKAGES L-RES LIMIT M-PARALLEL TASKS *-UTILITY O-OBJECTS> P-CANCEL THREAD Q-DB2 CONSOLE R-DSN ACTIVITY S-APPL TRACE============================================================================> UTILITY DETAIL INFORMATION PLAN+ Thread: Plan=DSNUTIL Connid=UTILITY Corrid=TDO206AA Authid=TDO206+ Attach: BATCH JOB Name=TDO206AA JOB Asid= 25+ Package: SP61B Collection= utid+ Utility = COPY UtilID = COPYACCT UserID=TDO206+ Phase = COPY Count = 2456++ Share Level = exclusive control of tablespace H2DBASE.H2TSACCT++ Output dataset = TDO206.H2TSACCT.COPY1++ Current utility statement in SYSIN = 1+ Utility statement:+ COPY TABLESPACE H2DBASE.H2TSACCT DEVT SYSDA COPYDDN(SMWCOPY)============================================================================

Page 99: OMEGAMON II for DB2 Tuning Guide, Version 540 - IBMpublib.boulder.ibm.com/tividd/td/ITOMEGAIIDB2/G251... · 2 OMEGAMON II for DB2 Tuning Guide, Version 540 Registered trademarks and

Analyzing Thread Information 99

Stopped Utility Information

Stopped Utility Information

A stopped utility is one that has been started but has not yet completed running due to abnormal termination. You may have noticed a utility with a Stop status on the Utility Summary panel (Figure 24 on page 86). For more information about where it stopped, move the cursor to the line showing the stopped utility, and press PF11. Figure 33 on page 99 shows a typical Stopped Utility Information panel.

FIGURE 33. Stopped Utility Detail Information Panel

Running historical reportsTo review utility activity over a period of time, run any of the following historical reports:

� Audit Utility Access� Accounting Time Summary

____________ ZUTIS VTM O2 V540./C $DB2 mm/dd/yy 08:30:12> Help PF1 Back PF3 ============================================================================> STOPPED UTILITY INFORMATION UTST+ Plan = DSNUTIL Connid = UTILITY Corrid = TDO206AA Authid = TDO206+ Job Name = TDO206AA UserID = TDO206++ Utility = COPY UtilID = COPYACCT+ Phase = COPY Count = 2456++ Current utility statement in SYSIN = 1============================================================================

Page 100: OMEGAMON II for DB2 Tuning Guide, Version 540 - IBMpublib.boulder.ibm.com/tividd/td/ITOMEGAIIDB2/G251... · 2 OMEGAMON II for DB2 Tuning Guide, Version 540 Registered trademarks and

Section D: Reviewing SQL Information

100 OMEGAMON II for DB2 Tuning Guide, Version 540

Section D: Reviewing SQL Information

After reviewing the thread summary and other thread information, you may want to look at detail information about the SQL calls related to the thread. This includes information about the SQL call currently being executed, and the counts associated with the call.

Where do I start?To see the SQL counts related to the thread currently displayed on the Thread Detail panel:

� Select SQL Counts, option D, from the Thread Detail panel.

Result: The Current SQL Counts panel displays.

Current SQL Counts panelThe Current SQL Counts panel provides detailed information about the SQL activity of an individual thread. This information comes from the Relational Data Manager, and includes data definition language calls as well as data manipulation information. DB2 control counts are also supplied. Figure 34 on page 101 shows the Current SQL Counts panel.

This panel also displays counts related to RID pool usage and parallel I/O activity.

Page 101: OMEGAMON II for DB2 Tuning Guide, Version 540 - IBMpublib.boulder.ibm.com/tividd/td/ITOMEGAIIDB2/G251... · 2 OMEGAMON II for DB2 Tuning Guide, Version 540 Registered trademarks and

Analyzing Thread Information 101

Section D: Reviewing SQL Information

FIGURE 34. Current SQL Counts Panel

Running historical reportsTo review historical information about SQL activity, run any of the following historical reports:

� Statistics SQL Activity� Accounting SQL Activity� Statistics Subsystem Activity

____________ ZTSCNT VTM O2 V540./C $DB2 mm/dd/yy 08:30:17> Help PF1 Back PF3 > THREAD INFORMATION: Enter a selection letter on the top line. .* input from IFS 9/18/95 - ks> A-THREAD DETAIL B-LOCK COUNTS C-LOCK WAITS D-LOCKS OWNED E-GLOBAL LOCKS> F-CURRENT SQL *-SQL COUNTS H-DISTRIBUTED I-BUFFER POOL J-GROUP BP> K-PACKAGES L-RES LIMIT M-PARALLEL TASKS N-UTILITY O-OBJECTS> P-CANCEL THREAD Q-DB2 CONSOLE R-DSN ACTIVITY S-APPL TRACE=============================================================================> CURRENT SQL COUNTS PLAN+ Thread: Plan=DACANDLE Connid=DB2CALL Corrid=TSGM14A Authid=TSGM14A+ Attach: TSO Userid=TSGM14A Region asid= 167+ Package: SP61C Collection= sqls+ Commit = 49 Abort = 0 Select = 0+ Open Cursor = 0 Close Cursor = 0 Fetch = 0+ Insert = 0 Delete = 0 Update = 0+ Describe = 0 Lock Table = 0 Prepare = 0+ Create/Drop = 0 Alter = 0 Grant/Revoke = 0+ Increm Bind = 0 Label/Comm On = 0 Set SQLID = 0+ Set Host Var = 0 Set Connection = 0 Set Degree = 0+ Connect Type 1 = 0 Connect Type 2 = 0 Release = 0+ Set Rules = 0 Call = 0++ RID Pool Used = 0 RID Pool Use Failed-No Storage = 0+ RID Pool Use Failed-Max Limit = 0++ Max Parallel Degree = 0 Parallel Groups Executed = 0+ Parallel Failed-Cursor = 0 Parallel Failed-No ESA Sort = 0+ Parallel Failed-Buffers = 0 Parallel Failed-No ESA Enclaves = 0+ Parallelism Disabled = Yes Parallel Degree Reduced-Buffers = 0+ Parallel Degree Executed = 0++ SQL Call Statements = 0 SQL Calls Timed Out = 0+ Stored Proc SQL Reqs = 0 SQL Calls Rejected = 0+ Stored Procedures Abended = 0=============================================================================

Page 102: OMEGAMON II for DB2 Tuning Guide, Version 540 - IBMpublib.boulder.ibm.com/tividd/td/ITOMEGAIIDB2/G251... · 2 OMEGAMON II for DB2 Tuning Guide, Version 540 Registered trademarks and

The SQL Call

102 OMEGAMON II for DB2 Tuning Guide, Version 540

The SQL Call

Where do I start?To see detailed information about the SQL call that is currently being executed:

� Select SQL Call, option E, from the Thread Detail panel.

Result: The SQL Call Being Executed panel appears.

SQL Call Being Executed panelThe SQL Call Being Executed panel (shown in Figure 35 on page 102) displays the SQL call associated with the active thread. The information on this panel varies, depending on whether the SQL call is active or not.

� If the call is active, the panel includes the actual text of the SQL call.� If the call is not active, the SQL call information appears without the call text.

FIGURE 35. SQL Call Being Executed Panel

SQL queryIt is important to phrase each SQL query as efficiently as possible. Transactions that seem to be processing at a less than optimum rate may be using inefficient SQL calls. For more recommendations about the use of SQL, see “Analyzing Query Performance” on page 215.

____________ ZSQL VTM O2 V540./C $DB2 mm/dd/yy 08:30:17> Help PF1 Back PF3 > THREAD INFORMATION: Enter a selection letter on the top line. > A-THREAD DETAIL B-LOCK COUNTS C-LOCK WAITS D-LOCKS OWNED E-GLOBAL LOCKS> F-CURRENT SQL *-SQL COUNTS H-DISTRIBUTED I-BUFFER POOL J-GROUP BP> K-PACKAGES L-RES LIMIT M-PARALLEL TASKS N-UTILITY O-OBJECTS> P-CANCEL THREAD Q-DB2 CONSOLE R-DSN ACTIVITY S-APPL TRACE=============================================================================> SQL CALL BEING EXECUTED PLAN+ Thread: Plan=DSNESPRR Connid=TSO Corrid=TDO209B Authid=TDO209B+ Attach: TSO JOB Name=TDO209B Region asid= 225+ Package: SP61D Collection= call++ Thread Status = IN-SQL-CALL SQL Request Type = DYNAMIC+ Total SQL Reqs = 2 SQL Call Type = EXECUTE+ SQL DBRM Name = DSNESM68 SQL Statement Number = 00153+ Collection ID = DSNESPRR++ SELECT *+ FROM SYSIBM.SYSTABLES+ WHERE NAME LIKE 'ACCT%'+=============================================================================

Page 103: OMEGAMON II for DB2 Tuning Guide, Version 540 - IBMpublib.boulder.ibm.com/tividd/td/ITOMEGAIIDB2/G251... · 2 OMEGAMON II for DB2 Tuning Guide, Version 540 Registered trademarks and

Analyzing Thread Information 103

Section E: Other Methods for Analyzing Thread Detail

Section E: Other Methods for Analyzing Thread Detail

Creating a Multipurpose Thread Detail PanelTo follow DB2's fast-paced thread activity, you may want to create a single screen space that includes all the thread detail minor commands (such as act and sqls). This panel will provide a complete “snapshot” of the detail. You can then use the PF7 and PF8 keys to scroll through all the data and analyze the output.

Procedure

Use the following procedure to create a multipurpose thread detail panel.

Note: Before implementing this procedure, be sure that the O2CI started task has update authorization for the rhilev.RKO2PCSV dataset. Otherwise, you will get a security abend.

1. On the INFO-line of the Thread Detail panel, type /DEFON and press Enter.

2. Press PF7.

3. Space over (delete) the > sign in front of the each of the dot commands (.LOGPOP and .LOC) that appear below the INFO-line.

4. Move the cursor below the panel divider under the ACT command. Type each of the minor commands on individual lines, separated by the panel-divider notation, as shown below. (PLAN and act already appear.)

loct

T======

wait

T======

own

T======

gloc

T======

call

T======

sqls

T======

rsum

T======

buf

T======

gbuf

Page 104: OMEGAMON II for DB2 Tuning Guide, Version 540 - IBMpublib.boulder.ibm.com/tividd/td/ITOMEGAIIDB2/G251... · 2 OMEGAMON II for DB2 Tuning Guide, Version 540 Registered trademarks and

Section E: Other Methods for Analyzing Thread Detail

104 OMEGAMON II for DB2 Tuning Guide, Version 540

T======

pkg

T======

rlms

T======

task

T======

utid

T======

5. Perform one of the following operations to save the new panel.� To replace the existing screen space (ZTDTL), place the cursor on the INFO-line, type

/REP, and press Enter. Then, whenever you zoom on a thread, or select option A (Thread Detail) from the horizontal menu shown in Figure 30 on page 95, the new panel will appear.

� If you do not want to change the thread navigation path, you can create a new screen space with the thread detail commands by typing /SAVE xxxx and pressing Enter. (The notation xxxx represents the name you assign to the new screen space.)

With this method ZTDTL is not affected; however, you cannot access your new panel through the menu system. You must invoke the new panel by typing its name directly on the INFO-line, or including it in a menu system that you design.

Important

If you intend to replace the existing screen space (see step 5), do not modify any portion of the original Thread Detail panel. Any commands that you add must be entered after the PLAN and act output.

Page 105: OMEGAMON II for DB2 Tuning Guide, Version 540 - IBMpublib.boulder.ibm.com/tividd/td/ITOMEGAIIDB2/G251... · 2 OMEGAMON II for DB2 Tuning Guide, Version 540 Registered trademarks and

Analyzing Thread Information 105

Analyzing Thread Information Using Historical Reports

Analyzing Thread Information Using Historical Reports

For this example, assume that while viewing the Thread Detail panel shown in Figure 30 on page 95, you notice that the number of synchronous reads looks high.

Since you use only BP0 at your site, you suspect that the buffer pool space may not be adequate for the number of applications you have been running, and that threads may be issuing multiple synchronous read I/O requests to read the same data after it has been moved out of the buffer pool.

Buffer Manager Information panelTo understand the current activity in the buffer pool, you decide to navigate to the Buffer Manager Information panel, as shown in Figure 36 .

FIGURE 36. Buffer Manager Information Panel

Buffer Pool Detail panelTo see details for BP0:

� Place the cursor on BP0, and press PF11.

Result: The Buffer Pool Detail panel appears.

________________ ZBMGR VTM O2 V540./C $DB2 mm/dd/yy 16:34:26 2> Help PF1 Back PF3 Up PF7 Down PF8 Zoom PF11> R.A=============================================================================> BUFFER MANAGER INFORMATION BMGR+ Current Number Open Datasets = 52+ High Water Mark Open Datasets = 60+ Maximum Number Open Datasets Allowed = 60+ Open Dataset Count In Active Pools = 94++ Pool VP HP Pages Pages Getp Read Prefetch Write+ ID Size Size Alloc In Use Rate I/O Rate Req Rate I/O Rate+ ------ ------ ------- ------ ------ -------- -------- -------- --------+ BP0 10000 0 10000 5095 .63 .00 .00 .03+ BP32K 10 10 0 0 .00 .00 .00 .00=============================================================================

Page 106: OMEGAMON II for DB2 Tuning Guide, Version 540 - IBMpublib.boulder.ibm.com/tividd/td/ITOMEGAIIDB2/G251... · 2 OMEGAMON II for DB2 Tuning Guide, Version 540 Registered trademarks and

Analyzing Thread Information Using Historical Reports

106 OMEGAMON II for DB2 Tuning Guide, Version 540

FIGURE 37. (Part 1 of 2) Buffer Pool Detail Panel

________________ ZBP VTM O2 V540./C D412 mm/dd/yy 16:44:54 2> Help PF1 Back PF3 Up PF7 Down PF8> R.A>> A-BUFFER POOL SNAPSHOT H-HISTORICAL=============================================================================> BUFFER POOL DETAIL BP 0+ Collection Interval: REALTIME Start: 05/27 16:38:06+ Report Interval: 7 min End: 05/27 16:44:54++ Virtual Buffer Pool Size= 10000 Hiperpool Size = 0+ VPOOL Buffers Allocated = 10000 HPOOL Buffers Allocated = 0+ VPOOL Buffers in Use = 5095 HPOOL Buffers to be Deleted = 0+ VPOOL Buffers to be Del = 0 Castout Attribute = YES+ Use Count = 16+ Hiperspace names = @001D41A @002D41A @003D41A @004D41A++ VP Sequential Thresh = 80% HP Sequential Thresh = 80%+ Deferred Write Thresh = 50% Vert Deferred Write Thresh = 10%+ VP Parallel Seq Thresh = 50%++ Getpages per Sync I/O = 21.83 Pages Written per Write I/O = 20.80+ Prefetch per I/O = 1.03 Pages Read per Prefetch = 14.80+ Seq Prefetch per I/O = 1.03 Pages Read per Seq Prefetch = 14.80+ List Prefetch per I/O = .00 Pages Read per List Prefetch= .00+ Dyn Prefetch per I/O = .00 Pages Read per Dyn Prefetch = .00+ Max Concur Prefetch I/O = 12 Workfile Maximum = 0+ BP Hit Percentage = 93.7% HP Hit Percentage = 0.0%+ HP Read-to-Write Percentage = 0.0%++ TOTAL INTERVAL /SECOND /THREAD /COMMIT+ QUANTITY QUANTITY ( 408) ( 0) ( 0)+ -------- -------- ------- ------- -------+ Getpage Requests 1649561 0 .00 .00 .00+ Getpage Requests - Sequential 1640061 0 .00 .00 .00+ Getpage Requests - Random 9500 0 .00 .00 .00+ Getpage Failed - VPOOL Full 0 0 .00 .00 .00+ Getpage Failed - Cond Request 0 0 .00 .00 .00++ Sync Read I/O Operations 75566 0 .00 .00 .00+ Sync Read I/Os - Sequential 5066 0 .00 .00 .00+ Sync Read I/Os - Random 70566 0 .00 .00 .00+ Page-in Required for Read I/O 0 0 .00 .00 .00+ Pages Read via Seq Prefetch 423645 0 .00 .00 .00+ Seq Prefetch I/O Operations 27679 0 .00 .00 .00+ Sequential Prefetch Requests 27654 0 .00 .00 .00+ Pages Read via List Prefetch 225 0 .00 .00 .00+ List Prefetch I/O Operations 200 0 .00 .00 .00+ List Prefetch Requests 967 0 .00 .00 .00+ Pages Read via Dyn Prefetch 45 0 .00 .00 .00+ Dyn Prefetch I/O Operations 79 0 .00 .00 .00+ Dynamic Prefetch Requests 122 0 .00 .00 .00+ Prefetch Failed - No Buffer 40 0 .00 .00 .00+ Prefetch Failed - No Engine 0 0 .00 .00 .00

Page 107: OMEGAMON II for DB2 Tuning Guide, Version 540 - IBMpublib.boulder.ibm.com/tividd/td/ITOMEGAIIDB2/G251... · 2 OMEGAMON II for DB2 Tuning Guide, Version 540 Registered trademarks and

Analyzing Thread Information 107

Analyzing Thread Information Using Historical Reports

FIGURE 38. (Part 2 of 2) Buffer Pool Detail Panel

On this panel, you notice that the number of times that DB2 reached the deferred write threshold in BP0 is high, and that DB2 forced a write to free the pool space (Immediate Sync Writes field). A reason for this may be that the application may have updated 10% of the pages, or 64 pages, whichever is greater.

Resolving the buffer pool problemYou may want to run the Statistics Buffer Pool Activity report to see if this activity is a spike in performance or a developing trend. If, for example, you notice on the report that the number of prefetches disabled because no buffer was available has steadily increased from zero (the normal situation) to a higher number over a period of days, you may need to increase the size of the buffer pool.

________________ ZBP VTM O2 V540./C D412 mm/dd/yy 16:44:54 2++ HP Pages Read Sync 0 0 .00 .00 .00+ HP Pages Read Async - No ADM 0 0 .00 .00 .00+ HP Pages Read Async - ADM 0 0 .00 .00 .00+ HP Read Failed - No ADM 0 0 .00 .00 .00+ HP Read Failed - ADM 0 0 .00 .00 .00++ Parallel Group Requests 0 0 .00 .00 .00+ Prefetch I/O Streams Reduced 60 0 .00 .00 .00+ Parallelism Downgraded 0 0 .00 .00 .00+ Prefetch Quan Reduced to 1/2 0 0 .00 .00 .00+ Prefetch Quan Reduced to 1/4 0 0 .00 .00 .00++ Pages Updated 736525 0 .00 .00 .00+ Pages Written 122861 0 .00 .00 .00+ Page-in Required for Write I/O 0 0 .00 .00 .00+ Write I/O Operations 5904 0 .00 .00 .00+ Immediate (Sync) Writes 4 0 .00 .00 .00+ Write Engine Not Available 0 0 .00 .00 .00++ HP Pages Written Sync 0 0 .00 .00 .00+ HP Pages Written Async - No ADM 0 0 .00 .00 .00+ HP Pages Written Async - ADM 0 0 .00 .00 .00+ HP Write Failed - No ADM 0 0 .00 .00 .00+ HP Write Failed - ADM 0 0 .00 .00 .00++ Vert Defer Wrt Threshold Reached 43 0 .00 .00 .00+ Deferred Write Threshold Reached 1229 0 .00 .00 .00+ Data Manager Threshold Reached 537 0 .00 .00 .00++ Successful VPOOL Expand/Contract 3 0 .00 .00 .00+ Successful HPOOL Expand/Contract 1 0 .00 .00 .00+ VPOOL or HPOOL Expand Failed 0 0 .00 .00 .00++ Successful Dataset Opens 79 0 .00 .00 .00+ DFHSM Recall 5 0 .00 .00 .00+ DFHSM Recall Timeouts 0 0 .00 .00 .00++ Sort Merge Passes 22 0 .00 .00 .00+ Sort/Merge Workfile Requests 62 0 .00 .00 .00+ Sort/Merge Workfile Req Denied 0 0 .00 .00 .00+ Sort Merge Pass - Buff Short 0 0 .00 .00 .00+ Workfile Prefetch Disabled 0 0 .00 .00 .00+ Workfile Create Failed - No Buff 0 0 .00 .00 .00+ Destructive Read Requests 3820 0 .00 .00 .16+ Destructive Read Page Dequeue 1605 0 .00 .00 .16=============================================================================

Page 108: OMEGAMON II for DB2 Tuning Guide, Version 540 - IBMpublib.boulder.ibm.com/tividd/td/ITOMEGAIIDB2/G251... · 2 OMEGAMON II for DB2 Tuning Guide, Version 540 Registered trademarks and

Section F: Viewing Near-term Thread History

108 OMEGAMON II for DB2 Tuning Guide, Version 540

Section F: Viewing Near-term Thread History

Information About Completed ThreadsYou can use OMEGAMON II's near-term thread history facility to view information about completed threads.

You begin by specifying the dates and times of the historical information you want to view. For example, you can specify that you want to view information about threads that completed between January 1 at 8 a.m. and January 2 at 4 a.m.

You can also specify how you want to partition the data for the reporting period. For example, you can specify that the reporting period should be divided into ten minute intervals.

The near-term history feature also allows you to group information by plan and authid. It shows you both thread summary information for a specific interval and detailed information about the execution of a particular thread.

This chapter describes how to specify collection options using the ISPF dialog, and how to use the classic interface to set report and filter options and access thread history information.

RequirementsYou can view near term thread history only when:

� the historical online collector is active

� data is collected to VSAM LDS historical datasets

� accounting data is available in the active datasets for the specified reporting period

Note: Thread history detail information cannot be displayed for data collected with the GROUPBY specification.

Accessing thread history panelsEnter H.B on the command line of the Realtime Main Menu to view near-term historical information about completed threads.

Page 109: OMEGAMON II for DB2 Tuning Guide, Version 540 - IBMpublib.boulder.ibm.com/tividd/td/ITOMEGAIIDB2/G251... · 2 OMEGAMON II for DB2 Tuning Guide, Version 540 Registered trademarks and

Analyzing Thread Information 109

Section F: Viewing Near-term Thread History

Navigation

The following diagram shows you how to navigate to the near-term thread history panels.

Online HIstorical

Information Menu

Filter Options (HAFL)

Filter Options Confirmation

(HAFC)

By report Interval (HARP)

By Sub Interval (HARS)

Group By (HAGP)

Thread Summary (HATH)

NTH Statistics

(Hxxx)

Thread Detail

(HPLN)

Filter Options Display (HAFD)

This panel may be invoked from any of the panels above,except HPLN and NTH Statistics.

Page 110: OMEGAMON II for DB2 Tuning Guide, Version 540 - IBMpublib.boulder.ibm.com/tividd/td/ITOMEGAIIDB2/G251... · 2 OMEGAMON II for DB2 Tuning Guide, Version 540 Registered trademarks and

Specifying Collection Options

110 OMEGAMON II for DB2 Tuning Guide, Version 540

Specifying Collection Options

Use the Data Collection Specifications panel to set collection options that provide data for near-term thread history panels.

Accessing the ISPF Data Collection Specifications panelTo access the Data Collection Specifications panel:

� Select COLLECT from the Historical Main Menu in the ISPF interface.

Result: The Data Collection Specifications panel appears.

FIGURE 39. Data Collection Specifications Panel

You are now ready to specify collection options.

Specifying collection optionsYou can specify the following thread collection options on the Data Collection Specifications panel:

Scan summary Specifies whether or not scan data is collected. If Y is entered, the collector activates IFCIDs 15, 16, 17, and 18.

Sort summary Specifies whether or not sort data is collected. If Y is entered, the collector activates IFCIDs 95 and 96.

Group by Specifies how accounting data is to be grouped. Grouping elements are AUTHID, ORIGAUTHID, PLANNAME, CONNID, and CORRID. If these fields are left blank, data is recorded for every thread.

When Groupby elements are specified, accounting data is collected according to the time interval defined in the Collection interval specification.

OMEGAMON II for DB2 -------- Data Collection Specifications -------- SSID: D61ACOMMAND ===> DB2 to be monitored...: ____Target destination....: ____ (DB2, VSAM, NONE)Backup destination....: ___ (SMF, GTF, blank if none)Collection interval...: ___ (RMF, 1-60 minutes) Thread specifications: Scan summary..: _ Dynamic SQL.......: _ Sort summary..: _ Lock Contention...: _ Lock Suspension...: _ Group by......: __________ __________ __________ __________ __________ Select when...: AUTHID ________ ________ ________ ________ ________ ORIGAUTHID ________ ________ ________ ________ ________ PLANNAME ________ ________ ________ ________ ________ CONNID ________ ________ ________ ________ ________ CORRID ____________ ____________ ____________ Data to be collected: DB2 Parms.........: N Statistics...: Y Acctg Class......1: Y 2: Y 3: Y 7: N 8: N Audit Class......1: N 2: N 3: N 4: N 5: N 6: N 7: N 8: N Press: ENTER to continue END for previous panel HELP for more information

Page 111: OMEGAMON II for DB2 Tuning Guide, Version 540 - IBMpublib.boulder.ibm.com/tividd/td/ITOMEGAIIDB2/G251... · 2 OMEGAMON II for DB2 Tuning Guide, Version 540 Registered trademarks and

Analyzing Thread Information 111

Specifying Collection Options

Viewing current collection optionsUse the Online Historical Collection Options panel to view the current data collection options that you set on the Data Collection Specifications panel.

Access the Online Historical Collection Options panel using either of these methods:

1. Type H on the top line of the Realtime Main Menu, and press Enter.Result: The Online Historical Information Menu appears.

2. Type C on the top line of the Online Historical Information Menu, and press Enter.Result: The Online Historical Collection Options panel appears.

Dynamic SQL Enter Y or N to specify the collection of SQL text and access path information for dynamic SQL. N is the default.

Lock Contention Enter Y or N to specify the collection of lock timeout and deadlock information. N is the default.

Lock Suspension

Enter Y or N to specify the collection of lock wait information for local resources. The default is N.

Select when Specifies the criteria that must be met in order for data to be collected. Selection can be based upon AUTHID, ORIGAUTHID, PLANNAME, CONNID, or CORRID. For example, if CICSPR01 and CICSPR02 were specified for planname, only data for threads with the specified plans would be collected.

You can use wildcard characters * (suffix only, one or more characters) and ? (single character) to specify selection criteria.

Page 112: OMEGAMON II for DB2 Tuning Guide, Version 540 - IBMpublib.boulder.ibm.com/tividd/td/ITOMEGAIIDB2/G251... · 2 OMEGAMON II for DB2 Tuning Guide, Version 540 Registered trademarks and

Specifying Collection Options

112 OMEGAMON II for DB2 Tuning Guide, Version 540

FIGURE 40. Online Historical Collection Options Panel

A YES value in the Dynamic SQL, Lock Contention, or Lock Suspension field indicates that performance information is being collected for that field.

________________ ZH2IN VTM O2 V540.G7 $DB2 mm/dd/yy 12:54:42> Help PF1 Back PF3 Up PF7 Down PF8> H.C.A> HISTORICAL INFORMATION: Enter a selection letter on the top line. > *-COLLECTION OPTIONS B-RECORD INFORMATION C-DATASET STATUS=============================================================================> ONLINE HISTORICAL COLLECTION OPTIONS COPT+ H2 Collection Options++ DB2sys = D31A DB2syswrite = N/A Interval = 10+ Commit = N/A Destination = None Writeoption = VSAM+ Archivejcl = ARCVD31A++ Statistics = Yes Dsnzparm = Yes+ Auditing = (1 2 )+ Accounting = (1 2 3 ) Sort = Yes Lock Contention = No+ Scan = Yes Lock Suspension = No+ Dynamic SQL = No++ H2 Data Sets :+ TDD2.D2270REL.ZSMP.H2LOG1+ TDD2.D2270REL.ZSMP.H2LOG2+ TDD2.D2270REL.ZSMP.H2LOG3++ Group By = None++ Filtering : None========================================================================

Page 113: OMEGAMON II for DB2 Tuning Guide, Version 540 - IBMpublib.boulder.ibm.com/tividd/td/ITOMEGAIIDB2/G251... · 2 OMEGAMON II for DB2 Tuning Guide, Version 540 Registered trademarks and

Analyzing Thread Information 113

Specifying Report and Filter Options

Specifying Report and Filter Options

Before viewing thread history information, you must specify reporting and filter options.

You can specify the reporting period for which you want to view near-term thread information, the intervals into which the report period is divided, and filter options that restrict the data that is displayed on thread history panels. For example, you can set options so that thread information displays for a specified reporting period, and for specific plan names, authorization identifiers, or connection types.

Where do I start?Use the Thread History Filter Options panel to specify filtering and reporting options:

1. Type H on the command line of the Realtime Main Menu, and press Enter.Result: The Online Historical Information menu appears.

2. Type B for Thread History on the command line of the Online Historical Information Menu, and press Enter.Result:The Near-Term Thread History Filter Options panel appears.

FIGURE 41. Near-Term Thread History Filter Options Panel

Date/Time input fieldsYou can use the following date/time fields to specify a timespan for a report period. You can specify a maximum timespan of 24 hours for any report period. You can view

________________ ZHAFL VTM O2 V540./C $DB2 mm/dd/yy 16:37:55 2> Help PF1 Back PF3> H.B> Specify filter options then press ENTER to continue=============================================================================> NEAR-TERM THREAD HISTORY FILTER OPTIONS HAFL+ Time of oldest available record: mm/dd/yyyy 09:09:34.980650+ Time of latest record: mm/dd/yyyy 09:36:49.631645+ Total number of records: 453287+: START-DATE/TIME = mm/dd/yyyy 16:00 (mm/dd/yyyy or dd.mm.yyyy, hh:mm): END-DATE/TIME = __________ _____ (mm/dd/yyyy or dd.mm.yyyy, hh:mm): RELATIVE-START = __ _____ ago (1-nn, MINS or HOURS): RELATIVE-END = 02 HOURS from start (1-nn, MINS or HOURS): REPORT-INTERVAL = 60 minutes ( 5-60 mins, in 5 min increments)++ Specify the values to be used to filter the Thread History displays. Wildcard+ values * (multiple characters) or ? (single character) can be specified.: PLAN = ________ ________ ________ ________ ________: AUTHID = ________ ________ ________ ________ ________: CONNID = ________ ________ ________ ________ ________: CONNTYPE = ________ ________ ________ ________ ________=============================================================================

Page 114: OMEGAMON II for DB2 Tuning Guide, Version 540 - IBMpublib.boulder.ibm.com/tividd/td/ITOMEGAIIDB2/G251... · 2 OMEGAMON II for DB2 Tuning Guide, Version 540 Registered trademarks and

Specifying Report and Filter Options

114 OMEGAMON II for DB2 Tuning Guide, Version 540

near-term thread history information only when the accounting data for the completed thread is in the active datasets for the specified reporting period.

Filtering input fieldsUse the following fields to restrict the data that is displayed on thread history panels.

Note: You can enter up to 5 values for each field, including wildcards (*,?), as well as a comparison operator of equal (=) or not equal (^= or <>).

Field Description

Start-Date/Time Specify the starting date and time that you want thread information to be reported. Specify date and time as follows:

End-Date/Time The end date and time of the thread information that is being reported.

Relative-Start The number of minutes or hours before the current time on which the reporting period begins. You can specify a relative start instead of an absolute start date and time.

Relative-End The number of minutes or hours after the relative or absolute start time on which the reporting period ends. You can specify a relative end instead of an absolute end date and time.

Report Interval The number of minutes by which the report period is partitioned. You must specify a value that is a multiple of the subinterval value that is evenly divisible into 60. The subinterval is the smallest allowable interval (displayed in parentheses to the right of the input field).

Field Description

Plan The plan names by which thread history displays are restricted.

Authid The authorization identifiers by which thread history displays are restricted.

DATE � mm/dd/yyyy� dd.mm.yyyy� yyyy-mm-dd

TIME � hh:mm� hh.mm

Page 115: OMEGAMON II for DB2 Tuning Guide, Version 540 - IBMpublib.boulder.ibm.com/tividd/td/ITOMEGAIIDB2/G251... · 2 OMEGAMON II for DB2 Tuning Guide, Version 540 Registered trademarks and

Analyzing Thread Information 115

Specifying Report and Filter Options

Confirming thread history optionsTo confirm the reporting and filtering options that you have selected:

� Press Enter from the Thread History Filter Options panel.

Result: A confirmation panel appears.

To proceed to the Thread History by Report Interval panel, press Enter. To modify the selected filter options, press PF3.

Viewing current filter optionsUse the Thread History Display Options panel to view the filter options that you set on the Filter Options panel. To access the options panel:

� Type O on the top line of any thread history data panel, and press Enter.

Result: A view-only panel appears that displays the current filter options.

To change any of the displayed options, you must press PF3 to return to the Near-Term Thread History Filter Options panel.

Connid The connection identifiers by which thread history displays are restricted.

Conntype The connection types by which thread history displays are restricted. Following are the possible connection types:

Field Description

TSO TSO foreground and background

CALLATCH DB2 call attach

DLI DL/I batch

IMSBPP IMS attach BMP

IMSMPP IMS attach MPP

IMSCTRL IMS control region

IMSBMP IMS transaction BMP

IMS All IMS threads

SYSDIR System directed access (DBATs)

APPLDIR Application directed access (DBATs)

DIST All database access threads

BATCH Other DB2 batch threads

Page 116: OMEGAMON II for DB2 Tuning Guide, Version 540 - IBMpublib.boulder.ibm.com/tividd/td/ITOMEGAIIDB2/G251... · 2 OMEGAMON II for DB2 Tuning Guide, Version 540 Registered trademarks and

Viewing Thread Activity for a Report Period

116 OMEGAMON II for DB2 Tuning Guide, Version 540

Viewing Thread Activity for a Report Period

After you have set the report period and filter options for displaying near-term thread history, you can view information about completed threads using the OMEGAMON II near-term thread history facility. You can see an overview of recent thread activity, or zoom to detailed information about a specific report interval or thread. You also can display the thread information grouped by plan or authorization identifier.

In this section, you will learn how to use the following thread history panels:

� Thread History by Report IntervalDisplays an overview of thread activity for a reporting period.

� Thread History by Report SubintervalDisplays an overview of thread activity for a specific report interval.

� Group By Thread HistoryThese panels group the thread data by either plan or authid.

Where do I start?To begin viewing near-term thread history information:

� Press Enter from the Thread History Filter Options Confirmation panel.Result: The Thread History by Report Interval panel appears.

FIGURE 42. Thread History by Report Interval Panel

About the Report Interval panelThe Thread History by Report Interval panel provides an overview of thread activity for the specified reporting period, divided into a series of report intervals. Each time displayed on this panel reflects the start of an interval. For example, you can view a series of 10-minute report intervals beginning at 1600 hours on February 15 and ending at 1800 hours on the same day.

________________ ZHARP VTM O2 V540./C $DB2 mm/dd/yy 14:07:10 2> Help PF1 Back PF3 Up PF7 Down PF8>> Type a selection letter next to the Interval and press Enter.>> A-BY PLAN B-BY AUTHID C-BY PLAN,AUTHID D-BY AUTHID,PLAN> E-THREAD SUMMARY F-BY SUBINTERVAL=============================================================================> THREAD HISTORY BY REPORT INTERVAL HARP+ Report Interval: 10 MINS Start: 02/15 16:00:00.000000+ Report Filtered: NO End: 02/15 17:59:59.999999++ Dlk/ In-DB2 In-DB2 In-DB2 GetP/+ Time Thrds Commit Abort DML TOut Elap Tm CPU Tm Wait Tm Getpage RIO+ ----- ----- ------ ----- ----- ---- ------- ------- ------- ------- -----: _ 16:20 2 5 0 2 0 5.3 .39 2.8 288 4.8: _ 16:10 1 2 0 4 0 149.0 13.79 46.9 12514 6.7: _ 16:00 3 3 0 1 0 104.7 .36 76.3 75 2.7

Page 117: OMEGAMON II for DB2 Tuning Guide, Version 540 - IBMpublib.boulder.ibm.com/tividd/td/ITOMEGAIIDB2/G251... · 2 OMEGAMON II for DB2 Tuning Guide, Version 540 Registered trademarks and

Analyzing Thread Information 117

Viewing Thread Activity for a Report Period

The reporting period and report interval are set on the Thread History Filter Options panel (see “Specifying Report and Filter Options” on page 113).

Refer to online help for an explanation of each field.

Navigation

From the Report Interval panel, you can obtain additional historical information about any report interval. You can

� display thread activity for a particular report interval, divided into subintervals. See “Viewing thread activity for a selected interval” on page 117.

� group the information for a particular report interval. See “Grouping thread information” on page 117.

� view a list of all threads that completed within a particular report interval. See “Viewing a Summary of Thread Activity” on page 119.

Viewing thread activity for a selected intervalYou can view summarized information about thread activity for a selected interval using the Thread History by Report Subinterval panel. This panel contains the same fields as the Report Interval panel; however, each time displayed on this panel reflects the start of a subinterval within the selected report interval.

To access the subinterval panel:

� Type F next to an interval on the Thread History by Report Interval panel, and press Enter.

Result: The Thread History by Subinterval panel appears.

Grouping thread informationYou can group the threads that completed during an interval or subinterval by:

� plan

� authid

� plan and authid

� authid and plan

Use the groupby panels to sort the information that is displayed on the Thread History by Report Interval and the Thread History by Subinterval panels.

Accessing the groupby panelsTo access groupby panels:

� Type a selection letter in the entry field next to the report interval or subinterval, and press Enter.

Page 118: OMEGAMON II for DB2 Tuning Guide, Version 540 - IBMpublib.boulder.ibm.com/tividd/td/ITOMEGAIIDB2/G251... · 2 OMEGAMON II for DB2 Tuning Guide, Version 540 Registered trademarks and

Viewing Thread Activity for a Report Period

118 OMEGAMON II for DB2 Tuning Guide, Version 540

Possible menu selections are as follows:

Result: A panel containing the grouped information appears.

FIGURE 43. Sample Groupby Panel (Thread History by Plan)

Navigation

From any groupby panel, you can view a list of all threads that completed for a specific group. See “Viewing a Summary of Thread Activity” on page 119.

Menu Selection Description

A Thread History by Plan

B Thread History by Authid

C Thread History by Plan, Authid

D Thread History by Authid, Plan

________________ ZHAGPL VTM O2 V540./C $DB2 mm/dd/yy 12:07:10 2> Help PF1 Back PF3 Up PF7 Down PF8 Zoom PF11> H.A.I> Enter a selection letter on the top line.>> *-BY PLAN B-BY AUTHID C-BY PLAN,AUTHID D-BY AUTHID,PLAN> O-OPTIONS===============================================================================> THREAD HISTORY BY PLAN HAGP+ Report Interval: 1 hour Start: 07/14 12:00:00.000000+ Report Filtered: YES End: 07/14 12:59:59.999999 plan+ DLk/ In-DB2 In-DB2 In-DB2 GetP/+ Plan Thrds Commit Abrt DML TOut Elap Tm CPU Tm Wait Tm Getpage RIO+ -------- ----- ------ ---- ----- ---- ------- ------- ------- ------- -----+ DSNESPRR 3 4 0 564 0 76.5 2.10 25.5 1860 25.4+ DSNESPCS 11 11 1 346 1 223.5 8.23 74.5 3330 25.3+ DSNTEP2 1 1 0 123 0 239.0 .91 209.6 1081 10.2+ TAMPLAN1 7 43 1 523 0 56.8 17.10 18.9 13007 25.3+ HPLXTAMG 3 11 0 141 0 73.2 23.45 24.4 45070 25.3

Page 119: OMEGAMON II for DB2 Tuning Guide, Version 540 - IBMpublib.boulder.ibm.com/tividd/td/ITOMEGAIIDB2/G251... · 2 OMEGAMON II for DB2 Tuning Guide, Version 540 Registered trademarks and

Analyzing Thread Information 119

Viewing a Summary of Thread Activity

Viewing a Summary of Thread Activity

After viewing information on the Report Interval, Report Subinterval, or groupby panels, you may want to view a summary of threads that ended for that interval or group.

From any near-term history statistics detail panel, you can also view a summary of threads that completed during a statistics interval.

You can view:

� general thread summary information that provides a list of all threads that completed during a report interval or subinterval

� thread buffer pool summary information� thread DB2 time summary information� thread lock/scan/sort summary information� a summary of threads that completed during a statistics interval

Where do I start?To view thread summary information, start at the Thread History Summary panel. This panel displays a list of the threads that completed during a specific report interval.

You can access the Summary panel as follows:

� From the Report Interval or Subinterval panel, type E next to an interval, and press Enter.

� From a group by panel, place the cursor on a thread data line, and press PF11.� From any near-term statistics detail panel, select menu option K.

Result: The Thread History Summary panel appears.

FIGURE 44. Thread History Summary Panel

________________ ZHATACT VTM O2 V540./C $DB2 mm/dd/yy 12:07:10 2> Help PF1 Back PF3 Up PF7 Down PF8 Sort PF10 Zoom PF11> H.A.I> Enter a selection letter on the top line.>> *-SUMMARY B-BUFFER POOL C-DB2 TIME D-LOCK/SCAN/SORT> O-OPTIONS===============================================================================> THREAD HISTORY SUMMARY HATH+ Report Interval: 1 Hour Start: 07/14 12:00:00.000000+ Report Filtered: YES End: 07/14 12:59:59.999999 act+ *+ Elapsed CPU Term+ End Time Plan Authid Time Time SQL Commit Abrt Pkg Status+ ------------ -------- -------- ------- ------ ----- ------ ---- --- ------+ 12:58:13.386 P D23ASEXT TDDB36A 59.23 4.411 10723 1 0 11+ 12:45:26.268 DSNESPRR TDO206B 322.95 .055 2 1 1 1+ 12:41:31.251 DSNUTIL TDO214A 181.33 .550 0 31 1 1 EOT/AB+ 12:22:13.569 * DSNESPRR TDO206B 4.77 .137 5422 0 0 0+ 12:22:13.571 * DSNESPRR TDO206B 4.60 .121 5150 0 0 0+ 12:17:17.893 KTEX110 TDDB19 189.14 3.210 6501 5 0 4+ 12:02:36.251 KO2270HP TDO2S06 21739 2.292 0 1 0 1 RES/IN===============================================================================

Page 120: OMEGAMON II for DB2 Tuning Guide, Version 540 - IBMpublib.boulder.ibm.com/tividd/td/ITOMEGAIIDB2/G251... · 2 OMEGAMON II for DB2 Tuning Guide, Version 540 Registered trademarks and

Viewing a Summary of Thread Activity

120 OMEGAMON II for DB2 Tuning Guide, Version 540

Indicator fieldsAn unlabeled indicator appears after the thread End Time on all thread summary panels:

Accessing other summary panelsUse horizontal menu selections to access other summary panels that give more information about the threads displayed on the Thread History Summary panel.

Thread History Buffer Pool Summary

Displays a summary of thread buffer pool activity for the selected report interval. For example, if you selected an interval on the Report Interval panel that began at 1200 hours and ended at 1300 hours, the information will be a summary of thread buffer pool activity for that interval.

Thread History DB2 Time Summary

Displays a summary of thread in-DB2 times for the selected interval.

Thread History Lock/Scan/Sort Summary

Displays a summary of thread lock, sort, and scan information for the selected interval.

* An * is displayed if the thread represents a parallel task initiated on behalf of another thread for CPU parallelism.

P A P is displayed if the thread is the parent of one or more parallel tasks created to process a query request. Any activity performed by the parallel tasks is not included in the statistics for this thread.

Page 121: OMEGAMON II for DB2 Tuning Guide, Version 540 - IBMpublib.boulder.ibm.com/tividd/td/ITOMEGAIIDB2/G251... · 2 OMEGAMON II for DB2 Tuning Guide, Version 540 Registered trademarks and

Analyzing Thread Information 121

Viewing Details About a Completed Thread

Viewing Details About a Completed Thread

After you view thread summary information, you may want to see details about a completed thread.

The Thread History Detail panel provides information such as the reason the thread ended, the elapsed time for the thread, and the amount of time the thread spent in DB2.

Where do I start?To access the Thread Detail panel:

� Move the cursor to a thread information line on a thread summary panel, and press PF11.

Result: The Thread History Detail panel appears.

FIGURE 45. Thread History Detail Panel

________________ ZHTACT VTM O2 V540./C $DB2 mm/dd/yy 09:42:13 2> Help PF1 Back PF3 Up PF7 Down PF8 > THREAD HISTORY: Enter a selection letter on the top line. > *-THREAD DETAIL B-LOCK COUNTS C-LOCK WAITS D-LOCKS OWNED E-SORT/SCAN> F-DYNAMIC SQL G-SQL COUNTS H-DISTRIBUTED I-BUFFER POOL J-GROUP BP> K-PACKAGE SUMMARY L-RES LIMIT M-PARALLEL TASKS =============================================================================> THREAD HISTORY DETAIL HPLN+ Thread: Plan=DSNESPCS Connid=TSO Corrid=TDO214 Authid=TDO214+ Attach: TSO DB2=D41A MVS=SYSG+ Time : Start=mm/dd/yyyy 11:09:26.312413 End=mm/dd/yyyy 11:11:55.540965 act+ Termination Status = EOT/ABND Commits = 0+ Total Elapsed Time = 00:02:29.229 Aborts = 1+ Total CPU Time = 00:00:40.428 Parallel Tasks = 4+ Total Stored Proc CPU = 00:00:00.000++ In-DB2 Times Total+ ------------------------------ ------------+ Elapsed Time 00:01:51.222+ CPU Time 00:00:25.576+ Stored Procedure CPU Time 00:00:00.000++ Waits Count Total+ ------------------------------ ---------- ------------+ Synchronous I/O Wait 1202 00:00:16.426+ Asynchronous Read I/O Wait 138 00:00:10.881+ Asynchronous Write I/O Wait 1 00:00:00.039+ Local Lock/Latch Wait 38 00:00:00.012+ Page Latch Wait 0 00:00:00.000+ Drain Lock Wait 0 00:00:00.000+ Drain of Claims Wait 0 00:00:00.000+ Global Lock Wait 0 00:00:00.000+ Inter-System Message Send Wait 0 00:00:00.000+ DB2 Service Task Wait 4 00:00:14.706+ Archive Log Mode(Quiesce) Wait 0 00:00:00.000+ Archive Read from Tape Wait 0 00:00:00.000+ Stored Procedure Schedule Wait 0 00:00:00.000+ ---------- ------------+ 1383 00:00:42.064=============================================================================

Page 122: OMEGAMON II for DB2 Tuning Guide, Version 540 - IBMpublib.boulder.ibm.com/tividd/td/ITOMEGAIIDB2/G251... · 2 OMEGAMON II for DB2 Tuning Guide, Version 540 Registered trademarks and

Viewing Details About a Completed Thread

122 OMEGAMON II for DB2 Tuning Guide, Version 540

About the detail panelThe Thread History Detail panel displays different types of information depending on the types of traces that were started when thread information was collected. OMEGAMON II displays N/A if those traces were not active. To have the following data appear, you must turn on traces in the active online collector datasets:

Data Trace Required

In-DB2 Times Accounting Class 2

Waits Accounting Class 3

Page 123: OMEGAMON II for DB2 Tuning Guide, Version 540 - IBMpublib.boulder.ibm.com/tividd/td/ITOMEGAIIDB2/G251... · 2 OMEGAMON II for DB2 Tuning Guide, Version 540 Registered trademarks and

Analyzing Thread Information 123

Related Thread History Detail Panels

Related Thread History Detail Panels

Accessing thread history detail panelsUse horizontal menu selections to access the following thread history detail panels:

� Lock/Claim/Drain Activity� Lock Waits� Locks Owned� Global Lock Activity� Current SQL � SQL Counts� Distributed Activity� Buffer Pool Activity� Group Buffer Pool Activity� Package Summary (Detail)� Resource Limit Statistics

Thread History Lock/Claim/Drain Activity panelDisplays lock/claim/drain statistics such as the number of requests to acquire a lock and the number of pages that were locked for a thread.

Thread History Lock Waits panelDisplays detailed information about lock waits that occurred for a thread.

Thread data must be collected by the online historical collector with the LOCKCONT(YES) or LOCKSUSP(YES) keywords. Otherwise, the panel displays a message that lock wait information is not available for this thread.

Thread History Global Lock Activity panelProvides a summary of global locking activity for a completed thread. You can use the information on this panel to assist you in sizing the coupling facility lock structure, and reducing global lock contention for the thread.

Thread History Sort and Scan Statistics panelDisplays sort and scan statistics, such as the number of sorts, the sort elapsed time, and the number of pages scanned by a thread.

To display thread history sort and scan information, you must specify Yes for Scan summary and Sort summary on the Data Collection Specifications panel.

Thread History Dynamic SQL Detail panelDisplays detailed information about dynamic SQL calls issued by a completed thread.

Page 124: OMEGAMON II for DB2 Tuning Guide, Version 540 - IBMpublib.boulder.ibm.com/tividd/td/ITOMEGAIIDB2/G251... · 2 OMEGAMON II for DB2 Tuning Guide, Version 540 Registered trademarks and

Related Thread History Detail Panels

124 OMEGAMON II for DB2 Tuning Guide, Version 540

You must specify keyword DYNAMICSQL(YES) when collecting thread data; otherwise, the panel displays a message indicating that dynamic SQL information is not available for the thread.

Thread History SQL Counts panelDisplays information about SQL calls that were issued by a completed thread.

Thread History Distributed Activity panelDisplays distributed SQL statistics for each remote DB2 location with which the thread has communicated as a requestor or a server.

Note: Note: The information on this panel varies depending on whether the completed thread was a distributed allied thread or database access thread.

Thread History Buffer Pool Activity panelDisplays information about buffer pool activity for a completed thread.

This panel provides information for all buffer pools used by the thread.

Thread History Group Buffer Pool Activity panelDisplays a summary of group buffer pool usage for a completed thread. This information is available only when data sharing is active.

Thread History Package Summary and Detail panelsThe Thread History Package Summary panel displays a list of programs (DBRMs or packages) that were executed by a thread.

Accounting classes 7 or 8 are required to display package information.

From this panel you can access the Thread History Package Detail panel to view details about a particular package or DBRM.

Thread History Resource Limit Statistics panelDisplays information about resource limits for a completed DB2 thread, such as the highest amount of CPU time used by a thread, and the number of times each thread exceeded the maximum CPU time limit.

Page 125: OMEGAMON II for DB2 Tuning Guide, Version 540 - IBMpublib.boulder.ibm.com/tividd/td/ITOMEGAIIDB2/G251... · 2 OMEGAMON II for DB2 Tuning Guide, Version 540 Registered trademarks and

Analyzing Thread Information 125

Section G: Canceling a Thread

Section G: Canceling a Thread

Terminating a DB2 ThreadYou can use the Cancel Thread panel to purge an individual DB2 thread from the system that you are monitoring. For example, you can cancel an individual thread that is using an excessive amount of DB2 resources.

Cancel Thread panelTo access the Cancel Thread panel, enter O on the command line of any thread detail panel.

Result: The Cancel Thread panel is displayed.

FIGURE 46. Cancel Thread Panel

Usage noteA thread that has been canceled from this panel will terminate only when the thread is processing in DB2. If the thread remains active after you issue the cancel command, it may be because the thread is processing in the application, or is hung up in VTAM. You can use the MVS Cancel command to terminate the application, or use VTAM commands to cause VTAM to return processing to DB2, which will terminate the thread.

________________ ZTCANT VTM O2 V540./C D41A 07/06/01 10:15:17 2> Help PF1 Back PF3 > THREAD INFORMATION: Enter a selection letter on the top line. > A-THREAD DETAIL B-LOCK COUNTS C-LOCK WAITS D-LOCKS OWNED E-GLOBAL LOCKS> F-CURRENT SQL G-SQL COUNTS H-DISTRIBUTED I-BUFFER POOL J-GROUP BP> K-PACKAGES L-RES LIMIT M-PARALLEL TASKS N-UTILITY O-OBJECTS> *-CANCEL THREAD Q-DB2 CONSOLE R-DSN ACTIVITY S-APPL TRACE =============================================================================> CANCEL THREAD PLAN+ Thread: Plan=DACANDLE Connid=DB2CALL Corrid=TSGM14A Authid=TSGM14A+ Attach: TSO JOB Name=TSGM14A JOB asid= 167+ Package: SP61D Collection=> tcmd+ Specify TOKEN or LUWID, then press ENTER to cancel.++ TOKEN - cancel the individual thread using the Token shown+ LUWID - cancel all distributed threads with the Luwid shown+: CANCEL = ______ (TOKEN or LUWID)++ Token: 12345+ Luwid: 12345678.12345678.123456789012

===============================================================================

Page 126: OMEGAMON II for DB2 Tuning Guide, Version 540 - IBMpublib.boulder.ibm.com/tividd/td/ITOMEGAIIDB2/G251... · 2 OMEGAMON II for DB2 Tuning Guide, Version 540 Registered trademarks and

Section G: Canceling a Thread

126 OMEGAMON II for DB2 Tuning Guide, Version 540

Page 127: OMEGAMON II for DB2 Tuning Guide, Version 540 - IBMpublib.boulder.ibm.com/tividd/td/ITOMEGAIIDB2/G251... · 2 OMEGAMON II for DB2 Tuning Guide, Version 540 Registered trademarks and

Resolving Locking Conflicts 127

Resolving Locking Conflicts

Chapter ContentsOverview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 128Locks, Claims Owned by a Thread . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 129Locks, Claims Causing a Thread to Wait. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 130Tracking Locking Conflicts Using Historical Reports . . . . . . . . . . . . . . . . . . . . . . . . . 131

5

Page 128: OMEGAMON II for DB2 Tuning Guide, Version 540 - IBMpublib.boulder.ibm.com/tividd/td/ITOMEGAIIDB2/G251... · 2 OMEGAMON II for DB2 Tuning Guide, Version 540 Registered trademarks and

Overview

128 OMEGAMON II for DB2 Tuning Guide, Version 540

Overview

While monitoring your DB2 system (from the Summary of DB2 Activity panel), you might notice values in the Current Lock Suspensions, Locking Timeouts, Locking Deadlocks, or Lock Escalations fields that indicate a potential problem related to locks in your system.

A locking conflict exists when a DB2 user owning a lock causes other lock requests to wait. In general, when DB2 cannot satisfy a lock request, it suspends the thread issuing the request.

Analyzing a locking conflictYou can follow these general steps to analyze locking conflicts:

1. Identify the thread that owns the resource in conflict.

2. Analyze the detailed information about the thread that owns the resource in conflict.

3. Review the information about the locks that are waiting for the resource.After you analyze this information, you can take the appropriate actions to correct any condition that does not meet your site's performance standards.

Locking Conflicts panelThe Locking Conflicts panel displays all of the locking conflicts currently occurring in the system. For each conflict, it shows the thread that owns the lock involved in the conflict, and each of the threads waiting for the locked resource. The list is in descending order, beginning with the conflict having the largest number of waiters. A blank line separates each conflict.

FIGURE 47. Locking Conflicts Panel

Thread informationThe Locks owned by a Thread panel displays more information about the threads involved in the locking conflict. To see this panel, move the cursor to the owning thread involved in the locking conflict, and press PF11.

____________ ZLOCKC VTM O2 V540./C $DB2 mm/dd/yy 08:30:17> Help PF1 Back PF3 Up PF7 Down PF8 Zoom PF11==============================================================================> LOCKING CONFLICTS XLOK+Stat Plan Corrid Type Lvl Resource+---- -------- ------------ ---- --- ---------------------------------+ OWN PLAN0091 0013PSBNAME3 DPAG X DB=DBD00002 PS=TBLSPC21 PG=000200+WAIT PLAN0001 GT06TRN1 DPAG X DB=DBD00002 PS=TBLSPC21 PG=000200+WAIT PLAN0001 0009PSBNAME1 DPAG S DB=DBD00002 PS=TBLSPC21 PG=000200+WAIT PLAN0121 0009PSBNAME3 DPAG X DB=DBD00002 PS=TBLSPC21 PG=000200+WAIT PLAN0223 0009PSBNAME2 DPAG S DB=DBD00002 PS=TBLSPC21 PG=000200++ OWN PLAN0091 0005PSBNAME5 IPAG S DB=DBD00002 PS=NDXSPC22 PG=000002+WAIT PLAN0001 PT03TRN4 IPAG X DB=DBD00002 PS=NDXSPC22 PG=000002+WAIT PLAN0121 0007PSBNAME7 IPAG X DB=DBD00002 PS=NDXSPC22 PG=000002++ OWN DSNBIND TSOUSER1 SKCT X Plan=BINDCT+WAIT PLAN001 PT01TRN5 SKCT S Plan=PLAN0020==============================================================================

Page 129: OMEGAMON II for DB2 Tuning Guide, Version 540 - IBMpublib.boulder.ibm.com/tividd/td/ITOMEGAIIDB2/G251... · 2 OMEGAMON II for DB2 Tuning Guide, Version 540 Registered trademarks and

Resolving Locking Conflicts 129

Locks, Claims Owned by a Thread

Locks, Claims Owned by a Thread

Locks/Claims Owned by a Thread panelThe Locks/Claims Owned by a Thread panel (shown in Figure 48) helps you analyze all locks and claims owned by a specific DB2 thread. It shows the number of locks owned, the type and level of the locks, as well as the object of the locks. It also provides a list of claims held by the thread.

FIGURE 48. Locks/Claims Owned by a Thread Panel

________________ ZLOCKO VTM O2 V540./C $DB2 mm/dd/yy 15:56:04 2> Help PF1 Back PF3 Up PF7 Down PF8 > THREAD INFORMATION: Enter a selection letter on the top line. > A-THREAD DETAIL B-LOCK COUNTS C-LOCK WAITS *-LOCKS OWNED E-GLOBAL LOCKS> F-CURRENT SQL G-SQL COUNTS H-DISTRIBUTED I-BUFFER POOL J-GROUP BP> K-PACKAGES L-RES LIMIT M-PARALLEL TASKS N-UTILITY O-OBJECTS> P-CANCEL THREAD Q-DB2 CONSOLE R-DSN ACTIVITY S-APPL TRACE=============================================================================> LOCKS/CLAIMS OWNED BY A THREAD PLAN+ Thread: Plan=PLAN0091 Connid=CICSAPPL Corrid=TMICH Authid=ACFUSER1+ Attach: CICSid JOB Name=TMICH JOB Asid= 60+ Package: SP61D Collection= own+ Lock Ownership Information+ Percent NUMLKUS = 6.00 Total Locks Owned = 116+ Total Catalog Locks = 2 Pageset and Dataset Locks = 2+ Catalog Pageset Locks = 1 Page/Row Locks = 0+ Catalog Page/Row Locks= 1 Directory and Other Locks = 4+ Bind ACQUIRE option = USE Bind RELEASE option = COMMIT+ ISOLATION option = Cursor Stability++ Type Level Resource Number+ ---- ----- ------------------------------------ ------+ DPAG S DB=DSNDB06 PS=SYSDBAUT 1+ U DB=DBD00001 PS=TBLSPC01 107+ U DB=DBD00001 PS=TBLSPC11 3+ X DB=DBD00001 PS=TBLSPC01 1++ DSET S DB=DDB00003 PS=TBLSP03 PT=002 1++ PSET IS DB=DSNDB06 PS=SYSDBAUT 1+ IX DB=DBD00001 PS=TBLSPC01 1++ SKCT S Plan=PLAN0091 1+ ------+ Total = 116+ Claim Information+ Type Class Resource+ ------- ----- -------------------------------------------+ IX CS DB=DBD00001 PS=TBSPIX01+ IX CS DB=DBD00003 PS=TBSPIX03+ TS CS DB=D2D00001 PS=TBLSPC11+ IX CS DB=DSNDB01 PS=DSNSCT02+ TS cs DB=DSNDB01 PS=SCT02=============================================================================

Page 130: OMEGAMON II for DB2 Tuning Guide, Version 540 - IBMpublib.boulder.ibm.com/tividd/td/ITOMEGAIIDB2/G251... · 2 OMEGAMON II for DB2 Tuning Guide, Version 540 Registered trademarks and

Locks, Claims Causing a Thread to Wait

130 OMEGAMON II for DB2 Tuning Guide, Version 540

Locks, Claims Causing a Thread to Wait

Locks/Claims Causing a Thread to Wait panelThe Locks/Claims Causing a Thread to Wait panel (shown in Figure 49) allows you to determine whether a selected thread is suspended and waiting due to a locking conflict. When a thread is suspended, this panel provides the name of the lock/claim request causing the suspension. It also provides a list of all locks/claims currently held by other threads causing the thread to be suspended.

FIGURE 49. Locks/Claims Causing a Thread to Wait Panel

____________ ZLOCKW VTM O2 V540../C $DB2 mm/dd/yy 08:30:17> Help PF1 Back PF3 Up PF7 Down PF8 > THREAD INFORMATION: Enter a selection letter on the top line. > A-THREAD DETAIL B-LOCK COUNTS C-LOCK WAITS D-LOCKS OWNED E-GLOBAL LOCKS> F-CURRENT SQL G-SQL COUNTS H-DISTRIBUTED I-BUFFER POOL J-GROUP BP> K-PACKAGES L-RES LIMIT M-PARALLEL TASKS N-UTILITY O-OBJECTS > P-CANCEL THREAD Q-DB2 CONSOLE R-DSN ACTIVITY S-APPL TRACE =============================================================================> LOCKS/CLAIMS CAUSING A THREAD TO WAIT PLAN+ Thread: Plan=DSNESPCS Connid=TSO Corrid=TDO209 Authid=TDO209B+ Attach: TSO Userid=TDO209 Region asid= 188+ Package: SP61A Collection= wait+ Thread Is Currently Suspended Waiting For DRAIN of the following:+ Type=TS Class=WRITE Resource = DB=DSN8D31A PS=DSN8S31E PART=1++ Wait For Drain Time = 00:01:15++ The resource being drained is claimed by the following user(s):+ Plan Connid Corrid Class+ -------- -------- ------------ -----+ DSNESPRR TSO TDO209B CS=============================================================================

Page 131: OMEGAMON II for DB2 Tuning Guide, Version 540 - IBMpublib.boulder.ibm.com/tividd/td/ITOMEGAIIDB2/G251... · 2 OMEGAMON II for DB2 Tuning Guide, Version 540 Registered trademarks and

Resolving Locking Conflicts 131

Tracking Locking Conflicts Using Historical Reports

Tracking Locking Conflicts Using Historical Reports

Running the Accounting Detail historical reportFor this example, assume that while viewing the Locking Conflicts panel shown in Figure 47 on page 128, you notice that many threads are waiting on a data page lock that is owned by a thread that is executing PLAN0091. Place the cursor on this plan, and press PF11 to determine the total number of locks it currently owns.

The Locks/Claims Owned By a Thread panel, shown in Figure 48 on page 129, shows that PLAN0091 currently owns 116 locks, and has caused two lock escalations. To determine if this situation occurs often with this plan, you decide to examine the thread over an extended period of time by running a historical report.

First, fill in the appropriate Select When fields on the Historical Reporter Selection Criteria panel for the thread. Then run the Accounting SQL Activity report for activity over the past month.

Resolving the locking conflictWhen you run the SQL Activity report, pay close attention to the ratio of commits to updates. If this ratio is inappropriate for your site, perform any of the following actions:

� Avoid running this application during prime shift.

� Have the batch job issue intermittent commits.

� Rewrite the application to break up the plan.

� If this is not an application requirement, bind the plan with cursor stability instead of repeatable read options.

� Activate an application trace to see which locks are being used by the application. Schedule this job using these tables during different times. See “Analyzing Application Performance with ATF” on page 133 for more information on the application trace facility.

To see an example of the SQL Activity report, see the Historical Reporting Guide.

Viewing historical dataIf you have not yet identified the thread owning a lock, you may want to view historical data showing locking activity for all threads by running this sequence of reports:

1. Run the Statistics Lock Activity report with Group By HOUR to view overall locking activity during various time periods.

2. Isolate an hour that had significant locking activity. Specify that time period and Group By None as reporting options, and run the Statistics Lock Activity report. It will show locking activity during each interval within that hour.

3. After you isolate the interval, specify that time period and run the Accounting Lock Activity report to identify the thread that owns the lock.

Page 132: OMEGAMON II for DB2 Tuning Guide, Version 540 - IBMpublib.boulder.ibm.com/tividd/td/ITOMEGAIIDB2/G251... · 2 OMEGAMON II for DB2 Tuning Guide, Version 540 Registered trademarks and

Tracking Locking Conflicts Using Historical Reports

132 OMEGAMON II for DB2 Tuning Guide, Version 540

Note: When you run the Accounting Lock Activity report, a long-running thread may not complete in the interval that shows excessive locking activity. You may have to look at data across several time intervals to evaluate such a thread.

4. Activate an application trace to isolate the application causing the contention.

Page 133: OMEGAMON II for DB2 Tuning Guide, Version 540 - IBMpublib.boulder.ibm.com/tividd/td/ITOMEGAIIDB2/G251... · 2 OMEGAMON II for DB2 Tuning Guide, Version 540 Registered trademarks and

Analyzing Application Performance with ATF 133

Analyzing ApplicationPerformance with ATF

Chapter Contents Section A: Basic ATF Functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 134Logging Screens . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 136Application Trace Facility Menu . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 137Starting a Trace . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 138Viewing Trace Data. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 140Stopping a Trace. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 143Section B: Program Detail Information . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 144SQL Summary Information . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 146Sort Summary Information. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 147Lock Summary Information . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 148Scan Summary Information . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 149Section C: SQL Statement Level Information . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 151Lock Detail for an SQL Statement . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 154Event Detail for an SQL Statement. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 156Section D: Viewing Trace Data from a Dataset . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 158Specifying a Trace Dataset . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 159Selecting a Dataset . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 160Viewing the Dataset . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 161Releasing the Dataset . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 163

6

Page 134: OMEGAMON II for DB2 Tuning Guide, Version 540 - IBMpublib.boulder.ibm.com/tividd/td/ITOMEGAIIDB2/G251... · 2 OMEGAMON II for DB2 Tuning Guide, Version 540 Registered trademarks and

Section A: Basic ATF Functions

134 OMEGAMON II for DB2 Tuning Guide, Version 540

Section A: Basic ATF Functions

The application trace facility (ATF) allows you to selectively trace the execution of DB2 applications. It does this by tracing and displaying information about the performance of SQL statements within a DB2 application or dynamic query.

Types of informationATF displays the following types of information, which allows you to analyze application flow and resource consumption:

� SQL access path at execution time

� pageset access and scan information

� sort activity information

� locking information

� in-DB2 elapsed time and in-DB2 CPU time by thread, unit of work, program, and individual SQL statement

ATF panelsYou can use the ATF panels in two ways:

� to display trace data via in-core capture. This allows you to capture data that is generated at a very rapid rate. The data is available immediately, but is not retained when the OMEGAMON II session is terminated.

� to display trace data via dataset capture

Dataset display/capture facilityYou can use the dataset display/capture facility in the following ways:

� to capture/display application trace data in a VSAM dataset. This allows you to capture large amounts of data, limited only by the size of the dataset. The data can be viewed as it is being captured or at any time thereafter, either from an OMEGAMON II session or through ISPF (see “Section D: Viewing Trace Data from a Dataset” on page 158). However, when data is generated very rapidly, some data will be lost.

� to display data that has been extracted from SMF or GTF by the historical data extractor and stored in a VSAM dataset. This allows you to view your trace data from an OMEGAMON II session or through ISPF. This method can handle any volume of data generated at any speed (due to the capabilities of SMF/GTF). However, it involves batch processing, so the data is not available immediately.

The steps required to use these methods are described in the sections that follow.

Page 135: OMEGAMON II for DB2 Tuning Guide, Version 540 - IBMpublib.boulder.ibm.com/tividd/td/ITOMEGAIIDB2/G251... · 2 OMEGAMON II for DB2 Tuning Guide, Version 540 Registered trademarks and

Analyzing Application Performance with ATF 135

Section A: Basic ATF Functions

Problem-solving with ATFThe application trace facility is most effective when used to examine the activity of an application that has been identified as the source of a performance problem. To determine which application is a problem, use the panels described in “Resolving Exception Conditions” on page 65 and “Analyzing Thread Information” on page 75.

Page 136: OMEGAMON II for DB2 Tuning Guide, Version 540 - IBMpublib.boulder.ibm.com/tividd/td/ITOMEGAIIDB2/G251... · 2 OMEGAMON II for DB2 Tuning Guide, Version 540 Registered trademarks and

Logging Screens

136 OMEGAMON II for DB2 Tuning Guide, Version 540

Logging Screens

While an application trace is running, we recommend that you review and log the screens that display related thread detail (see “Section C: Analyze Detailed Information” on page 94). This will give you both high-level and detailed application/thread performance information.

Using PF6 to log a screenYou can use the PF6 key to log an individual screen. If you created a multipurpose thread detail screen, as described on page “Section E: Other Methods for Analyzing Thread Detail” on page 103, you can log a single screen that contains all the detail related to a thread.

Automatic loggingOMEGAMON II also has advanced logging capabilities that can automatically log thread information (sampling).

There are two ways to implement automatic screen logging.

� use automatic update mode. See the /AUP command in the OMEGAMON II for DB2 Reference Manual.

� navigate to the Set Display Options panel (fast path P.A.A) and set LOG=ON

Page 137: OMEGAMON II for DB2 Tuning Guide, Version 540 - IBMpublib.boulder.ibm.com/tividd/td/ITOMEGAIIDB2/G251... · 2 OMEGAMON II for DB2 Tuning Guide, Version 540 Registered trademarks and

Analyzing Application Performance with ATF 137

Application Trace Facility Menu

Application Trace Facility Menu

Where do I start?To examine a particular application or thread:

� Select option A, Application Trace, from the Main Menu.

Result: The Application Trace Facility Menu is displayed.

FIGURE 50. Application Trace Facility Menu

Using the Application Trace Facility MenuTo start an application trace, select option A, Specify Trace, from the Application Trace Facility Menu. (The resulting screen also allows you to specify a dataset in which to store the trace data.) To view the active trace, select option B. To stop the active trace, select option C.

To select a dataset in which performance data has been stored, select option D. (The resulting screen allows you to call up a dataset that contains data generated by ATF, or data extracted from SMF/GTF by the historical data extractor.) To view the data from the selected dataset, select option E. To stop the view by releasing the dataset, select option F.

________________ ZATMENU VTM O2 V540./C $DB2 mm/dd/yy 10:39:18> Help PF1 Back PF3>> Type a selection letter on the top line and press ENTER.==============================================================================> APPLICATION TRACE FACILITY MENU _ A SPECIFY TRACE ........ Request and start an application trace_ B VIEW TRACE ........... View the active trace_ C STOP TRACE ........... Stop the active trace _ D SELECT DATASET ....... Specify a trace dataset to view_ E VIEW DATASET ......... View the selected trace dataset_ F STOP VIEW ............ Release the selected dataset ==============================================================================

Page 138: OMEGAMON II for DB2 Tuning Guide, Version 540 - IBMpublib.boulder.ibm.com/tividd/td/ITOMEGAIIDB2/G251... · 2 OMEGAMON II for DB2 Tuning Guide, Version 540 Registered trademarks and

Starting a Trace

138 OMEGAMON II for DB2 Tuning Guide, Version 540

Starting a Trace

Where do I start?For this example, let's assume that you have pinpointed CICS-DB2 activity as the source of a performance problem. To display the Specify Application Trace panel:

� Select option A, Specify Trace, from the Application Trace Facility Menu.

Result: The Specify Application Trace panel is displayed.

FIGURE 51. Specify Application Trace Panel

Specifying trace informationOn the Specify Application Trace panel, you can request the start of a performance trace to capture data about an individual plan or about all plans executing in the DB2 subsystem. If you have already used the CICS Thread Summary and the Thread Detail panels to identify a problem thread, you can qualify your trace request by specifying the plan name and other CICS-related information.

Note: We strongly recommend that you qualify your trace request with a specific PLANNAME and/or AUTHID (and other relevant data) in order to limit the trace overhead incurred by DB2.

Specifying a trace time limitYou can specify the length of time for which trace data will be collected. The default is 5 minutes if not specified in the Time field. The trace must be started before the application

________________ ZATRQ VTM O2 V540./C D61A mm/dd/yy 13:19:22 2> Help PF1 Back PF3 Up PF7 Down PF8> A.A================================================================================> SPECIFY APPLICATION TRACE ATRQ+ Type DB2 Plan name to be traced. Also, provide additional optional+ selection information to limit trace output. To save trace records+ for later viewing you must specify a data set name for DSN+: DSN=____________________________________________ Data set name: TIME=005 Number of minutes to trace (001-060): PLANNAME=________ Plan name or ALL for all active threads: AUTHID=________ DB2 authorization identifier: TSOUSER=________ TSO USERID (TSO foreground application): JOBNAME=________ Jobname (TSO batch application): CICSTRAN=____ CICS transaction identifier: CICSCONN=________ CICS connection identifier: PSBNAME=________ IMS PSB name: IMSID=________ IMS ID of the IMS region: LOCKDATA=Y Collect DB2 lock trace records? (Y/N): SCANDATA=Y Collect DB2 scan trace records? (Y/N):SQLDATA=YCollect DB2 sql trace recs? (Y/N):THRDDATA=YCollect DB2 thread trace recs? (Y/N):CONNDATA=YCollect DB2 connect trace recs? (Y/N): SMF=N Write trace data to SMF? (Y/N): GTF=N Write trace data to GTF? (Y/N):MEMSIZE=02Collection workarea memory size (01-04 meg) --------------------------------------------------------------------------------

Page 139: OMEGAMON II for DB2 Tuning Guide, Version 540 - IBMpublib.boulder.ibm.com/tividd/td/ITOMEGAIIDB2/G251... · 2 OMEGAMON II for DB2 Tuning Guide, Version 540 Registered trademarks and

Analyzing Application Performance with ATF 139

Starting a Trace

begins and must stop after the application ends in order to collect a complete set of trace data for the application.

Specifying a trace datasetYou can also specify a dataset in which to store the trace data (DSN field) if you wish to view it later. The panels used to select and view the contents of a dataset are described later in this chapter (see “Section D: Viewing Trace Data from a Dataset” on page 158.).

For more information about specifying an application trace, see the OMEGAMON II for DB2 Reference Manual.

Page 140: OMEGAMON II for DB2 Tuning Guide, Version 540 - IBMpublib.boulder.ibm.com/tividd/td/ITOMEGAIIDB2/G251... · 2 OMEGAMON II for DB2 Tuning Guide, Version 540 Registered trademarks and

Viewing Trace Data

140 OMEGAMON II for DB2 Tuning Guide, Version 540

Viewing Trace Data

Where do I start?To view trace data:

elect option B, View Trace, from the Application Trace Facility Menu.

Result: The Trace Thread Summary panel, shown in Figure 52 appears.

Application Trace Thread Summary panelThis panel provides general information about the status and activity of the current trace. On this panel, the trace data is being captured in-core. If the trace is still collecting data, the status will be Active and the panel will be updated each time you press Enter. If the trace time limit has expired, the status will be Inactive, but the data will remain in a storage buffer until you terminate your session.

The panel displays one output line for each thread that was traced. Notice that the plans are sorted according to their use of in-DB2 CPU time, with the largest user displayed first.

FIGURE 52. Application Trace Thread Summary Panel

Note: If you specified a dataset to capture trace data on the Specify Application Trace panel, the Application Trace Thread Summary panel will display the dataset name and the number of records captured and lost, as long as the trace is active. It will not display any thread output at the bottom of the panel. You can view thread summary information for captured data on the Application Trace Thread Summary — View Dataset panel (see “Viewing the Dataset” on page 161.

________________ ZATVW VTM O2 V540./C $DB2 mm/dd/yy 17:27:37> Help PF1 Back PF3 Up PF7 Down PF8 Zoom PF11> A.B=============================================================================> APPLICATION TRACE THREAD SUMMARY ATVW+ Trace Status = ACTIVE Trace Time Remaining = 00:09:07+ Trace Start Time = 08:22:03 Trace End Time = 00:00:00+ Trace Time Limit = 00:10:00 Trace Records Collected = 814++ Trace Request Information :++ PLANNAME = O2PLAN01+ AUTHID = CIUSER1+ CICSTRAN = TRN1+ CICSCONN = CICSPROD++ Planname Connid Corrid Authid InDB2 CPU SQL Commits Aborts+ -------- -------- ------------ -------- --------- ------- -------- ------+ O2PLAN01 CICSPROD GT00TRN1 CIUSER1 2.07837 349 3 0=============================================================================

Page 141: OMEGAMON II for DB2 Tuning Guide, Version 540 - IBMpublib.boulder.ibm.com/tividd/td/ITOMEGAIIDB2/G251... · 2 OMEGAMON II for DB2 Tuning Guide, Version 540 Registered trademarks and

Analyzing Application Performance with ATF 141

Viewing Trace Data

Unit of work informationIf you want more information about a thread (for example if you see a high value for in-DB2 CPU time or for Aborts), move the cursor to its output line and press PF11. The Application Trace Unit of Work Summary panel is displayed as shown in Figure 53.

FIGURE 53. Application Trace Unit of Work Summary Panel

This display summarizes unit of work (UOW) activity for a selected thread. A single line of output is produced for every commit or abort (either in-flight or complete) that had associated SQL activity. The output is sorted by UOW start time, and can be used to evaluate resource use on a thread UOW basis.

If the number of lines displayed does not match the total number of commits and aborts displayed on the Application Trace Thread Summary panel, it is because some of the commits and/or aborts had no associated SQL activity.

If there are more lines than you expected, it is because some commits and/or aborts were not completed when the thread summary was displayed. The thread summary includes only completed UOWs, while this panel shows both in-flight and completed UOWs.

Program level InformationOnce you identify the unit of work that has consumed the most resources, you can zoom to a panel that displays more detail. Move the cursor to the output line, and press PF11. The Application Trace Program Summary panel is displayed as shown in Figure 54 on page 142.

________________ ZATVC VTM O2 V540./C $DB2 mm/dd/yy. 10:12:39> Help PF1 Back PF3 Up PF7 Down PF8 Zoom PF11=============================================================================> APPLICATION TRACE UNIT OF WORK SUMMARY ATVC+ Planname=O2PLAN01 Connid=CICSPROD Corrid=GT00TRN1 Authid=CIUSER1++ Start Time Progname InDB2 Time InDB2 CPU SQL Sorts Locks Rows+ ------------ -------- ------------ --------- ------ ------ ------ -------+ 08:22:45.776 O2APLM41 00:02:06.835 .33532 149 1 11 18911+ 08:22:31.855 O2PGMX68 00:11:58.292 .70893 130 1 15 11524+ 08:22:09.034 O2PTMM90 00:22:06.979 1.03412 70 2 19 37942=============================================================================

Page 142: OMEGAMON II for DB2 Tuning Guide, Version 540 - IBMpublib.boulder.ibm.com/tividd/td/ITOMEGAIIDB2/G251... · 2 OMEGAMON II for DB2 Tuning Guide, Version 540 Registered trademarks and

Viewing Trace Data

142 OMEGAMON II for DB2 Tuning Guide, Version 540

FIGURE 54. Application Trace Program Summary Panel

This panel shows information at the program level for the selected unit of work.

The horizontal menu options on this panel navigate to panels with different types of information about the program or DBRM (database request module).

For details about SQL calls within this plan, select option C. Or, to view a list of the SQL calls associated with this unit of work, select option A, then zoom on one of the calls for details. For details about locking activity, select option D. For details about DB2 events within this plan, select option E.

________________ ZATVS VTM O2 V540./C $DB2 mm/dd/yy 10:12:39> Help PF1 Back PF3 Up PF7 Down PF8 Zoom PF11 > APPLICATION TRACE: Enter a selection letter on the top line. > *-PROGRAM B-SQL INDEX C-SQL DETAIL D-LOCK DETAIL E-EVENT DETAIL=============================================================================> APPLICATION TRACE PROGRAM SUMMARY ATVS+ Planname=O2PLAN01 Connid=CICSPROD Corrid=GT00TRN1 Authid=CIUSER1++ Progname InDB2 Time InDB2 CPU SQL Sorts Locks Pages Rows+ -------- ------------ --------- ------ ------ ------ ------ -------+ O2PTMM90 00:22:06.979 1.03412 70 2 17 3950 37942=============================================================================

Page 143: OMEGAMON II for DB2 Tuning Guide, Version 540 - IBMpublib.boulder.ibm.com/tividd/td/ITOMEGAIIDB2/G251... · 2 OMEGAMON II for DB2 Tuning Guide, Version 540 Registered trademarks and

Analyzing Application Performance with ATF 143

Stopping a Trace

Stopping a Trace

Where do I start?To stop an active trace before the specified time limit has expired:

� Select option C, Stop Trace, from the Application Trace Facility Menu.

Result: The Stop Application Trace Request panel (Figure 55 on page 143) is displayed.

Stop Application Trace Request panelWhen a trace is stopped, the trace data already collected will remain in a storage buffer until you terminate your session. This allows you to continue to view trace data even after the trace ends or is stopped manually.

FIGURE 55. Stop Application Trace Request Panel

________________ ZATST VTM O2 V540./C $DB2 mm/dd/yy 21:00:50> Help PF1 Back PF3==============================================================================> STOP APPLICATION TRACE REQUEST>> To stop active application tracing, space over the > before ATST and> press ENTER.>>ATST>==============================================================================

Page 144: OMEGAMON II for DB2 Tuning Guide, Version 540 - IBMpublib.boulder.ibm.com/tividd/td/ITOMEGAIIDB2/G251... · 2 OMEGAMON II for DB2 Tuning Guide, Version 540 Registered trademarks and

Section B: Program Detail Information

144 OMEGAMON II for DB2 Tuning Guide, Version 540

Section B: Program Detail Information

Where do I start?To examine a program in more detail, from the Application Trace Summary Program panel:

� Move the cursor to the line of the selected program, and press PF11.

Result: The Application Trace Program Detail panel is displayed (Figure 56).

Application Trace Program Detail panelThis panel shows detailed trace information at the program level for a specific thread's unit of work.

FIGURE 56. Application Trace Program Detail Panel

________________ ZATVP VTM O2 V540./C $DB2 mm/dd/yy 20:59:59> Help PF1 Back PF3 Up PF7 Down PF8============================================================================> APPLICATION TRACE PROGRAM DETAILATVP+ Planname=O2PLAN01 Connid=O2CICS1 Corrid=GT00TRN1 Authid=CIUSER1++ Program Name = O2PROG01++ SQL Summary Information+ --------------------------------------------------------------------------+ SQL Call Stmt# Count InDB2 Time InDB2 CPU Avg Time Avg CPU+ ------------- ----- ------- ---------- --------- -------- --------+ Open Cursor 167 1 00:01:03.3 1.021 1.021 .016+ Fetch 123 6863 00:03:11.2 4.348 .027 .001+ Fetch 311 15 00:00:01.7 0.009 .001 .001+ Insert 1021 3 00:00:02.3 0.989 .766 .329+ Close Cursor 167 1 00:00:02.8 0.091 .045 .001++ Sort Summary Information+ -------------------------------------------------------------------------+ SQL Call Stmt# Count Sort Time Recs Reads Inserts Wfiles+ ------------- ----- ------ ---------- ------ ------ ------- ------+ Open Cursor 167 2 00:00:43.2 690 690 690 2++ Lock Summary Information+---------------------------------------------------------------------------+ Type Level Resource Count+ ---- ----- ------------------------------ -------+ PSET IS DB=O2DB0010 PS=O2TS0010 1+ IS DB=O2DB0010 PS=O2NDX010 1+ DPAG S DB=O2DB0010 PS=O2TS0010 23+ IPAG S DB=O2DB0010 PS=O2NDX010 5++ Scan Summary Information+---------------------------------------------------------------------------+ Scan Type = SEQUENTIAL Database = DSNDB01+ Scan Count = 1 Pageset = DSNDTX01++ Data Rows Rows Rows Rows Rows Rows Rows Rows Pages Pages+ Type Proces Looked Qual/DM Qual/RD Update Insert Delete De/REF Scand Sc/REF+ ---- ------ ------- ------- ------- ------ ------ ------ ------ ------ ------+ DATA 10 10 10 10 0 0 0 0 0 0============================================================================

Page 145: OMEGAMON II for DB2 Tuning Guide, Version 540 - IBMpublib.boulder.ibm.com/tividd/td/ITOMEGAIIDB2/G251... · 2 OMEGAMON II for DB2 Tuning Guide, Version 540 Registered trademarks and

Analyzing Application Performance with ATF 145

Section B: Program Detail Information

Following the thread information, the display is logically broken down into four areas for easy evaluation of program efficiency and DB2 resource usage:

� SQL activity� sort activity� lock activity� scan activity

These categories are described in the sections that follow.

Page 146: OMEGAMON II for DB2 Tuning Guide, Version 540 - IBMpublib.boulder.ibm.com/tividd/td/ITOMEGAIIDB2/G251... · 2 OMEGAMON II for DB2 Tuning Guide, Version 540 Registered trademarks and

SQL Summary Information

146 OMEGAMON II for DB2 Tuning Guide, Version 540

SQL Summary Information

This information helps you determine the types of SQL calls that were executed, their statement numbers, and how often each one was executed. The total elapsed in-DB2 time and average in-DB2 time are shown, along with total and average in-DB2 CPU times.

Page 147: OMEGAMON II for DB2 Tuning Guide, Version 540 - IBMpublib.boulder.ibm.com/tividd/td/ITOMEGAIIDB2/G251... · 2 OMEGAMON II for DB2 Tuning Guide, Version 540 Registered trademarks and

Analyzing Application Performance with ATF 147

Sort Summary Information

Sort Summary Information

For each SQL statement that initiates sort activity, this section of the Program Detail panel shows the time spent in sorting and the number of records sorted.

Increasing sort efficiencyUse the sort summary information to determine the efficiency of the sort. If the sort is inefficient, consider the alternatives described below.

� Sort the data in the order needed. Define a clustered index and maintain the clustered arrangement by reorganizing the data periodically.

� Use an index to retrieve data. This may be more efficient than running a DB2 sort.

� Increase the number of buffers in the buffer pools. This may reduce read/write activity in the buffer pool and to DSNDB07 work database files. Also, the larger the number of buffers, the less often the deferred write threshold (DWTH) in the buffer pools will be exceeded. When DWTH trips, DB2 will schedule asynchronous writes, including sort pages.

The maximum size of the sort work area allocated to each concurrent sort user depends on the value specified for the DSNZPARM parameter SRTPOOL. The actual work area used by each user is a function of the size of the total sort work area and the number of concurrent sort users.

� Ensure that adequate space is available in the buffer pools. For sort I/O, DB2 uses sequential prefetch to bring pages into the buffer pool four pages at a time. However, if the sequential prefetch threshold (SPTH) in the buffer pools is exceeded, sequential prefetch will be disabled.

� It is unlikely that a sort will complete in the buffer pool without incurring I/Os to the work file, especially when large amounts of data are being sorted.

� Associate temporary work file table spaces with their own buffer pools, one for 4K work file table spaces and one for 32K work file table spaces. Set the VPSEQT threshold high for the work file buffer pools. This should reduce I/O activity to your other buffer pools.

� Minimize I/O contention for DSNDB07 tablespaces. Allocate the tablespaces to multiple packs on different I/O paths.

� Increase the number of temporary work database work files. If more than one user is sorting concurrently, having more tablespaces will reduce DB2 contention against the sortwork tables and improve performance.

� Sort only the columns that are required. The smaller the sort row size, the more rows DB2 can fit on a page. (Remember that VARCHAR columns are padded to their maximum length, thus artificially increasing sort row size.)

Page 148: OMEGAMON II for DB2 Tuning Guide, Version 540 - IBMpublib.boulder.ibm.com/tividd/td/ITOMEGAIIDB2/G251... · 2 OMEGAMON II for DB2 Tuning Guide, Version 540 Registered trademarks and

Lock Summary Information

148 OMEGAMON II for DB2 Tuning Guide, Version 540

Lock Summary Information

This section provides information about all locks obtained for the program you zoomed on. It includes the lock type, lock level, the resource being locked, and the number of locks acquired for each resource.

Displaying lock dataWhen you set LOCKDATA=NO on the Specify Application Trace panel, no data will be displayed in this area of the panel.

Page 149: OMEGAMON II for DB2 Tuning Guide, Version 540 - IBMpublib.boulder.ibm.com/tividd/td/ITOMEGAIIDB2/G251... · 2 OMEGAMON II for DB2 Tuning Guide, Version 540 Registered trademarks and

Analyzing Application Performance with ATF 149

Scan Summary Information

Scan Summary Information

In DB2, all data access is via scanning. This section shows the type of scan activity that the program has initiated against each database and tablespace it has accessed.

Type of informationFor each scan executed, the scan summary shows its type (for example, index or insert), the database and tablespace that was scanned, the number of scans generated, and corresponding access path information.

Displaying scan dataWhen you set SCANDATA=NO on the Specify Application Trace panel, no data will be displayed in this area of the panel.

Data typesThree data types may be shown for each scan:

Access path informationFor each data type, a range of access path information is provided, for example, the number of rows processed, the number of rows qualified by the data manager (DM), and the number of rows qualified by the relational data system (RDS). Any SQL statement with predicates will have those predicates applied to the required rows (qualification) by either the DM or the RDS. The DM handles all stage 1 predicates, and the RDS handles all stage 2 predicates.

Row processing during scan activityRow processing occurs as follows:

1. The DM retrieves a page containing rows that may qualify for the predicates specified.The Pages Scanned field reflects the number of pages accessed.

INDX Indicates an index scan was generated.

If an INDX line is shown without a DATA line, the scan was generated for an index with no data access.

DATA Indicates a sequential tablespace scan was generated or that an index scan required data access.

A DATA line with no INDX line indicates a data tablespace scan without the use of an index.

WORK Indicates that the scan resulted in access to the DSNDB07 temporary work database files.

If WORK appears as the data type for any line, it indicates that all the rows being returned to the user were sorted.

Page 150: OMEGAMON II for DB2 Tuning Guide, Version 540 - IBMpublib.boulder.ibm.com/tividd/td/ITOMEGAIIDB2/G251... · 2 OMEGAMON II for DB2 Tuning Guide, Version 540 Registered trademarks and

Scan Summary Information

150 OMEGAMON II for DB2 Tuning Guide, Version 540

2. The DM first checks each row (Rows Looked) to be sure that it belongs to the referenced table.If it belongs, the row is processed; if not, it is rejected. (You can calculate the number of rejects by subtracting the Rows Processed value from the Rows Looked value.)

Note: At this stage, rejected rows will occur only if you store multiple tables in a single simple tablespace.

3. The DM next applies the stage 1 predicates to each row that was not previously rejected.Each row that does not satisfy the stage 1 predicates is now rejected. Each row that satisfies the stage 1 predicates is passed on to the RDS for the next qualifying stage. The Rows Qual/DM reflects the number of rows that were qualified by the DM and passed to the RDS.

4. The RDS applies stage 2 predicates (if any) to the rows it receives.All rows that do not comply with these predicates are rejected; rows that qualify are passed to the user. The Rows Qual/RD field reflects the number of rows that were qualified by the RDS and passed to the user.

Recommendation: Use stage 1 predicates whenever possible in your SQL statements to eliminate rows that should not be sent to the RDS. This will improve performance because the overhead associated with data manager processing is much lower than that of the relational data system.

The IBM DB2 System and Database Administration Guide lists the stage 1 and 2 predicates for each DB2 release.

Page 151: OMEGAMON II for DB2 Tuning Guide, Version 540 - IBMpublib.boulder.ibm.com/tividd/td/ITOMEGAIIDB2/G251... · 2 OMEGAMON II for DB2 Tuning Guide, Version 540 Registered trademarks and

Analyzing Application Performance with ATF 151

Section C: SQL Statement Level Information

Section C: SQL Statement Level Information

Where do I start?To obtain other information, after examining the program detail information in “Section B: Program Detail Information” on page 144:

� Select option B, SQL Index, from the Application Trace Program Summary panel.

Result: The Application Trace SQL Index panel (Figure 57) is displayed.

Application Trace SQL Index panelThis panel shows a list of the SQL calls associated with the unit of work you selected. Summary data appears with each call, and calls are presented in the order of their execution.

FIGURE 57. Application Trace SQL Index Panel

Application Trace SQL Detail panelFrom the Application Trace SQL Index panel, you can zoom on a specific SQL call (for example, one showing excessive in-DB2 times) to the Application Trace SQL Detail panel.

You can also reach the Application Trace SQL Detail panel by selecting option C from the horizontal menu on the Program Summary panel. The Application Trace SQL Detail panel is shown in Figure 58 on page 152.

________________ ZATSI VTM O2 V540./C $DB2 mm/dd/yy 11:26:18> Help PF1 Back PF3 Up PF7 Down PF8 Zoom PF11 > A-PROGRAM *-SQL INDEX C-SQL DETAIL D-LOCK DETAIL E-EVENT DETAIL=============================================================================> APPLICATION TRACE SQL INDEX ATSI+ Planname=DSNESPRR Connid=TSO Corrid=TSOUSER1 Authid=TSOUSER1+Call Type Stm# Program Count InDB2 Time MRet Rws Pc Rws DM Rws RD---------------- ----- -------- ----- ------------ ---- ------ ------ ------PREPARE 71 DSNESM68 1 00:00:00.111 0 13 4 0OPEN CURSOR 131 DSNESM68 1 00:00:00.000 0 0 0 0FETCH 125 DSNESM68 68 00:00:00.413 100 134 134 67CLOSE CURSOR 137 DSNESM68 1 00:00:00.001 0 0 0 0PREPARE 71 DSNESM68 1 00:00:00.152 0 13 4 0OPEN CURSOR 131 DSNESM68 1 00:00:00.000 0 0 0 0FETCH 125 DSNESM68 68 00:00:00.256 100 134 134 67CLOSE CURSOR 137 DSNESM68 1 00:00:00.000 0 0 0 0PREPARE 71 DSNESM68 1 00:00:00.002 0 0 0 0=============================================================================

Page 152: OMEGAMON II for DB2 Tuning Guide, Version 540 - IBMpublib.boulder.ibm.com/tividd/td/ITOMEGAIIDB2/G251... · 2 OMEGAMON II for DB2 Tuning Guide, Version 540 Registered trademarks and

Section C: SQL Statement Level Information

152 OMEGAMON II for DB2 Tuning Guide, Version 540

FIGURE 58. Application Trace SQL Detail Panel

This panel shows application trace information at the SQL statement level (within a particular thread unit of work) for one SQL call. A call is identified by its type (SQL Call field) and statement number (Stmt# field).

Displaying another callWhen you press Enter, data for another call is displayed. The Control field determines which call is displayed next (for example, Control=PREV causes the previous call to display). If you zoomed to this panel from the SQL Index panel, the first call that appears is the call on which you zoomed.

Identifying problem callsSQL detail information allows you to identify calls that used excessive amounts of elapsed time (in-DB2 time) and in-DB2 CPU time. This information can help you determine how to improve performance in this area.

________________ ZATD1 VTM O2 V540./C $DB2 mm/dd//yy 16:43:48> Help PF1 Back PF3 Up PF7 Down PF8 > APPLICATION TRACE: Enter a selection letter on the top line. > A-PROGRAM B-SQL INDEX *-SQL DETAIL D-LOCK DETAIL E-EVENT DETAIL=============================================================================> APPLICATION TRACE SQL DETAIL ATD1+ Planname=DSNESPRR Connid=TSO Corrid=TDO210B Authid=TDO210B+: Control=NEXT (Valid options are FIRST/LAST/NEXT/PREV/+nnnnn/-nnnnn/Snnnnn)+ Current=000005 Total Number of SQL Calls=001003++ Start Time Progname SQL Call Stmt# Retcode InDB2 Time InDB2 CPU+ ------------ -------- ---------------- ----- ------- ------------ ---------+ 16:42:18.744 DSNESM68 PREPARE 00032 0 00:00:00.418 .161++ Data Rows Rows Rows Rows Rows Rows Rows Rows Pages Pages+ Type Proces Looked Qual/DM Qual/RD Update Insert Delete De/Ref Scand Sc/Ref+ ---- ------ ------ ------- ------- ------ ------ ------ ------ ------ ------+ INDX 8 8 4 0 0 0 0 0 15 0+ DATA 4 4 0 0 0 0 0 0 4 0++ Dynamic SQL Call Text :+ -----------------------+ SELECT DSN8220.EMP.* FROM DSN8220.EMP,DSN8220.PROJ+ WHERE JOB = 'DESIGNER'+ AND WORKDEPT = DEPTNO+ AND MAJPROJ = 'MA2100'++ Miniplan Generated by DB2 :+ ---------------------------++ PLAN #1 (Estimated Cost: 24)++ Table: PROJ Access Type: INDEX+ Index: XPROJ2 Matching Cols: 0+ Join Method: NESTED LOOP Table Type: OUTER++ Table: EMP Access Type: INDEX+ Index: XEMP2 Matching Cols: 1+ Join Method: NESTED LOOP Table Type: INNER+==============================================================================

Page 153: OMEGAMON II for DB2 Tuning Guide, Version 540 - IBMpublib.boulder.ibm.com/tividd/td/ITOMEGAIIDB2/G251... · 2 OMEGAMON II for DB2 Tuning Guide, Version 540 Registered trademarks and

Analyzing Application Performance with ATF 153

Section C: SQL Statement Level Information

Dynamic SQLWhen dynamic SQL is used, DB2 performs a PREPARE of the SQL statement before executing the statement. The Application Trace SQL Detail panel for the PREPARE includes the full text of the prepared SQL statement and the access path selected by DB2, along with the standard information related to the execution of the PREPARE.

Analyzing access path informationAccess path information is displayed in the Miniplan Generated by DB2 area of the panel. Access path information shows you which calls did not use an index, which ones triggered a sort, and which ones had to be evaluated by RDS. This information can help you:

� understand information displayed in the other ATF panels, such as the reason for sort processing and scan activity

� identify potential problem areas that you can examine more closely, such as access by sequential scan or an unexpected join method

� determine whether or not list prefetch or sequential prefetch is being used

Page 154: OMEGAMON II for DB2 Tuning Guide, Version 540 - IBMpublib.boulder.ibm.com/tividd/td/ITOMEGAIIDB2/G251... · 2 OMEGAMON II for DB2 Tuning Guide, Version 540 Registered trademarks and

Lock Detail for an SQL Statement

154 OMEGAMON II for DB2 Tuning Guide, Version 540

Lock Detail for an SQL Statement

Where do I start?You may want to examine the lock activity that resulted from a particular SQL statement.

� Select option D, Lock Details, from the Application Trace SQL Detail panel.

Result: The Application Trace Lock Detail panel is displayed.

Application Trace Lock Detail panelThis panel identifies the SQL call by its type and statement number. On the same line, summary information is displayed, for example, the total number of pageset, datapage, index page, and other locks that were acquired by the statement.

FIGURE 59. Application Trace Lock Detail Panel

Under the section Locks Acquired by SQL Call, a line is displayed for each lock acquired, detailing its level and the resource that was locked.

________________ ZATD2 VTM O2 V540./C $DB2 mm/dd/yy 20:42:15> Help PF1 Back PF3 Up PF7 Down PF8 > APPLICATION TRACE: Enter a selection letter on the top line. > A-PROGRAM B-SQL INDEX C-SQL DETAIL *-LOCK DETAIL E-EVENT DETAIL==============================================================================> APPLICATION TRACE LOCK DETAIL ATD2+ Planname=O2PLAN01 Connid=O2CICS1 Corrid=GT00TRN1 Authid=CIUSER1+: Control=NEXT (Valid options are FIRST/LAST/NEXT/PREV/+nnnnn/-nnnnn/Snnnnn)+ Current=000001 Total number of SQL Calls=000021++ Start Time Progname SQL Call Stmt# PSET DPAG IPAG OTHER+ ---------- -------- ---------------- ----- ------ ------ ------ ------+ 00:16:01.0 O2PROG01 OPEN CURSOR 00016 0 1 0 0++ LOCKS ACQUIRED BY SQL CALL+ ----------------------------------------------------------+ TYPE LEVEL RESOURCE COUNT+ ---- ----- ------------------------------ -------+ DPAG X DB=O2DB0010 PS=O2TS0010 1+ -------+ TOTAL LOCKS ACQUIRED = 1++ LOCKS OWNED AT START OF SQL CALL EXECUTION+ ----------------------------------------------------------+ TYPE LEVEL RESOURCE COUNT+ ---- ----- ------------------------------ -------+ SKCT S PLAN=O2PLAN01 1+ PSET IS DB=O2DB0010 PS=O2TS0010 1+ DPAG U DB=O2DB0010 PS=O2TS0010 1+ -------+ TOTAL LOCKS OWNED = 3+==============================================================================

Page 155: OMEGAMON II for DB2 Tuning Guide, Version 540 - IBMpublib.boulder.ibm.com/tividd/td/ITOMEGAIIDB2/G251... · 2 OMEGAMON II for DB2 Tuning Guide, Version 540 Registered trademarks and

Analyzing Application Performance with ATF 155

Lock Detail for an SQL Statement

Analyzing locking informationYou should watch for locks against the catalog database (DSNDB06) and the directory database (DSNDB01), especially when the lock is for an update (level U or NSU). These two databases form a central point of contention within DB2. This conflict may be reduced through the use of static SQL statements in place of dynamic statements.

For more information about locking conflicts, see “Resolving Locking Conflicts” on page 127.

Page 156: OMEGAMON II for DB2 Tuning Guide, Version 540 - IBMpublib.boulder.ibm.com/tividd/td/ITOMEGAIIDB2/G251... · 2 OMEGAMON II for DB2 Tuning Guide, Version 540 Registered trademarks and

Event Detail for an SQL Statement

156 OMEGAMON II for DB2 Tuning Guide, Version 540

Event Detail for an SQL Statement

Where do I start?To examine the events associated with an SQL call:

� Select option E, Event Detail, from the Application Trace SQL Detail panel.

Result: The Application Trace Event Detail panel (Figure 60) is displayed.

Application Trace Event Detail panelThis panel shows the events that occurred for each SQL statement executed by DB2. Press Enter to display data for another SQL call.

FIGURE 60. Application Trace Event Detail Panel

Events are displayed in the order in which they occured. To calculate the elapsed time required for an event, subtract the start time of the event (Event Time field) from the start time of the next event. This will help you identify events that require excessive amounts of in-DB2 time.

________________ ZATD3 VTM O2 V540./C $DB2 mm/dd/yy 21:00:50> Help PF1 Back PF3 Up PF7 Down PF8 > APPLICATION TRACE: Enter a selection letter on the top line. > A-PROGRAM B-SQL INDEX C-SQL DETAIL D-LOCK DETAIL *-EVENT DETAIL=============================================================================> APPLICATION TRACE EVENT DETAIL ATD3+ Planname=DSNESPCS Connid=TSO Corrid=TDO214 Authid=TDO214+: Control=NEXT (FIRST/LAST/NEXT/PREV/+nnnn/-nnnn/Snnnn/TOP/BOTTOM/UP/DOWN)+ Current=000001 Total Number of SQL Calls=003004++ Event Time Event Type Event Resource Information+ ------------ ----------------------- --------------------------------------+ 18:28:26.287 LOCK ACQUIRE COLL=DSNESPCS SKPT S D=CMT+ PKG=DSNESM68 TOKEN=149EEA901A79FE48+ 18:28:26.287 START PREPARE PGM=DSNESM68 STMT=00071+ 18:28:26.289 LOCK ACQUIRE DB=DSNDB06 PS=SYSDBASE PSET IS D=CMT+ 18:28:26.290 START INDEX SCAN DB=DSNDB06 PS=SYSDBASE+ 18:28:26.290 LOCK ACQUIRE DB=DSNDB06 PS=DSNDYX01 IPAG S D=MNL+ PAGE=000008+ 18:28:26.290 END OF INDEX SCAN DB=DSNDB06 PS=SYSDBASE+ ROWS=0000001 PAGES=0000002+ 18:28:26.290 START INDEX SCAN DB=DSNDB06 PS=SYSDBASE+ 18:28:26.290 LOCK ACQUIRE DB=DSNDB06 PS=DSNDTX01 IPAG S D=MNL+ PAGE=00003F+ 18:28:26.290 LOCK ACQUIRE DB=DSNDB06 PS=SYSDBASE DPAG S D=MNL+ PAGE=0008F0+ 18:28:26.291 START INDEX SCAN DB=DSNDB06 PS=SYSDBASE+ 18:28:26.291 LOCK ACQUIRE DB=DSNDB06 PS=DSNDSX01 IPAG S D=MNL+ PAGE=000043+ 18:28:26.291 END OF INDEX SCAN DB=DSNDB06 PS=SYSDBASE+ ROWS=0000002 PAGES=0000003+ 18:28:26.292 END OF INDEX SCAN DB=DSNDB06 PS=SYSDBASE+ ROWS=0000002 PAGES=0000003+ 18:28:26.296 LOCK RELEASE (GROUP) DURATION=MANUAL+ 18:28:26.296 END PREPARE ROWS=0000005 PAGES=0000008===============================================================================

Page 157: OMEGAMON II for DB2 Tuning Guide, Version 540 - IBMpublib.boulder.ibm.com/tividd/td/ITOMEGAIIDB2/G251... · 2 OMEGAMON II for DB2 Tuning Guide, Version 540 Registered trademarks and

Analyzing Application Performance with ATF 157

Event Detail for an SQL Statement

Analyzing event informationParticular events to watch include commits, aborts, scans, and locks. The elapsed time for a lock event includes wait time if the thread was suspended during the lock acquire. Thus, a relatively long period between a lock acquire and the next event may indicate that the thread was suspended.

Event Resource Information field

The values in the Event Resource Information field vary according to the event type. For example, lock requests show the database name, pageset name (tablespace), lock type, lock level, and duration of the lock. End sort events show the number of records sorted and the sort row size (in bytes). SQL statement end events show the number of rows and number of pages processed. The OMEGAMON II for DB2 Reference Manual contains more information about the data that this panel displays.

Control field

The Control field (only on this panel) includes options that allow you to scroll through the entire list of events for a single SQL call, even if the list contains more than 999 lines. For example, when you enter TOP in the control field, OMEGAMON II accesses the first n lines of events, where n is the number of logical rows (LROWS) defined in your startup parameters. (See the OMEGAMON II for DB2 Configuration and Customization Guide.)

All the possible values for the Control field are described in the OMEGAMON II for DB2 Reference Manual.

Page 158: OMEGAMON II for DB2 Tuning Guide, Version 540 - IBMpublib.boulder.ibm.com/tividd/td/ITOMEGAIIDB2/G251... · 2 OMEGAMON II for DB2 Tuning Guide, Version 540 Registered trademarks and

Section D: Viewing Trace Data from a Dataset

158 OMEGAMON II for DB2 Tuning Guide, Version 540

Section D: Viewing Trace Data from a Dataset

Where do I start?Once data has been captured to a dataset, you will use selections D, E, and F from the Application Trace Facility menu to view the data.

You can also view a dataset from ISPF. Access theOMEGAMON II for DB2 ISPF dialog and select HISTORICAL from the Primary Options Menu. Then select ATF REPORT from the Historical Main Menu.

About this sectionThe following sections explain how to view a trace dataset using the Application Trace Facility menu. If you are viewing a dataset in which the historical extractor has stored DB2 data, you do not have to perform the steps described in “Specifying a Trace Dataset” on page 159.

Page 159: OMEGAMON II for DB2 Tuning Guide, Version 540 - IBMpublib.boulder.ibm.com/tividd/td/ITOMEGAIIDB2/G251... · 2 OMEGAMON II for DB2 Tuning Guide, Version 540 Registered trademarks and

Analyzing Application Performance with ATF 159

Specifying a Trace Dataset

Specifying a Trace Dataset

Where do I start?To start a trace and identify the dataset in which to store the trace data:

� Select option A, Specify Trace, from the Application Trace Facility Menu.

Result: The Specify Application Trace panel (Figure 61) is displayed.

Identify a trace datasetFirst, qualify the trace. Then identify a dataset (DSN field) in which to capture the data.

FIGURE 61. Specify Application Trace Panel

The dataset that you specify must already be allocated and formatted. Be sure to select a dataset that is large enough to store the amount of data you want to capture. If the dataset becomes full before all the data has been captured, the trace/capture will stop.

Note: Another way to capture an application trace is to issue the DB2 START TRACE command and designate SMF or GTF as the trace destination. This will allow you to use the extractor to transfer the data to a VSAM dataset. This method is described in the OMEGAMON II for DB2 Historical Reporting Guide in the chapter on data extraction.

________________ ZATRQ VTM O2 V540./C D31A mm/dd/yy 13:19:22 2> Help PF1 Back PF3 Up PF7 Down PF8> A.A==============================================================================> SPECIFY APPLICATION TRACE ATRQ+ Type DB2 Plan name to be traced. Also, provide additional optional+ selection information to limit trace output. To save trace records+ for later viewing you must specify a data set name for DSN+: DSN=____________________________________________ Data set name: TIME=005 Number of minutes to trace (001-060): PLANNAME=________ Plan name or ALL for all active threads: AUTHID=________ DB2 authorization identifier: TSOUSER=________ TSO USERID (TSO foreground application): JOBNAME=________ Jobname (TSO batch application): CICSTRAN=____ CICS transaction identifier: CICSCONN=________ CICS connection identifier: PSBNAME=________ IMS PSB name: IMSID=________ IMS ID of the IMS region: LOCKDATA=Y Collect DB2 lock trace records? (Y/N): SCANDATA=Y Collect DB2 scan trace records? (Y/N): SQLDATA=Y Collect DB2 sql trace recs? (Y/N): THRDDATA=Y Collect DB2 thread trace recs? (Y/N): CONNDATA=Y Collect DB2 connect trace recs? (Y/N): SMF=N Write trace data to SMF? (Y/N): GTF=N Write trace data to GTF? (Y/N): MEMSIZE=02 Collection workarea memory size (01-04 meg) ------------------------------------------------------------------------------

Page 160: OMEGAMON II for DB2 Tuning Guide, Version 540 - IBMpublib.boulder.ibm.com/tividd/td/ITOMEGAIIDB2/G251... · 2 OMEGAMON II for DB2 Tuning Guide, Version 540 Registered trademarks and

Selecting a Dataset

160 OMEGAMON II for DB2 Tuning Guide, Version 540

Selecting a Dataset

Where do I start?When you are ready to choose a dataset to view:

� Select option D, Select Dataset, from the Application Trace Facility Menu.

Result: The Select Dataset and Trace Parameters panel (Figure 62) is displayed.

Specifying the dataset nameYou can select a dataset that is in the process of capturing trace data, or one that contains data captured in the past. This allows you to view current data and to save that data for viewing later.

You can also select a dataset that is capturing or has captured data from any OMEGAMON II for DB2 session, not just the one that you are currently logged onto.

Note: Note: The dataset you select may be one in which application trace data has been captured, or one in which historical data extracted from SMF or GTF has been stored. Instructions for using the extractor are in the OMEGAMON II for DB2 Historical Reporting Guide.

FIGURE 62. Select Dataset and Trace Parameters Panel

Qualifying the data that displaysThe Select Dataset and Trace Parameters panel allows you to specify a subset of the data for display by filling in one or more of the qualifying fields. Limiting the amount of data reduces the overhead required to fulfill your request.

________________ ZATRD VTM O2 V540./C D31A mm/dd/yy 13:24:25 2> Help PF1 Back PF3> A.D==============================================================================> SELECT DATASET AND TRACE PARAMETERS ATRD+ Enter trace dataset which contains the captured trace, and additional+ (optional) selection criteria to limit trace information reported.+ When complete press ENTER+: DSN=____________________________________________ (Required): STARTDATE=________ (MM.DD.YY) STARTTIME=________ (HH.MM.SS): ENDDATE=________ (MM.DD.YY) ENDTIME=________ (HH.MM.SS): DB2ID=____ MVSID=____: PLANNAME=________ Plan name: AUTHID=________ DB2 authorization identifier: TSOUSER=________ TSO USERID (TSO foreground application): JOBNAME=________ Jobname (TSO batch application): CICSTRAN=____ CICS transaction identifier: CICSCONN=________ CICS connection identifier: PSBNAME=________ IMS PSB name ------------------------------------------------------------------------------

Page 161: OMEGAMON II for DB2 Tuning Guide, Version 540 - IBMpublib.boulder.ibm.com/tividd/td/ITOMEGAIIDB2/G251... · 2 OMEGAMON II for DB2 Tuning Guide, Version 540 Registered trademarks and

Analyzing Application Performance with ATF 161

Viewing the Dataset

Viewing the Dataset

Where do I start?To display the data stored in the dataset, or to view an active trace that is being captured in the dataset:

� Select option E, View Dataset, from the Application Trace Facility Menu.

Result: The Application Trace Thread Summary — View Dataset panel (Figure 63 on page 161) is displayed.

Application Trace Thread Summary-View Dataset panelThis panel contains the same thread summary data as the Application Trace Thread Summary panel (Figure 52 on page 140), with some exceptions. This panel displays fields that apply only to trace datasets (Trace Status, for example, is omitted), and includes some fields (like Start Date) that do not apply to active trace viewing.

Note: Note: Each time you navigate to this panel, or press Enter from the display, the data is refreshed (if the trace being captured is still active).

FIGURE 63. Application Trace Thread Summary—View Dataset Panel

Application Trace Unit of Work Summary panelWhen you zoom on a thread line, the Application Trace Unit of Work Summary panel (Figure 64 on page 162) is displayed. This panel is identical to the one that is displayed during the analysis of an active trace (Figure 53 on page 141), except it does not include the Date field as the first column.

________________ ZATVD VTM O2 V540./C $DB2 mm/dd/yy 15:50:05> Help PF1 Back PF3 Up PF7 Down PF8 Zoom PF11===========================================================================> APPLICATION TRACE THREAD SUMMARY -- VIEW DATASET ATVD++ DSN =TDO210.DO2.O2ATVSM$+ Start Date =mm/dd/yyyy Start Time =00:00:00+ End Date =mm/dd/yyyy End Time =24:00:00+ DB2ID =$DB2+ MVSID =SYSG+ PLANNAME =DSNESPRR++ Planname Connid Corrid Authid DB2 MVS InDB2 CPU Commits Aborts+ -------- -------- ------------ -------- ---- ---- --------- -------- ------+ DSNESPRR TSO TDO210A TDO210A D61A SYSG 3.692 6 0===========================================================================

Page 162: OMEGAMON II for DB2 Tuning Guide, Version 540 - IBMpublib.boulder.ibm.com/tividd/td/ITOMEGAIIDB2/G251... · 2 OMEGAMON II for DB2 Tuning Guide, Version 540 Registered trademarks and

Viewing the Dataset

162 OMEGAMON II for DB2 Tuning Guide, Version 540

FIGURE 64. Application Trace Unit of Work Summary Panel

From this point on, the sequence of panels is identical to those described in “Viewing Trace Data” on page 140.

________________ ZATVC VTM O2 V540./C $DB2 mm/dd/yy 15:50:42> Help PF1 Back PF3 Up PF7 Down PF8 Zoom PF11=============================================================================> APPLICATION TRACE UNIT OF WORK SUMMARY ATVC+ Planname=DSNESPRR Connid=TSO Corrid=TDO210A Authid=TDO210A++ Date Start Time Progname InDB2 Time InDB2CPU SQL Sorts Locks Rows+ ----- ------------ -------- ------------ -------- ------ ----- ------ -------+ 06/11 12:16:34.739 DSNESM68 00:02:11.127 1.303 253 1 44 173569+ 06/09 17:52:26.671 DSNESM68 00:00:46.801 1.236 253 1 27 173569+ 06/09 17:51:26.631 DSNESM68 00:00:13.965 .020 4 0 9 29+ 06/09 17:50:25.883 DSNESM68 00:00:00.072 .012 2 0 10 6+ 06/09 17:50:01.529 DSNESM68 00:00:05.352 .017 2 0 13 3+ 06/09 16:28:58.994 DSNESM68 00:00:41.879 1.104 4 1 44 173319=============================================================================

Page 163: OMEGAMON II for DB2 Tuning Guide, Version 540 - IBMpublib.boulder.ibm.com/tividd/td/ITOMEGAIIDB2/G251... · 2 OMEGAMON II for DB2 Tuning Guide, Version 540 Registered trademarks and

Analyzing Application Performance with ATF 163

Releasing the Dataset

Releasing the Dataset

Where do I start?To release the dataset from OMEGAMON II:

� Select option F, Stop View, from the Application Trace Facility Menu.

Result: The Stop Viewing Trace Dataset panel appears.

FIGURE 65. Stop Viewing Trace Dataset Panel

Stop viewing a datasetFollow the instructions on this panel when want to stop viewing the dataset. This step is required before you can redefine and/or recreate the dataset.

________________ ZATSD VTM O2 V540./C $DB2 mm/dd/yy 15:50:42> Help PF1 Back PF3==============================================================================> STOP VIEWING TRACE DATASET > To release the dataset from OMEGAMON, space over the > before ATSD and (>)> press ENTER. >ATSD==============================================================================

Page 164: OMEGAMON II for DB2 Tuning Guide, Version 540 - IBMpublib.boulder.ibm.com/tividd/td/ITOMEGAIIDB2/G251... · 2 OMEGAMON II for DB2 Tuning Guide, Version 540 Registered trademarks and

Releasing the Dataset

164 OMEGAMON II for DB2 Tuning Guide, Version 540

Page 165: OMEGAMON II for DB2 Tuning Guide, Version 540 - IBMpublib.boulder.ibm.com/tividd/td/ITOMEGAIIDB2/G251... · 2 OMEGAMON II for DB2 Tuning Guide, Version 540 Registered trademarks and

Analyzing IFCID Trace Data 165

Analyzing IFCID Trace Data

Chapter contentsOverview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 166Types of Information. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 166Starting an IFCID Trace . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 167Displaying IFCID Trace Data . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 167Stopping an IFCID Trace . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 168

7

Page 166: OMEGAMON II for DB2 Tuning Guide, Version 540 - IBMpublib.boulder.ibm.com/tividd/td/ITOMEGAIIDB2/G251... · 2 OMEGAMON II for DB2 Tuning Guide, Version 540 Registered trademarks and

Overview

166 OMEGAMON II for DB2 Tuning Guide, Version 540

Overview

The IFCID Trace facility allows you to trace various DB2 activities selectively and to store the resulting information in a sequential dataset. The Realtime Main menu includes an option for IFCID trace. To start the IFCID Trace facility, enter option I on the command line. As a result, the IFCID Trace menu displays. This menu allows you to

� select the IFCID records to trace and to start the IFCID trace

� display the collected trace data

� stop the IFCID trace

Types of Information IFCID Trace facility displays many types of information, which allow you to analyze DB2 performance from various perspectives. The categories of trace types are

� 1 - statistics

� 2 - accounting

� 3 - audit

� 4 - monitor

� 5 - performance

Each trace type (a one-digit number) consists of one or more trace classes. Each trace class (a two-digit number) represents one or more IFCID record types. For example, the statistics trace type consists of six trace classes:

� 01 - statistical data

� 02 - installation-defined statistics record

� 03 - deadlock and lock timeout information

� 04 - DB2 exception conditions

� 05 - data sharing global statistics

� 08 - buffer pool dataset statistics

By choosing the Statistical Data trace class, the following IFCID records within that class are displayed:

� 001 - statistical data collection

� 002 - statistical data collection

� 105 - record DBID/OBID translation data

� 106 - record DSNZPARM information

� 202 - dynamic system parameter information

Each IFCID record number is a three-digit number. Note that, in the Display IFCID Trace Collection panel, the leading zeroes may be omitted.

Page 167: OMEGAMON II for DB2 Tuning Guide, Version 540 - IBMpublib.boulder.ibm.com/tividd/td/ITOMEGAIIDB2/G251... · 2 OMEGAMON II for DB2 Tuning Guide, Version 540 Registered trademarks and

Analyzing IFCID Trace Data 167

Overview

Starting an IFCID TraceFrom the IFCID Trace menu, follow these steps:

1. enter the name of the dataset (DSN=) where the collected trace data will be stored. The dataset must have the following characteristics: � physical sequential

� variable length, blocked

� LRECL=32756

� BLKSIZE=32760

2. select the IFCIDs to be traced by trace type, trace class, or individual IFCID record numbers: � to select all IFCIDs associated with a trace type, enter S (Select all entries) next to the

trace type. You can select as many trace types as needed. After pressing Enter to confirm your selections, the IFCID trace begins immediately for the trace type or types selected.

� to select particular IFCIDs within a trace type, enter D (Display subentries) next to the trace type. After pressing Enter to confirm your selection, OMEGAMON II for DB2 displays the list of trace classes within the trace type. You can display the trace classes for only one trace type at a time.

� to select all IFCIDs in one or more trace classes, enter S next to each trace class. After pressing Enter to confirm your selections, the IFCID trace begins immediately.

� to select particular IFCIDs within a trace class, enter D next to the trace class. OMEGAMON II for DB2 displays one or more individual IFCID records associated with the trace class. Enter S next to one or more IFCIDs to start the trace for those selected IFCIDs. After pressing Enter to confirm your selections, the IFCID trace begins immediately.

At the point when you enter option S to select the IFCIDs (whether by trace type, trace class, or IFCID record number) and to start the IFCID trace, OMEGAMON II for DB2 asks you to confirm your selection. If you choose to alter your selection, you can enter option R (reset selection). OMEGAMON II for DB2 then allows you to re-enter your selections.

Displaying IFCID Trace DataTo display the collected IFCID trace data, enter B (Display) on the command line from the IFCID Trace menu. As a result, the Display IFCID Trace Collection panel displays. This panel provides the following fields:

Field Description

DSN= The user-specified dataset name provided when starting the IFCID trace.

Trace Records Lost The number of trace records that could not be written to the dataset. The rate at which trace records were built exceeded the rate at which the trace records were collected.

Page 168: OMEGAMON II for DB2 Tuning Guide, Version 540 - IBMpublib.boulder.ibm.com/tividd/td/ITOMEGAIIDB2/G251... · 2 OMEGAMON II for DB2 Tuning Guide, Version 540 Registered trademarks and

Overview

168 OMEGAMON II for DB2 Tuning Guide, Version 540

The header information for each IFCID Trace record is 64 bytes in length. The following table describes each field in the header information, in the sequence in which they appear.

Stopping an IFCID Trace To stop an IFCID trace, follow these steps:

1. Enter C on the command line of the IFCID Trace panel. The Stop IFCID Trace Collection panel displays.

2. As instructed by the text on the panel, remove the greater-than sign (>) to the left of the IFCS command, then press Enter. A system message displays to indicate that the IFCID Trace Stop request has been accepted and trace termination is in progress.

Status= The status of the IFCID trace facility. The status is either active or inactive.

Start time The timestamp when the IFCID trace started.

Run time The amount of time that the IFCID trace has been active.

ID The identification number associated with each IFCID record. The leading zeroes are omitted.

Count The number of times the event or action associated with an IFCID record took place.

Size The total amount of the collected IFCID data in bytes.

Description A brief description of the IFCID record’s contents.

Field Length (in bytes)

Record length 2 (hexadecimal)

QSAM fill characters 2 (hexadecimal)

Plan name 8 (character)

Date and time (in the form YYYYMMDDHHMMSSHH) 8 (hexadecimal)

Secondary authid (or primary authid) 8 (character)

Original authid 8 (character)

Connection identifier 8 (character)

Correlation identifier 12 (character)

DB2 system identifier 4 (character)

IFCID number 2 (numeric)

Number of self-defining sections 2 (numeric)

Field Description

Page 169: OMEGAMON II for DB2 Tuning Guide, Version 540 - IBMpublib.boulder.ibm.com/tividd/td/ITOMEGAIIDB2/G251... · 2 OMEGAMON II for DB2 Tuning Guide, Version 540 Registered trademarks and

Analyzing Distributed Data Performance 169

Analyzing DistributedData Performance

This chapter first examines the OMEGAMON II for DB2 panels that allow you to monitor overall DDF activity. Then we will look at the panel that displays distributed thread detail information. (For information about the thread summary panels, see “Distributed Thread Information” on page 88.)

You will find basic descriptions and field definitions for all these panels in the OMEGAMON for DB2 Reference Manual. This chapter explains how to use the DDF panels, and describes some of the most significant data fields.

Note: Some of the references in this chapter may not be familiar to you if you are not conversant with VTAM concepts and terminology. Tuning the DDF component of DB2 requires the skills of both the DB2 systems programmer and the VTAM systems programmer.

Chapter Contents Overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 170Distributed Data Facility Statistics . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 171Distributed Data Facility VTAM Summary. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 174Distributed Data Facility VTAM Detail . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 176Distributed Thread Detail . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 179

8

Page 170: OMEGAMON II for DB2 Tuning Guide, Version 540 - IBMpublib.boulder.ibm.com/tividd/td/ITOMEGAIIDB2/G251... · 2 OMEGAMON II for DB2 Tuning Guide, Version 540 Registered trademarks and

Overview

170 OMEGAMON II for DB2 Tuning Guide, Version 540

Overview

If you are using DB2's Distributed Data Facility to provide access to data that is stored in multiple DB2 locations, the panels described in this chapter will help you monitor your distributed activity.

DDF and CDBDB2's implementation of distributed data functions are provided through the Distributed Data Facility (DDF) address space, and the Communications Database (CDB).

� The Distributed Data Facility establishes communications between multiple DB2 subsystems, giving each its own active DDF address space. A DDF is defined to VTAM as a logical unit (LU), and it implements functions that use VTAM LU 6.2 services.

� The Communications Database contains information required by DDF to allow and control communication between DB2 subsystems.

Standard terminologyFor a thorough understanding of DB2's distributed functions, you should refer to the appropriate IBM documentation. The following definitions are provided to ensure that you are familiar with some standard terminology before you proceed.

conversation A specific instance of a VTAM session used to transfer data between two DB2 subsystems.

database access A type of thread that is created on a server DB2 subsystem in order to respond to an SQL request from a requestor DB2.

distributed allied

A type of thread that is created on a requestor DB2 subsystem in order to send an SQL request to a server DB2.

local DB2 The DB2 subsystem that OMEGAMON II is monitoring.

location A DB2 subsystem; also called a site.

remote DB2 A DB2 subsystem that is involved in information exchange with the local DB2.

request An SQL statement.

requestor A DB2 subsystem that requests information from another DB2.

server A DB2 subsystem that responds to a request for information from another DB2.

session An LU 6.2 link managed by VTAM to communicate between DB2 partners (logical units).

Page 171: OMEGAMON II for DB2 Tuning Guide, Version 540 - IBMpublib.boulder.ibm.com/tividd/td/ITOMEGAIIDB2/G251... · 2 OMEGAMON II for DB2 Tuning Guide, Version 540 Registered trademarks and

Analyzing Distributed Data Performance 171

Distributed Data Facility Statistics

Distributed Data Facility Statistics

The Distributed Data Facility Statistics panel (Figure 66) displays statistics about DDF activity, organized by remote DB2 location.

Distributed Data Facility Statistics panelFollowing is an example of the DDF Statistics panel.

FIGURE 66. Distributed Data Facility Statistics Panel

________________ ZDFST VTM O2 V540./C $DB2 mm/dd/yy 10:39:18> Help PF1 Back PF3 Up PF7 Down PF8> D.A> DISTRIBUTED DATA FACILITY: Enter a selection letter on the top line. > *-DDF STATISTICS B-DDF VTAM SUMMARY C-DDF VTAM DETAIL H-HISTORICAL=============================================================================> DISTRIBUTED DATA FACILITY STATISTICS DFST+ Collection Interval: REALTIME Start: 01/05 16:30:58+ Report Interval: 1 sec End: 01/05 16:31:00++ Location Name = D61A DDF Status = ACTIVE+ DDF CPU Rate = 00.0% Dist Allied Threads = 0+ Active DBATs = 0 Inactive DBATs = 0+ DDF Send Rate = 0K/sec DDF Receive Rate = 0K/sec+ Resync Attempts = 0 Resync Successes = 0+ Cold STart Connections = 0 Warm Start Connections = 0+ DBATs Queued = 0 Conversations Dealloc = 0+ HWM DB Access = 0 HWM Active DBATs = 0+ Max DB Access (MAXDBAT)= 500 HWM Inactive DBATs = 0+++ Remote Location Name = D23A Remote Location Luname = O2D23GA++ Conversations Queued = 0 Binds for Remote Access = 0+ Message Buffer Rows = 0 Block Mode Switches = 0+ Commits/Remote = 0 Rollbacks/Remote = 0+ Indoubts/Remote = 0++ Tran SQL Row Message Byte Commit Abort Conv Blocks+ ------- ------- ------- ------- -------- ------- ------- ------- -------+ Sent 1 10 0 11 4400 1 0 1 0+ Recv 0 0 15 10 6886 0 0 0 0++ Last 2-Phase Commit Backout+ 2-PHASE COMMIT: Prepare Agent Commit Backout Forget Resp Resp+ ------- ------- -------- ------- ------- ------- -------+ Sent 0 0 0 0 0 0 0+ Recv 0 0 0 0 0 0 0++ Remote Location Name = D23B Remote Location Luname = O2D23GB++ Conversations Queued = 0 Binds for Remote Access = 0+ Message Buffer Rows = 0 Block Mode Switches = 0+ Commits/Remote = 0 Rollbacks/Remote = 0+ Indoubts/Remote = 0++ Tran SQL Row Message Byte Commit Abort Conv Blocks+ ------- ------- ------- ------- -------- ------- ------- ------- -------+ Sent 1 10 0 11 4400 1 0 1 0+ Recv 0 0 16 10 6936 0 0 0 0++ Last 2-Phase Commit Backout+ 2-PHASE COMMIT: Prepare Agent Commit Backout Forget Resp Resp+ ------- ------- -------- ------- ------- ------- -------+ Sent 0 0 0 0 0 0 0+ Recv 0 0 0 0 0 0 0+=============================================================================

Page 172: OMEGAMON II for DB2 Tuning Guide, Version 540 - IBMpublib.boulder.ibm.com/tividd/td/ITOMEGAIIDB2/G251... · 2 OMEGAMON II for DB2 Tuning Guide, Version 540 Registered trademarks and

Distributed Data Facility Statistics

172 OMEGAMON II for DB2 Tuning Guide, Version 540

Statistics for remote DB2sOMEGAMON II identifies each remote DB2 that has acted as a requestor or server to the local DB2. For each of these remote DB2s, a set of statistics is displayed, including the number of transactions sent by and received from it, the number of conversations sent and received, and the number of conversations that had to be queued.

Local DB2 subsystemThe panel includes descriptive information about the local DB2 subsystem's DDF address space: CPU rate, send and receive rates, number of distributed allied threads, and so on.

DDF statusDDF Status tells you whether or not the local DB2's DDF is active. DDF can abend even though the local DB2 continues to run. Be aware that the DDF parameter in DSNZPARM has three possible values: NO means that DDF cannot be started; AUTO means that DDF starts automatically when DB2 is started; COMMAND means that you must issue a DB2 command to start DDF.

Max DB access threadsMax DB Access Threads is the maximum number of database access threads (DBATs) that can be concurrently active on a server DB2.

This value is set in DSNZPARM by the MAXDBAT parameter. (It does not include the number of distributed allied threads that the DB2 may create to be serviced by another DB2.) When this limit is reached, new distributed threads are queued on their requesting DB2s; they must wait for a DBAT to terminate before they can be serviced.

MDBT and MDBW exceptionsThe exceptions MDBT and MDBW help you monitor the level of DBAT activity. MDBT alerts you when a user-specified percentage of MAXDBAT is in use.

MDBW tells you that you have reached MAXDBAT, and it reports the number of threads that are waiting for a DBAT. If MDBW trips frequently, and you are not able to reduce the number of requesting threads, you should consider increasing the value of MAXDBAT.

DDF CPU rateDBATs execute in service request block (SRB) mode, dispatched from the DDF address space. The server DB2 writes a DBAT accounting record to record information such as DDF CPU time required to process each thread. The DDF CPU Rate field reflects the percentage of CPU usage that was devoted to DBATs, including time spent creating and terminating threads as well as the overhead associated with communication over VTAM.

DDF Send rateThe DDF Send Rate includes system-to-system communication, SQL requests sent to remote DB2s, and DB2 data sent to remote requestors. The DDF Receive Rate includes

Page 173: OMEGAMON II for DB2 Tuning Guide, Version 540 - IBMpublib.boulder.ibm.com/tividd/td/ITOMEGAIIDB2/G251... · 2 OMEGAMON II for DB2 Tuning Guide, Version 540 Registered trademarks and

Analyzing Distributed Data Performance 173

Distributed Data Facility Statistics

system-to-system communication, SQL requests received from remote DB2s, and DB2 data received from remote servers.

These values are good indicators of the communication load being placed on the local DB2, the local DDF, the local VTAM, and the connection between the DB2s. They also reflect the load on the remote DDFs, DB2s, and VTAMs, provided that they are not on the same MVS as the local DB2.

Remote DB2 subsystemsThis portion of the Distributed Data Facility Statistics panel provides statistics about the activity that has taken place between the local DB2 and all remote locations with which it has communicated. For each remote location, OMEGAMON II displays its name and its luname, followed by fields that reflect the amount of activity that has occurred.

Send/Receive activityEach type of activity (for example, transactions) has two entries. The top entry represents the amount of activity that has been sent to the remote location from this location. The bottom entry represents the amount of activity that has been received by the local DB2 from the remote location.

Conversations QueuedThe Conversations Queued field displays a value that represents the number of times that the local DB2 unsuccessfully attempted to begin a conversation with a remote DB2. An unsuccessful attempt can occur for either of the following reasons:

� The maximum allowed number of VTAM sessions is insufficient to meet the demand for conversations. This could happen because each concurrent OPEN CURSOR issued from a single thread requires its own VTAM session. Thus, a single thread could monopolize the available sessions.

If this is the case, you should contact your DB2 system administrator and/or your VTAM systems programmer to help you evaluate the need for more concurrent sessions.

� The MAXDBAT value for the remote DB2 has been reached. See the suggestions in the discussion of the MDBT and MDBW exceptions on page “MDBT and MDBW exceptions” on page 172.

Page 174: OMEGAMON II for DB2 Tuning Guide, Version 540 - IBMpublib.boulder.ibm.com/tividd/td/ITOMEGAIIDB2/G251... · 2 OMEGAMON II for DB2 Tuning Guide, Version 540 Registered trademarks and

Distributed Data Facility VTAM Summary

174 OMEGAMON II for DB2 Tuning Guide, Version 540

Distributed Data Facility VTAM Summary

The Distributed Data Facility VTAM Summary panel (Figure 67) provides VTAM-related information about the local DDF as well as about each remote DB2 that has a current connection to the local DB2.

FIGURE 67. Distributed Data Facility VTAM Summary Panel

Local DB2 SubsystemThe VTAM Luname is the name assigned within VTAM for use by the local DDF. It can be used during problem determination to review the status of VTAM connections. For example, you can use the following command to review the status of distributed sessions from VTAM's point of view.

D NET,ID=luname,SCOPE=ALL

VTAM SessionsThe VTAM Sessions field reflects the number of VTAM sessions that have been allocated for use by the local DDF. Some of these sessions may not be in use at all times (that is, no active conversation), but they remain available for the initiation of new conversations.

The VTAM Conversations field displays the number of actual sessions that are currently in use by active conversations (both DIST and DBAC).

Remote DB2 subsystemsThe lower portion of the VTAM summary panel displays one line of information for each remote DB2 that is in communication with the local DB2.

DIST ThreadThe DIST Thread field indicates how many distributed allied threads are allocated on the local DB2 in order to send requests to the remote DB2.

________________ ZDFVS VTM O2 V540./C $DB2 mm/dd/yy 10:39:18> Help PF1 Back PF3 Up PF7 Down PF8> D.B> DISTRIBUTED DATA FACILITY: Enter a selection letter on the top line. > A-DDF STATISTICS *-DDF VTAM SUMMARY C-DDF VTAM DETAIL=============================================================================> DISTRIBUTED DATA FACILITY VTAM SUMMARY DFVS+ VTAM Luname = O2D31GA VTAM Acbname = O2D31A+ VTAM Modetab = MODETAB1 VTAM Sessions = 16+ VTAM Version = 410 VTAM Conversations = 4++ Remote Remote VTAM VTAM DIST DIST DBAC DBAC+ Location Name Luname Ver Session Thread Conv Thread Conv+ ---------------- -------- ---- ------- ------ ----- ------ -----+ <L0048599> L0048599 N/A 4 0 0 2 2+ D23B O2D23GB 410 6 1 1 0 0+ D23A O2D23GA 410 6 1 1 0 0============================================================================

Page 175: OMEGAMON II for DB2 Tuning Guide, Version 540 - IBMpublib.boulder.ibm.com/tividd/td/ITOMEGAIIDB2/G251... · 2 OMEGAMON II for DB2 Tuning Guide, Version 540 Registered trademarks and

Analyzing Distributed Data Performance 175

Distributed Data Facility VTAM Summary

DIST ConversationsThe DIST Conv field indicates how many conversations are active between the local DB2, which is acting as a requestor, and the remote DB2, which is acting as a server. A conversation (called the primary user conversation) is allocated when an SQL request is first sent to a remote location, and it remains allocated for the life of the thread. If an application issues multiple OPEN CURSOR statements, requiring some cursors to be open simultaneously, a secondary conversation is allocated to process each OPEN CURSOR command. A secondary conversation terminates at COMMIT, at CLOSE CURSOR, or when the processing of the request is complete.

DBAC ThreadThe DBAC Thread field indicates how many database access threads are allocated on the local DB2 to service requests from remote DB2s.

DBAC ConversationsThe DBAC Conv field indicates how many conversations are active between the local DB2, which is acting as a server, and the remote DB2, which is acting as a requestor. A DBAC thread can process multiple concurrent requests (OPEN CURSORs) from its originating DIST thread. Thus, you may see a value for DBAC Conv that is greater than the value of DBAC Thread.

Page 176: OMEGAMON II for DB2 Tuning Guide, Version 540 - IBMpublib.boulder.ibm.com/tividd/td/ITOMEGAIIDB2/G251... · 2 OMEGAMON II for DB2 Tuning Guide, Version 540 Registered trademarks and

Distributed Data Facility VTAM Detail

176 OMEGAMON II for DB2 Tuning Guide, Version 540

Distributed Data Facility VTAM Detail

The Distributed Data Facility VTAM Detail panel (Figure 68) looks at DDF activity from a VTAM-session perspective. One line of information is displayed for each active VTAM session that is in use by the local DB2.

FIGURE 68. Distributed Data Facility VTAM Detail Panel

Conversation typesThere are four possible conversation types:

DBAC Conversations owned by database access threads will appear and disappear on the panel as the requesting threads issue requests to the local DB2.

DIST Conversations owned by distributed allied threads will appear and disappear on the panel as the local DB2 sends requests to remoteDB2s.

INAC Conversations owned by database access threads that became inactive. These will revert to DBAC again if more requests are issued across these threads to the local DB2.

SYST A system conversation remains active until the VTAM connection is broken.

AVAL No conversation is active on this VTAM session, so the session is available for use by a requesting thread.

________________ ZDFVD VTM O2 V540./C $DB2 mm/dd/yy 10:39:18> Help PF1 Back PF3 Up PF7 Down PF8 Zoom PF11> D.C> DISTRIBUTED DATA FACILITY: Enter a selection letter on the top line. > A-DDF STATISTICS B-DDF VTAM SUMMARY *-DDF VTAM DETAIL=============================================================================> DISTRIBUTED DATA FACILITY VTAM DETAIL DFVD+ VTAM Conv VTAM VTAM Time Since Conv+ Session ID Type Luname Logmode Last Req Status Planname+ ---------------- ---- -------- -------- ---------- ------------ --------+ E7B3A5A753EBF370 DIST O2D23GA IBMDB2LM 00:00:00.5 NOT-ACTIVE DSNESPCS+ E7B3A5A753EBF375 DIST O2D23GB IBMDB2LM 00:00:00.1 IN-VTAM+ CF0BD7A3459EEFF7 DBAC L0048599 IBMRDB 00:00:03.3 WAIT-VTAM DISTSERV+ CF0BD7A3459EEFF9 DBAC L0048599 IBMRDB 00:00:02.1 WAIT-VTAM DISTSERV+ E7B3A5A753EC0A57 INAC L0048599 IBMRDB 00:59:44.5 WAIT-VTAM+ E7B3A5A753EBF378 AVAL O2D23GA IBMDB2LM+ E7B3A5A753EBF379 AVAL O2D23GA IBMDB2LM+ E7B3A5A753EBF37A AVAL O2D23GB IBMDB2LM+ E7B3A5A753EBF37B AVAL O2D23GB IBMDB2LM+ CF0BD7A3449EEFF7 SYST L0048599 SNASVCMG+ E7B3A5A753EBF36F SYST O2D23GA IBMDB2LM+ E7B3A5A753EBF36E SYST O2D23GA IBMDB2LM+ E7B3A5A753EBF36D SYST O2D23GA SNASVCMG+ E7B3A5A753EBF376 SYST O2D23GB IBMDB2LM+ E7B3A5A753EBF377 SYST O2D23GB IBMDB2LM+ E7B3A5A753EBF374 SYST O2D23GB SNASVCMG============================================================================

Page 177: OMEGAMON II for DB2 Tuning Guide, Version 540 - IBMpublib.boulder.ibm.com/tividd/td/ITOMEGAIIDB2/G251... · 2 OMEGAMON II for DB2 Tuning Guide, Version 540 Registered trademarks and

Analyzing Distributed Data Performance 177

Distributed Data Facility VTAM Detail

DIST and DBAC conversationsDIST and DBAC conversation types appear at the top of the display. Output is sorted by elapsed time of threads owning the conversations. If a thread owns multiple conversations, the plan name will be displayed only for the first conversation. The Planname field will be blank for all other conversations owned by the thread.

VTAM LogmodeIf you notice that all or most sessions have the same VTAM Logmode, you may not be using the system as effectively as possible. VTAM session attributes are assigned by logmode, and it may not be efficient for all of your sessions to have the same request unit size and transmission priority, for example. An alternative is to assign one logmode to all the sessions associated with a particular connection type. That way, you can give higher transmission priority to CICS transactions than to batch transactions, and so on.

Time Since Last RequestThe Time Since Last Req field tells you how much time has passed since the last request was sent over this session/conversation.

Conversation StatusIf you observe a high elapsed time value for a particular session in the Time Since Last Request field, you should check the conversation's status (Conv Status field) and type to determine the probable cause of the delay.

NOT-ACTIVE

This means that the thread is processing within its own application, waiting for an SQL request. That is, no remote SQL requests are being processed.

IN-VTAM

This means that the thread is active on a conversation in VTAM. A high value for Time Since Last Req with this Conv Status suggests that you might have a problem thread (that is, the thread is hung), or that the server DB2 is sending a large quantity of data.

To determine which event is more likely, zoom on the thread in question by placing the cursor on the appropriate session ID line, and pressing PF11. The Distributed Thread Detail panel is displayed. You can check to see if any rows or bytes are being sent over the thread. If so, you can rule out the possibility that the thread is hung.

WAIT-VTAM

This means that the thread is waiting for VTAM to respond. If the Conversation Type is DBAC, the local DB2 is waiting for another SQL request from the remote requestor. This suggests that there is not much activity over this conversation from the requesting thread.

If the Conversation Type is DIST, the local DB2 is waiting for rows of data to be returned by the remote server DB2. This could mean that the SQL request is taking a long time to be processed on the server.

Page 178: OMEGAMON II for DB2 Tuning Guide, Version 540 - IBMpublib.boulder.ibm.com/tividd/td/ITOMEGAIIDB2/G251... · 2 OMEGAMON II for DB2 Tuning Guide, Version 540 Registered trademarks and

Distributed Data Facility VTAM Detail

178 OMEGAMON II for DB2 Tuning Guide, Version 540

Analyze conversation status for remote DB2sThe Conv Status field reflects only the conversation status on the local DB2 subsystem. You may need to ascertain the conversation status at the remote DB2 site as well. If you have OMEGAVIEW®, Candle's centralized status manager, you can switch to the remote DB2 to gather the information you need. Or, if you need to monitoranother DB2 subsystem on the same MVS, you can use the Other DB2 option (on the Realtime Main Menu) to select the desired DB2.

Analyze a threadTo analyze the thread associated with a particular conversation, place the cursor on the desired session line, and press PF11. The Distributed Thread Detail panel is displayed.

Page 179: OMEGAMON II for DB2 Tuning Guide, Version 540 - IBMpublib.boulder.ibm.com/tividd/td/ITOMEGAIIDB2/G251... · 2 OMEGAMON II for DB2 Tuning Guide, Version 540 Registered trademarks and

Analyzing Distributed Data Performance 179

Distributed Thread Detail

Distributed Thread Detail

The Distributed Thread Detail panel (Figure 70) displays information about an individual thread's VTAM APPC conversations as well as statistics about the thread's distributed activity.

FIGURE 69. (Part 1 of 2) Distributed Thread Detail Panel

> Help PF1 Back PF3 > THREAD INFORMATION: Enter a selection letter on the top line. > A-THREAD DETAIL B-LOCK COUNTS C-LOCK WAITS D-LOCKS OWNED E-GLOBAL LOCKS> F-CURRENT SQL G-SQL COUNTS H-DISTRIBUTED I-BUFFER POOL J-GROUP BP> K-PACKAGES L-RES LIMIT M-PARALLEL TASKS N-UTILITY O-OBJECTS> P-CANCEL THREAD Q-DB2 CONSOLE R-DSN ACTIVITY S-APPL TRACE=============================================================================> DISTRIBUTED THREAD DETAIL PLAN AUTHID=TDO214+ Thread: Plan=DSNESPCS Connid=TSO Corrid=TDO214 Authid=TDO214+ Attach: TSO Userid=TDO214 Region asid= 152+ Dist : Type=DISTRIBUTED ALLIED, Luwid=USCACO01.O2D61A.A9C49652CE71=12 rsum+ Distributed VTAM APPC Conversations++ VTAM VTAM Last VTAM Last VTAM Time Since Conv VTAM+ Luname Modename APPC Req APPC Qual Last Req Status Session ID+ -------- -------- --------- --------- ---------- ---------- ----------------+ O2D23GB IBMDB2LM RECEIVE SPEC 00:00:00.1 IN-VTAM E7B3A5A753EBF375+ O2D23GA IBMDB2LM RECEIVE SPEC 00:00:00.5 NOT-ACTIVE E7B3A5A753EBF370++ Distributed SQL Statistics++ Remote Location Name = D23A Remote Location Luname = O2D23GA++ Protocol Used = SYSTEM Conversations Queued = 0+ Block Mode Switches = 0 Message Buffer Rows = 951+ Bind Remote Access = 0 Max Allocated Conv = 1+ Conv Allocated = 1 Conv Deallocated = 0+ Indoubt/Remote = 0 Commit/Remote = 0+ Rollback/Remote = 0 Remote CPU Time = .415+ Dist Local Elapsed = 00:00:07.898 Dist Remote Elapsed = 00:00:08.686++ Tran SQL Row Message Byte Commit Abort Conv Blocks+ ------- ------- ------- ------- -------- ------- ------- ------- -------+ Sent 1 2 0 2 1358 0 0 1 0+ Recv 0 0 951 14 371308 0 0 0 13++ Last 2-Phase Commit Backout+ 2-PHASE COMMIT: Prepare Agent Commit Backout Forget Resp Resp+ ------- ------- -------- ------- ------- ------- -------+ Sent 0 0 0 0 0 0 0+ Recv 0 0 0 0 0 0 0

Page 180: OMEGAMON II for DB2 Tuning Guide, Version 540 - IBMpublib.boulder.ibm.com/tividd/td/ITOMEGAIIDB2/G251... · 2 OMEGAMON II for DB2 Tuning Guide, Version 540 Registered trademarks and

Distributed Thread Detail

180 OMEGAMON II for DB2 Tuning Guide, Version 540

FIGURE 70. (Part 2 of 2) Distributed Thread Detail Panel

How to accessYou can access this panel in two ways:

� From the Distributed Data Facility VTAM Detail panel, zoom on a VTAM session/conversation line to the thread that owns that conversation.

� From either of the distributed thread summary panels (Distributed Allied or Distributed Database Access threads), zoom on a thread line.

For information about the distributed thread summary panels, see “Analyzing Thread Information” on page 75.

Distributed thread ID lineThe distributed thread ID line (Dist:) appears only when you have zoomed on a distributed allied thread. To determine the logical unit of work ID (luwid) for a database access thread, you must monitor the requesting DB2 subsystem.

Luwid fieldTake note of the value in the Luwid field (particularly the token ID at the end of the field). You can use this value in DB2 commands, for example, CANCEL DDF THREAD.

Distributed VTAM APPC ConversationsThe center section of the Distributed Thread Detail panel displays one line of output for each active conversation that is owned by the thread.

The field called Last VTAM APPC Req displays the same value as the VTAM macro CONTROL= (used in DB2-to-DB2 communication). Last VTAM APPC Qual displays the same value as the VTAM macro QUALIFY=. The values in these fields determine which LU 6.2 functions have been requested by DB2. This information is useful in determining

++ Remote Location Name = ALL LOCATIONS++ Protocol Used = SYSTEM Conversations Queued = 0+ Block Mode Switches = 0 Message Buffer Rows = 951+ Bind Remote Access = 0 Max Allocated Conv = 1+ Conv Allocated = 1 Conv Deallocated = 0+ Indoubt/Remote = 0 Commit/Remote = 0+ Rollback/Remote = 0 Remote CPU Time = .415+ Dist Local Elapsed = 00:00:07.904 Dist Remote Elapsed = 00:00:08.686++ Tran SQL Row Message Byte Commit Abort Conv Blocks+ ------- ------- ------- ------- -------- ------- ------- ------- -------+ Sent 2 2 0 3 2560 0 0 2 0+ Recv 0 0 951 14 371308 0 0 0 13++ Last 2-Phase Commit Backout+ 2-PHASE COMMIT: Prepare Agent Commit Backout Forget Resp Resp+ ------- ------- -------- ------- ------- ------- -------+ Sent 0 0 0 0 0 0 0+ Recv 0 0 0 0 0 0 0=============================================================================

Page 181: OMEGAMON II for DB2 Tuning Guide, Version 540 - IBMpublib.boulder.ibm.com/tividd/td/ITOMEGAIIDB2/G251... · 2 OMEGAMON II for DB2 Tuning Guide, Version 540 Registered trademarks and

Analyzing Distributed Data Performance 181

Distributed Thread Detail

possible reasons for hung distributed threads, because it tells you what communication has taken place between DB2, DDF, and VTAM.

Values for Req and Qual fieldsThe following list provides possible value combinations for the Req and Qual fields, and describes them.

Req=ALLOC Qual=ALLOCD

Asks VTAM to allocate a session to the provided VTAM destination luname, using the provided VTAM modename.

Req=SEND Qual=DATA

Buffers the data in VTAM, but does not actually send the data out on the network. The data flows to the other DDF when VTAM receives a FLUSH command (either explicit or implicit).

Req=SEND Qual=FLUSH

Causes data to flow from the sending DDF to the receiving DDF (explicit flush).

Req=RECEIVE Qual=SPEC

Instructs VTAM to send out data for this conversation only (implicit flush). If VTAM finds that any data has been received from the network for this conversation, it gives the data to DDF. If no information has been received, the RECEIVE remains in effect until some qualified data arrives for this conversation.

Req=RCVFMH5

DDF has requested FMH5 data from VTAM. A function management header type 5 is used to carry the request for a conversation to be established between the two DDFs' transaction programs. Req=PREPRCV Qual=DATAFLU causes data to be sent on the session and then prepares to receive data on the same session.

Note: The significance of the Time Since Last Req field and the Conv Status field is explained on page 177.

Distributed SQL StatisticsThe fields in this section of the panel may appear more than once. If a thread has communicated with multiple DB2 subsystems, there will be one set of SQL statistics for each location.

Sent/Received

Each sent/received field generates two rows of output. The top row represents the amount of activity (for example, transactions, bytes, commits) that has been sent to the remote location using this thread. The bottom row represents the amount of activity that has been received by the local DB2 from the remote location using this thread.

Page 182: OMEGAMON II for DB2 Tuning Guide, Version 540 - IBMpublib.boulder.ibm.com/tividd/td/ITOMEGAIIDB2/G251... · 2 OMEGAMON II for DB2 Tuning Guide, Version 540 Registered trademarks and

Distributed Thread Detail

182 OMEGAMON II for DB2 Tuning Guide, Version 540

Conversations Queued

The Conversations Queued field should display a value of 0. If its value is greater than 0, your transaction response time is being impacted. See the discussion of conversations on the Distributed Data Facility Statistics panel (Figure 66 on page 171).

Page 183: OMEGAMON II for DB2 Tuning Guide, Version 540 - IBMpublib.boulder.ibm.com/tividd/td/ITOMEGAIIDB2/G251... · 2 OMEGAMON II for DB2 Tuning Guide, Version 540 Registered trademarks and

Analyzing DB2 Objects 183

Analyzing DB2 Objects

This chapter explains how to use the OMEGAMON II for DB2 object analysis panels to improve system response times while reducing power and storage demands.

The sections that follow describe how to isolate the cause of slowdowns to a particular DB2 object or volume, and how to balance your system's I/O load to improve performance.

Chapter Contents Overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 184Analyzing Poor Response Time for a Volume . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 185Excessive Activity in Buffer Pool 0 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 188

9

Page 184: OMEGAMON II for DB2 Tuning Guide, Version 540 - IBMpublib.boulder.ibm.com/tividd/td/ITOMEGAIIDB2/G251... · 2 OMEGAMON II for DB2 Tuning Guide, Version 540 Registered trademarks and

Overview

184 OMEGAMON II for DB2 Tuning Guide, Version 540

Overview

DB2 object analysis is the process of evaluating DB2 objects from an allocation, object activity and volume activity perspective.

OMEGAMON II's object analysis panels enable you to view in-depth information about

� I/O activity by DB2 object

� DASD activity by volume

� buffer pool utilization

� thread I/O activity

TerminologyA DB2 object is any element that can be created with SQL—that is, databases, tables, table spaces, indexes, and views.

Page 185: OMEGAMON II for DB2 Tuning Guide, Version 540 - IBMpublib.boulder.ibm.com/tividd/td/ITOMEGAIIDB2/G251... · 2 OMEGAMON II for DB2 Tuning Guide, Version 540 Registered trademarks and

Analyzing DB2 Objects 185

Analyzing Poor Response Time for a Volume

Analyzing Poor Response Time for a Volume

This section explains how to identify DB2 objects that are causing certain volumes to have slow response times.

ScenarioIn this scenario, a new DB2 application has recently been added to your system, and you want to monitor system response time by volume.

Where do I start?To begin the analysis of your system's response time by volume:

� Select option O, Object Analysis, from the Realtime Main Menu.

Result: The Object Allocation Summary panel appears. This panel displays allocation-related information at the database level.

At the Object Allocation Summary panel:

� Type C at the command line, and press Enter.

Result: The Volume Activity Summary panel appears.

Volume Activity Summary panelThe Volume Activity Summary panel shows the activity of all volumes in the system, which allows you to evaluate DASD performance by volume.

FIGURE 71. Volume Activity Summary Panel

________________ ZOJVS VTM O2 V540./C $DB2 mm/dd/yy 7:46:20 2> Help PF1 Back PF3 Up PF7 Down PF8 Sort PF10 Zoom PF11>> OBJECT ANALYSIS: Enter a selection letter on the top line.>> A-OBJECT ALLOCATIONS B-OBJECT ACTIVITY *-VOLUME ACTIVITY> D-EXTEND ACTIVITY E-DISPLAY OPTIONS F-COLLECTOR CONTROL==============================================================================> VOLUME ACTIVITY SUMMARY OJVS+ Interval Time = 00:05:00 Interval Elapsed = 00:03:57+ *+ Vol Vol Total DB2 % DB2 Alloc Alloc Exts/+ Volume Unit Util% Serv I/O I/O I/O DSNs Exts DSN+ ------ ---- ------ ------ ------- ------- ------ ------ ------ ------+ DBCR01 0160 2.1% 2.1 101135 619 47.2% 19 87 4.0+ DBCR02 0163 .5% 4.8 12789 265 20.2% 8 34 4.0+ DBCR03 0166 9.2% 17.4 56817 105 8.0% 10 45 4.0+ DBCR05 0167 .0% 16.8 147 73 5.5% 14 256 18.0+ DBCR06 017B 8.2% 15.2 58945 249 18.9% 3 37 12.0==============================================================================

Page 186: OMEGAMON II for DB2 Tuning Guide, Version 540 - IBMpublib.boulder.ibm.com/tividd/td/ITOMEGAIIDB2/G251... · 2 OMEGAMON II for DB2 Tuning Guide, Version 540 Registered trademarks and

Analyzing Poor Response Time for a Volume

186 OMEGAMON II for DB2 Tuning Guide, Version 540

Identify the problem volumeThe Volume Activity Summary panel shows that volume DBCR03 has exceeded its threshold for Vol Serv (volume service) with a value of 17.4. The volume service field represents the average service time for the volume since the beginning of the collection interval. This high volume service value suggests that one or more heavily used objects are causing a problem on that volume.

You must now zoom to the volume database level to see which DB2 dataset is causing the problem. To zoom to the database level:

� Place your cursor on DBCR03, and press F11.

Result:The Volume Database Activity panel is displayed.

Identify the problem databaseThe Volume Database Activity panel shows I/O activity for the selected volume from a DB2 database perspective. A line of output is generated for each database that has incurred I/O to the volume during the collection interval.

Note: If you move the cursor to any entry in a column and press PF10, OMEGAMON II will sort on that column.

FIGURE 72. Volume Database Activity Panel

A highlighted value in the Vol Use % field reveals that database USCUSTDB has exceeded its threshold for volume use, and is responsible for a large percentage of the DB2 I/O activity.

To obtain more information about database USCUSTDB:

� Place your cursor on USCUSTDB, and press F11.

Result: The Volume Spacename Activity panel is displayed.

_______________ ZOJV1 VTM O2 V540./C $DB2 mm/dd/yy 7:46:20 2> Help PF1 Back PF3 Up PF7 Down PF8 Sort PF10 Zoom PF11>> OBJECT ANALYSIS: Enter a selection letter on the top line.>> *-VOLUME DB ACTIVITY B-VOLUME SERVICE C-THREAD ACTIVITY==============================================================================> VOLUME DATABASE ACTIVITY OJV1+ Interval Time = 00:05:00 Interval Elapsed = 00:04:02+ Volume/Unit = DBCR06/017B Total I/O Rate/sec = 2.9+ Device Type = 3390 DB2 I/O Rate/sec = .8+ *+ Vol ------I/O Rates----- -------I/O Counts------+ Database DSNS Exts Use % Total Read Write Total Read Write+ -------- ---- ---- ------ ------ ------ ------ ------- ------- -------+ USCOMMON 1 1 8.5% .0 .0 .0 9 9 0+ USCUSTDB 34 94 98.4% 6.6 6.6 .0 201351 20 1351+ USMISMM 1 1 19.0% .0 .0 .0 20 20 0+ USPMPREF 1 2 21.5% .0 .0 .0 25 21 0+ USPRDIST 1 2 22.5% .0 .0 .0 25 21 0==============================================================================

Page 187: OMEGAMON II for DB2 Tuning Guide, Version 540 - IBMpublib.boulder.ibm.com/tividd/td/ITOMEGAIIDB2/G251... · 2 OMEGAMON II for DB2 Tuning Guide, Version 540 Registered trademarks and

Analyzing DB2 Objects 187

Analyzing Poor Response Time for a Volume

Identify the problem pagesetThe Volume Spacename Activity panel displays a list of all thetable spaces and index spaces used by database USCUSTDB.

FIGURE 73. Volume Spacename Activity Panel

The Vol Use % field on this panel shows that index spaces XS000321 and XS000350 have exceeded their thresholds for use of Volume DBCR03.

Resolving the performance problemAfter identifying the spacenames with high volume usage, you can move them to a less active volume. (In this example, you can move either index space, because they have almost the same amount of I/O activity.)

Result: I/O activity is more balanced across the volumes, and response time is improved.

_______________ ZOJV2 VTM O2 V540./C $DB2 mm/dd/yy 7:46:20 2> Help PF1 Back PF3 Up PF7 Down PF8 Sort PF10 Zoom PF11>> OBJECT ANALYSIS: ENTER A SELECTION ON THE TOP LINE>> *-VOLUME SP ACTIVITY C-THREAD ACTIVITY==============================================================================> VOLUME SPACENAME ACTIVITY OJV2+ Interval Time = 00:05:00 Interval Elapsed = 00:04:06+ Volume/Unit = DBCR06/017B Total I/O Rate/sec = 2.9+ Device Type = 3390 DB2 I/O Rate/sec = .8++ Database = USCMPT+ *+ Vol ------I/O Rates----- -------I/O Counts------+ Spacenam DSNs Exts Use % Total Read Write Total Read Write+ -------- ---- ---- ------ ------ ------ ------ ------- ------- -------+ XS000321 1 5 52.8% .0 .0 .0 13 8 0+ XS000350 1 3 48.0% .0 .0 .0 12 10 0==============================================================================

Page 188: OMEGAMON II for DB2 Tuning Guide, Version 540 - IBMpublib.boulder.ibm.com/tividd/td/ITOMEGAIIDB2/G251... · 2 OMEGAMON II for DB2 Tuning Guide, Version 540 Registered trademarks and

Excessive Activity in Buffer Pool 0

188 OMEGAMON II for DB2 Tuning Guide, Version 540

Excessive Activity in Buffer Pool 0

This section explains how to detect when a DB2 application is creating too much activity in a buffer pool space, and how to resolve the problem.

ScenarioIn this scenario, you are a DBA analyzing a system in which one of the DB2 applications is monopolizing activity in buffer pool 0. Among the possible causes of this situation are heavy online and batch activities, and SQL calls that are performing tablespace scans.

Where do I start?To identify any object that is causing slow response time in DB2:

� Select option B, from the Object Allocation Summary panel, and press Enter.

Result: The Object Activity Summary panel is displayed.

Object Activity Summary panelThe Object Activity Summary panel allows high-level analysis of getpage and I/O activity from a DB2 database perspective.

FIGURE 74. Object Activity Summary Panel

Identify the problem objectOn the Object Activity Summary panel, look at the % of Getp field to identify which database has exceeded its threshold for buffer pool utilization. This field displays the percentage of total getpage activity for each database.

________________ ZOJOS VTM O2 V540./C $DB2 mm/dd/yy 7:46:44 2> Help PF1 Back PF3 Up PF7 Down PF8 Sort PF10 Zoom PF11>> OBJECT ANALYSIS: Enter a selection letter on the top line.>> A-OBJECT ALLOCATIONS *-OBJECT ACTIVITY C-VOLUME ACTIVITY> D-EXTEND ACTIVITY E-DISPLAY OPTIONS F-COLLECTOR CONTROL==============================================================================> OBJECT ACTIVITY SUMMARY OJOS+ INTERVAL TIME = 00:05:00 INTERVAL ELAPSED = 00:04:39+ TOTAL GETPAGE = 820095 TOTAL I/O = 115134+ *+ % of % of Getp Sync Pre Async Other+ Database Getp I/O per RIO Getpage Read Fetch Write Write+ -------- ------ ------ ------- ------- ------- ------- ------- -----+ DSNDB01 3.9% 43.0% 1.6 848 508 0 6 0+ DSNDB06 2.1% 7.7% 4.9 463 93 0 0 0+ DSNDB07 13.4% .3% 2897.0 2897 0 0 4 0+ USCOMMON .0% 1.3% 1.6 20 12 0 4 0+ USCUSTDB 23.0% 34.8% 12.5 4982 391 6 19 0+ USMISMM 9.1% 6.7% 24.7 1979 74 6 0 0+ USPMPREF 21.7% 3.2% 120.3 4694 33 6 0 0+ USPRDIST 26.3% 2.0% 270.6 5684 5 16 4 1+ USSHADOW .0% .5% .5 3 3 3 0 0==============================================================================

Page 189: OMEGAMON II for DB2 Tuning Guide, Version 540 - IBMpublib.boulder.ibm.com/tividd/td/ITOMEGAIIDB2/G251... · 2 OMEGAMON II for DB2 Tuning Guide, Version 540 Registered trademarks and

Analyzing DB2 Objects 189

Excessive Activity in Buffer Pool 0

The % of Getp field indicates that databases USPRDIST, USCUSTDB and USPMPREF have exceeded their thresholds. To identify which table space or index space within the database is the most active, you must zoom to the database level.

On the Object Activity Summary panel:

� Place your cursor on USCUSTDB, and press F11.

Result: The Database Activity panel appears.

Identify the problem pagesetThe Database Activity panel shows getpage and I/O activity for all spaces owned by the selected database. It displays information about getpage and I/O activity for the current interval.

FIGURE 75. Database Activity Panel

In this example, the Database Activity panel shows that index space XS000150 has exceeded its threshold with a % of Getp value of 67.2%. The % of Getp field displays the percentage of total getpage activity for each spacename.

Verify the space locationTo verify that the problem space is located in BP0, at the command line:

� Type A, and press Enter.

Result: The Database Allocations panel is displayed.

________________ ZOJO1 VTM O2 V540./C $DB2 mm/dd/yy 7:45:56 2> Help PF1 Back PF3 Up PF7 Down PF8 Sort PF10 Zoom PF11>> OBJECT ANALYSIS: Enter a selection letter on the top line.>> A-DATABASE ALLOCS *-DATABASE ACTIVITY C-THREAD ACTIVITY D-DISPLAY OPTIONS==============================================================================> DATABASE ACTIVITY OJO1+ Interval Time = 00:05:00 Interval Elapsed = 00:04:51+ Total Getpage = 13344 Total I/O = 2698++ Database = USCUSTDB+ *+ % of % of Getp Sync Pre Async Other+ Spacenam Getp I/O per RIO Getpage Read Fetch Write Write+ -------- ------ ------ ------- ------- ------- ------- ------- -----+ TS000109 23.6% 26.9% 11.6 1232 106 0 9 0+ TS000186 1.9% 14.0% 1.6 100 60 0 0 0+ TS000227 1.3% 16.4% 1.0 69 67 2 1 0+ XS000150 67.2% 23.9% 35.3 3500 99 0 3 0+ XS000321 .1% 2.5% 1.4 10 7 0 4 0+ XS000350 .1% 1.6% 2.0 10 1 4 2 0==============================================================================

Page 190: OMEGAMON II for DB2 Tuning Guide, Version 540 - IBMpublib.boulder.ibm.com/tividd/td/ITOMEGAIIDB2/G251... · 2 OMEGAMON II for DB2 Tuning Guide, Version 540 Registered trademarks and

Excessive Activity in Buffer Pool 0

190 OMEGAMON II for DB2 Tuning Guide, Version 540

FIGURE 76. Database Allocations Panel

On this panel, you can determine that the space name belongs to an index space that is using BP0.

Resolving the performance problemOnce you have determined that XS000150 is the index space that is monopolizing buffer pool 0, redistribute the work load by moving XS000150 to a less active buffer pool.

Result: Response time is improved.

________________ ZOJA1 VTM O2 V540.G7 D61A mm/dd/yy 9:29:28 2> Help PF1 Back PF3 Up PF7 Down PF8 Sort PF10 Zoom PF11>> OBJECT ANALYSIS: Enter a selection letter on the top line.>> *-DATABASE ALLOCS B-DATABASE ACTIVITY C-DISPLAY OPTIONS=============================================================================> DATABASE ALLOCATIONS OJA1+ Database = USCUSTDB Total Spaces = 40 Total Datasets = 40+ *+ Spacenam Type BP Vols DSNs Exts Exts/DSN Max Exts+ -------- ---- -- ---- ---- ---- -------- --------+ TS000057 TBLS 0 1 1 1 1.0 1+ TS000074 TBLS 0 1 1 2 2.0 2+ TS000109 SEGM 0 1 1 1 1.0 1+ TS000186 SEGM 0 1 1 1 1.0 1+ TS000201 SEGM 0 1 1 1 1.0 1+ TS000213 SEGM 0 1 1 1 1.0 1+ TS000227 SEGM 0 1 1 1 1.0 1+ TS000243 SEGM 0 1 1 1 1.0 1+ XS000057 INDX 0 1 1 1 1.0 1+ XS000074 INDX 0 1 1 2 2.0 2+ XS000096 INDX 0 1 1 1 1.0 1+ XS000150 INDX 0 1 1 9 9.0 9+ XS000160 INDX 0 1 1 1 1.0 1+ XS000161 INDX 0 1 1 1 1.0 1+ XS000162 INDX 0 1 1 1 1.0 1+ XS000163 INDX 0 1 1 1 1.0 1+ XS000164 INDX 0 1 1 1 1.0 1+ XS000165 INDX 0 1 1 1 1.0 1=============================================================================

Page 191: OMEGAMON II for DB2 Tuning Guide, Version 540 - IBMpublib.boulder.ibm.com/tividd/td/ITOMEGAIIDB2/G251... · 2 OMEGAMON II for DB2 Tuning Guide, Version 540 Registered trademarks and

Analyzing DB2 Resource Manager Performance 191

Analyzing DB2 ResourceManager Performance

This chapter describes the OMEGAMON II panels available to monitor DB2's resource managers and bind statistics.

Chapter Contents Overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 192Buffer Manager. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 194Analyzing Buffer Pool Performance. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 196Log Manager . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 202Log Dataset Information. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 204EDM Pool . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 205EDM Pool Tuning Indications . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 208EDM Pool Snapshot . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 210Bind Statistics . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 213

10

Page 192: OMEGAMON II for DB2 Tuning Guide, Version 540 - IBMpublib.boulder.ibm.com/tividd/td/ITOMEGAIIDB2/G251... · 2 OMEGAMON II for DB2 Tuning Guide, Version 540 Registered trademarks and

Overview

192 OMEGAMON II for DB2 Tuning Guide, Version 540

Overview

OMEGAMON II provides information about several DB2 resource managers as well as other system-related information. This information is critical in the performance tuning of your DB2 subsystem.

Where do I start?To access the resource manager and bind statistics panels:

� Select option R, Resource Managers, from the Realtime Main Menu.

Result: The DB2 Resource Managers and Other DB2 Subsystem Information menu is displayed.

Resource Managers and Other DB2 Subsystem Information panelFollowing is an example of the Resource Managers and Other DB2 Subsystem Information panel.

FIGURE 77. Resource Managers and Other DB2 Subsystem Information Menu

Several of the selections on this menu also provide access to a set of panels that display near-term history. Any panel that has the H(istorical) option at the top of the panel can take you to the corresponding near-term history panel. For more information about the near-term history panels, see the OMEGAMON II for DB2 Reference Manual.

More informationFor information about

� the buffer manager, see “Buffer Manager” on page 194.

� the log manager, see “Log Manager” on page 202.

� the EDM pool, see “EDM Pool” on page 205.

________________ ZRMMENU VTM O2 V540./C $DB2 mm/dd/yy 07:56:29> Help PF1 Back PF3> R.> Enter a selection letter on the top line.=============================================================================> RESOURCE MANAGERS AND OTHER DB2 SUBSYSTEM INFORMATION _ A BUFFER MANAGER ......... Buffer manager information_ B LOG MANAGER ............ DB2 log manager information_ C EDM POOL ............... EDM pool information_ D BIND STATISTICS ........ Bind statistics_ E SUBSYSTEM MANAGER ...... DB2 subsystem support manager statistics_ F ACTIVE TRACES .......... Current trace activity_ G START-UP OPTIONS........ IRLM and Stored Procedures Start-Up Options_ H DSNZPARM ............... DB2 installation parameters_ I LOCK/CLAIM/DRAIN........ Lock Manager/Claim/Drain Statistics_ J SQL/RID POOL/PARALLEL... SQL/RID Pool/Parallelism/Stored Proc. Information_ K OPEN/CLOSE STATISTICS... Dataset open and close statistics_ L DB2 COMMANDS............ DB2 Command Statistics=============================================================================

Page 193: OMEGAMON II for DB2 Tuning Guide, Version 540 - IBMpublib.boulder.ibm.com/tividd/td/ITOMEGAIIDB2/G251... · 2 OMEGAMON II for DB2 Tuning Guide, Version 540 Registered trademarks and

Analyzing DB2 Resource Manager Performance 193

Overview

� bind statistics, see “Bind Statistics” on page 213.

Page 194: OMEGAMON II for DB2 Tuning Guide, Version 540 - IBMpublib.boulder.ibm.com/tividd/td/ITOMEGAIIDB2/G251... · 2 OMEGAMON II for DB2 Tuning Guide, Version 540 Registered trademarks and

Buffer Manager

194 OMEGAMON II for DB2 Tuning Guide, Version 540

Buffer Manager

The buffer manager governs the interaction of DB2 with the operating system's virtual storage. All DB2 operations against DB2 data make use of buffer pool storage managed by the buffer manager.

The buffer manager's major tasks are the following:

� Controls the movement of pages between DASD and virtual and expanded storage (hiperpools), keeping as much data as possible in virtual and expanded storage. (Hiperpools are not supported in DB2 Version 8.1)

� Updates those pages and helps other DB2 subcomponents maintain the integrity of the data.

Where do I start?For information about the buffer manager:

� Select option A, Buffer Manager, from the Resource Manager menu.

Result: The Buffer Manager Information panel is displayed.

Buffer Manager Information panelThe Buffer Manager Information panel (Figure 78) gives you information about all dataset open and close activity since DB2 was started. It also gives you an overview of current buffer pool activity.

FIGURE 78. Buffer Manager Information Panel

________________ ZBMGR VTM O2 V540./C D31A mm/dd/yy 13:25:48 2 Help PF1 Back PF3 Up PF7 Down PF8 Sort PF10 Zoom PF11 R.A.A *-BUFFER POOL B-GROUP BUFFER POOL============================================================================== BUFFER MANAGER INFORMATION BMGR Current Number Open Datasets = 30 High Water Mark Open Datasets = 30 Maximum Number Open Datasets Allowed = 200 Open Dataset Count In Active Pools = 30 * Pool VP HP Pages Pages Getp Read Prefetch Write ID Size Size Alloc In Use Rate I/O Rate Req Rate I/O Rate ------ ------ ------- ------ ------ -------- -------- -------- -------- BP0 1500 777 1500 0 .00 .00 .00 .00 BP1 56 10 0 0 .00 .00 .00 .00 BP10 5 0 0 0 .00 .00 .00 .00 BP14 55 0 0 0 .00 .00 .00 .00 ------------------------------------------------------------------------------

Page 195: OMEGAMON II for DB2 Tuning Guide, Version 540 - IBMpublib.boulder.ibm.com/tividd/td/ITOMEGAIIDB2/G251... · 2 OMEGAMON II for DB2 Tuning Guide, Version 540 Registered trademarks and

Analyzing DB2 Resource Manager Performance 195

Buffer Manager

Open Dataset Count in Active PoolsA high value in this field suggests that some datasets are being opened and closed too frequently. Since this activity uses a great deal of CPU time and elapsed time, it is desirable for applications to leave their datasets open after each transaction is processed.

Maximum Number Open Datasets AllowedThis field reflects the setting of DSMAX in the DSNZPARM module. DB2 uses this value to determine how much initial memory to allocate for datasets at startup. For MVS/ESA Version 4 and above, the absolute maximum number of datasets that can be open at one time is determined by the TIOT SIZE specified in SYS1.PARMLIB(ALLOCxx). Prior to MVS/ESA Version 4, the value that actually determines the number of datasets that can be open at one time is DEFTIOTS, which is a field in the IEFAB445. For more information about DEFTIOTS, see IBM's Application Reference Guide under “Installation Options for SVC 99 Functions”.

Buffer pool data fieldsThe data that appears in the columns at the bottom of the panel provides a snapshot of the activity in the buffer pools. When a pool is inactive (for example, has no open datasets), all the fields in that row contain zeros, except for the VP Size and HP Size fields. If a pool is active, Pages Alloc should equal VP Size, and Pages In Use should be less than VP Size.

Page 196: OMEGAMON II for DB2 Tuning Guide, Version 540 - IBMpublib.boulder.ibm.com/tividd/td/ITOMEGAIIDB2/G251... · 2 OMEGAMON II for DB2 Tuning Guide, Version 540 Registered trademarks and

Analyzing Buffer Pool Performance

196 OMEGAMON II for DB2 Tuning Guide, Version 540

Analyzing Buffer Pool Performance

Where do I start?For information about a particular buffer pool’s performance:

� Move the cursor to the desired buffer pool line on the Buffer Manager panel, and press PF11.

Result: The Buffer Pool Detail panel is displayed.

Buffer Pool Detail panelThe Buffer Pool Detail panel, shown in Figure 80 on page 198, displays information about the selected pool.

Page 197: OMEGAMON II for DB2 Tuning Guide, Version 540 - IBMpublib.boulder.ibm.com/tividd/td/ITOMEGAIIDB2/G251... · 2 OMEGAMON II for DB2 Tuning Guide, Version 540 Registered trademarks and

Analyzing DB2 Resource Manager Performance 197

Analyzing Buffer Pool Performance

FIGURE 79. (Part 1 of 2) Buffer Pool Detail Panel

______________ ZBP VTM O2 V540./C $DB2 mm/dd/yy 12:45:03> Help PF1 Back PF3 Up PF7 Down PF8> R.A>> A-BUFFER POOL SNAPSHOT H-HISTORICAL=============================================================================> BUFFER POOL DETAIL BP 0+ Collection Interval: REALTIME Start: 05/27 16:38:06+ Report Interval: 7 min End: 05/27 16:44:54++ Virtual Buffer Pool Size= 200 Hiperpool Size = 1000+ VPOOL Buffers Allocated = 200 HPOOL Buffers Allocated = 0+ VPOOL Buffers in Use = 45 HPOOL Buffers to be Deleted = 0+ VPOOL Buffers to be Del = 0 Castout Attribute = YES+ Use Count = 16+ Hiperspace names = @001D31A @002D31A @003D31A @004D31A++ VP Sequential Thresh = 80% HP Sequential Thresh = 80%+ Deferred Write Thresh = 50% Vert Deferred Write Thresh = 10%+ VP Parallel Seq Thresh = 50%++ Getpages per Sync I/O = 21.83 Pages Written per Write I/O = 20.80+ Prefetch per I/O = 1.03 Pages Read per Prefetch = 14.80+ Seq Prefetch per I/O = 1.03 Pages Read per Seq Prefetch = 14.80+ List Prefetch per I/O = .00 Pages Read per List Prefetch= .00+ Dyn Prefetch per I/O = .00 Pages Read per Dyn Prefetch = .00+ Max Concur Prefetch I/O = 12 Workfile Maximum = 0+ BP Hit Percentage = 93.7% HP Hit Percentage = 0.0%+ HP Read-to-Write Percentage = 0.0%++ TOTAL INTERVAL /SECOND /THREAD /COMMIT+ QUANTITY QUANTITY ( 408) ( 0) ( 0)+ -------- -------- ------- ------- -------+ Getpage Requests 1649561 0 .00 .00 .00+ Getpage Requests - Sequential 1640061 0 .00 .00 .00+ Getpage Requests - Random 9500 0 .00 .00 .00+ Getpage Failed - VPOOL Full 0 0 .00 .00 .00+ Getpage Failed - Cond Request 0 0 .00 .00 .00++ Sync Read I/O Operations 75566 0 .00 .00 .00+ Sync Read I/Os - Sequential 5066 0 .00 .00 .00+ Sync Read I/Os - Random 70566 0 .00 .00 .00+ Page-in Required for Read I/O 0 0 .00 .00 .00+ Pages Read via Seq Prefetch 423645 0 .00 .00 .00+ Seq Prefetch I/O Operations 27679 0 .00 .00 .00+ Sequential Prefetch Requests 27654 0 .00 .00 .00+ Pages Read via List Prefetch 225 0 .00 .00 .00+ List Prefetch I/O Operations 200 0 .00 .00 .00+ List Prefetch Requests 967 0 .00 .00 .00+ Pages Read via Dyn Prefetch 45 0 .00 .00 .00+ Dyn Prefetch I/O Operations 79 0 .00 .00 .00+ Dynamic Prefetch Requests 122 0 .00 .00 .00+ Prefetch Failed - No Buffer 40 0 .00 .00 .00+ Prefetch Failed - No Engine 0 0 .00 .00 .00

Page 198: OMEGAMON II for DB2 Tuning Guide, Version 540 - IBMpublib.boulder.ibm.com/tividd/td/ITOMEGAIIDB2/G251... · 2 OMEGAMON II for DB2 Tuning Guide, Version 540 Registered trademarks and

Analyzing Buffer Pool Performance

198 OMEGAMON II for DB2 Tuning Guide, Version 540

FIGURE 80. (Part 2 of 2) Buffer Pool Detail Panel

Monitoring buffer pool thresholdsA number of fixed and variable thresholds govern DB2's use of virtual bufferpools and hiperpools (hiperpools are not supported in DB2 Version 8.1). Each time DB2 reaches one of the thresholds described in the following sections, OMEGAMON II increments a corresponding field on the Buffer Pool Detail panel. If a particular buffer pool is triggering exceptions too often, you will need to go back and examine the thresholds that are set for that particular buffer pool.

______________ ZBP VTM O2 V540./C $DB2 mm/dd/yy 12:45:03+ HP Pages Read Sync 0 0 .00 .00 .00+ HP Pages Read Async - No ADM 0 0 .00 .00 .00+ HP Pages Read Async - ADM 0 0 .00 .00 .00+ HP Read Failed - No ADM 0 0 .00 .00 .00+ HP Read Failed - ADM 0 0 .00 .00 .00++ Parallel Group Requests 0 0 .00 .00 .00+ Prefetch I/O Streams Reduced 60 0 .00 .00 .00+ Parallelism Downgraded 0 0 .00 .00 .00+ Prefetch Quan Reduced to 1/2 0 0 .00 .00 .00+ Prefetch Quan Reduced to 1/4 0 0 .00 .00 .00++ Pages Updated 736525 0 .00 .00 .00+ Pages Written 122861 0 .00 .00 .00+ Page-in Required for Write I/O 0 0 .00 .00 .00+ Write I/O Operations 5904 0 .00 .00 .00+ Immediate (Sync) Writes 4 0 .00 .00 .00+ Write Engine Not Available 0 0 .00 .00 .00++ HP Pages Written Sync 0 0 .00 .00 .00+ HP Pages Written Async - No ADM 0 0 .00 .00 .00+ HP Pages Written Async - ADM 0 0 .00 .00 .00+ HP Write Failed - No ADM 0 0 .00 .00 .00+ HP Write Failed - ADM 0 0 .00 .00 .00++ Vert Defer Wrt Threshold Reached 43 0 .00 .00 .00+ Deferred Write Threshold Reached 1229 0 .00 .00 .00+ Data Manager Threshold Reached 537 0 .00 .00 .00++ Successful VPOOL Expand/Contract 3 0 .00 .00 .00+ Successful HPOOL Expand/Contract 1 0 .00 .00 .00+ VPOOL or HPOOL Expand Failed 0 0 .00 .00 .00++ Successful Dataset Opens 79 0 .00 .00 .00+ DFHSM Recall 5 0 .00 .00 .00+ DFHSM Recall Timeouts 0 0 .00 .00 .00++ Sort Merge Passes 22 0 .00 .00 .00+ Sort/Merge Workfile Requests 62 0 .00 .00 .00+ Sort/Merge Workfile Req Denied 0 0 .00 .00 .00+ Sort Merge Pass - Buff Short 0 0 .00 .00 .00+ Workfile Prefetch Disabled 0 0 .00 .00 .00+ Workfile Create Failed - No Buff 0 0 .00 .00 .00+ Destructive Read Requests 3820 0 .00 .00 .16+ Destructive Read Page Dequeue 1605 0 .00 .00 .16=============================================================================

Page 199: OMEGAMON II for DB2 Tuning Guide, Version 540 - IBMpublib.boulder.ibm.com/tividd/td/ITOMEGAIIDB2/G251... · 2 OMEGAMON II for DB2 Tuning Guide, Version 540 Registered trademarks and

Analyzing DB2 Resource Manager Performance 199

Analyzing Buffer Pool Performance

Fixed thresholdsFixed thresholds cannot be changed. When a fixed threshold is reached too often, you may need to change the size of a buffer pool by using DB2's ALTER BUFFERPOOL command.

Variable thresholdsYou can change the following thresholds by issuing the ALTER BUFFERPOOL command.

DMTH The data management threshold. This threshold is checked before a page is read or updated. DMTH is maintained for each buffer pool, and is reached when DB2 uses 95% of the total buffer pool. Reaching this threshold, which invokes row level locking instead of page level locking, results in a significant increase in CPU use. This threshold corresponds to the Data Manager Threshold Reached field on the Buffer Pool Detail panel.

IWTH The immediate write threshold is reached when DB2 uses 97.5% of the total buffer pool. This threshold, which corresponds to the Immediate (Sync) Writes field, counts pages flagged for immediate write as a result of exceeding the IWTH threshold, checkpoint processing, and close database processing.

SPTH The sequential prefetch threshold is reached when DB2 uses 90% of the total buffer pool; this results in the disabling of sequential prefetch. Each time this threshold is reached, OMEGAMON II increments Prefetch Failed - No Buffer field.

DWQT The deferred write threshold reflects the percentage of the virtual buffer pool that is occupied by unavailable pages. This threshold corresponds to the Deferred Write Thresh field on the Buffer Pool Detail panel. The Deferred Write Threshold Reached field reflects the number of times the DWQT was reached. When this threshold is exceeded, write operations are scheduled in order to decrease the unavailable pages in the virtual buffer pool to 10% below the threshold.

HPSEQT The hiperpool sequential steal threshold determines the percentage of the hiperpool that can be occupied by sequentially accessed pages. When HPSEQT=0, sequentially accessed pages are not stored in the hiperpool. This threshold corresponds to the HP Sequential Thresh field on the Buffer Pool Detail panel.

VDWQT The vertical deferred write threshold reflects the percentage of the virtual buffer pool that might be occupied by updated pages from a dataset. This threshold corresponds to the Vert Deferred Write Thresh field on the Buffer Pool Detail panel.

Page 200: OMEGAMON II for DB2 Tuning Guide, Version 540 - IBMpublib.boulder.ibm.com/tividd/td/ITOMEGAIIDB2/G251... · 2 OMEGAMON II for DB2 Tuning Guide, Version 540 Registered trademarks and

Analyzing Buffer Pool Performance

200 OMEGAMON II for DB2 Tuning Guide, Version 540

Immediate Sync WritesYou need not be concerned about Immediate (Sync) Writes and Deferred Write Threshold Reached as long as DMTH is 0.

SPTH and DMTH thresholdsThe key thresholds are SPTH in a batch environment and DMTH in both batch and online environments. Therefore, you should keep the Prefetch Failed - No Buffer and Data Manager Threshold Reached fields at 0, which may require increasing the buffer pool size. The amount of real and expanded storage available may be a constraint, however. Also, review the impact on system paging.

I/O informationThe I/O information allows you to see how busy your DB2 subsystem is (Sync Read I/O Operations and Write I/O Operations) and how efficiently it is running (Getpages per Sync I/O and Pages Written per Write I/O). A low ratio (less than 5:1) of read or write requests to I/Os may indicate that DB2 has inadequate virtual storage for the amount of data it is required to store.

Quantity and rate informationThe quantity and rate fields for Getpage Requests, Sequential, Dynamic, and List Prefetch Requests, Pages Updated, and Pages Written are other indications of the level of activity in your DB2 subsystem. Take note if the Prefetch Failed - No Buffer value is greater than 10% of the Prefetch Requests quantity. This means that sequential prefetch is failing repeatedly due to insufficient buffer space, and you may need to expand the buffer pool, or increase the VPSEQT if it is set too low.

DFHSM recallIn a production system, DFHSM Recall should always be 0. If it is not, you may want to instruct the person who manages DASD resources not to migrate these datasets. If the number of DFHSM Recall Timeouts seems high, consider increasing the timeout interval in DSNZPARM or tuning the recall procedure to be more timely.

VPSEQT The sequential steal threshold determines the percentage of the virtual buffer pool that can be occupied by sequentially accessed pages. When VPSEQT=0, prefetch is disabled. This threshold corresponds to the VP Sequential Thresh field.

VPPSEQT The virtual buffer pool parallel sequential steal threshold is the percentage of the buffer pool that can support parallel I/O operations. Setting VPPSEQT to zero disables parallel I/O operations. This threshold corresponds to the VP Parallel Seq Thresh field.

Page 201: OMEGAMON II for DB2 Tuning Guide, Version 540 - IBMpublib.boulder.ibm.com/tividd/td/ITOMEGAIIDB2/G251... · 2 OMEGAMON II for DB2 Tuning Guide, Version 540 Registered trademarks and

Analyzing DB2 Resource Manager Performance 201

Analyzing Buffer Pool Performance

Buffer pool snapshot informationOMEGAMON II buffer pool snapshot panels provide detailed information for each open dataset and pageset in a specified buffer pool. The following figure is an example of the Buffer Pool Snapshot Datasets panel.

FIGURE 81. Buffer Pool Snapshot Datasets Panel

When examining buffer pool snapshot information, you may want to see which dataset or pageset is using the most pages in the buffer pool.

For more information about buffer pool snapshot panels and fields, see the OMEGAMON II for DB2 Reference Manual.

________________ ZBPSD VTM O2 V540./C $DB2 mm/dd/yy 16:44:54 2> Help PF1 Back PF3 Up PF7 Down PF8>=============================================================================> BUFFER POOL SNAPSHOT DATASETS> BPSD+ BP: 0 Pageset Name: TMDBBP5.TMTSBP5 Type: TABLESPACE Open Datasets: 2++ Dataset Name: TDDB231A.DSNDBC.TMDBBP5.TMTSBP5.I0001.A001++ VP Pages Current = 16 HP Pages Current = 0+ VP Pages Maximum = 16 HP Pages Maximum = 0+ VP Pages Changed = 0 VP Pages Changed Maximum = 1+ Sync I/O Total Pages = 3+ Sync I/O Average Delay = 25 Sync I/O Maximum Delay = 38+ Async I/O Average Delay = 12 Async I/O Maximum Delay = 22+ Async I/O Total Pages = 22 Async I/O Total I/O Count = 4+ Group BP Dependent = Yes Group Interest Level = R/W++ Dataset Name: TDDB231A.DSNDBC.TMDBBP5.TMTSBP5.I0001.A002++ VP Pages Current = 24 HP Pages Current = 0+ VP Pages Maximum = 32 HP Pages Maximum = 0+ VP Pages Changed = 0 VP Pages Changed Maximum = 8+ Sync I/O Total Pages = 3+ Sync I/O Average Delay = 15 Sync I/O Maximum Delay = 23+ Async I/O Average Delay = 12 Async I/O Maximum Delay = 12+ Async I/O Total Pages = 22 Async I/O Total I/O Count = 3+ Group BP Dependent = Yes Group Interest Level = R/W=============================================================================

Page 202: OMEGAMON II for DB2 Tuning Guide, Version 540 - IBMpublib.boulder.ibm.com/tividd/td/ITOMEGAIIDB2/G251... · 2 OMEGAMON II for DB2 Tuning Guide, Version 540 Registered trademarks and

Log Manager

202 OMEGAMON II for DB2 Tuning Guide, Version 540

Log Manager

The log manager maintains the DB2 log and archive datasets, which store copies of all DB2 alterations and checkpoint information. This function helps assure the integrity of your data.

Where do I start?For information about the log manager:� Select option B, Log Manager, from the Resource Manager menu.

Result: The Log Manager Information panel is displayed.

DB2 Log Manager Information panelThe DB2 Log Manager Information panel (Figure 82) provides an overview of the DB2 log manager's activity since DB2 was last started.

FIGURE 82. DB2 Log Manager Information Panel

______________ ZLOGM VTM O2 V540./C $DB2 mm/dd/yy 17:40:46> Help PF1 Back PF3 Up PF7 Down PF8 Zoom PF11> R.B>> H-HISTORICAL=============================================================================> DB2 LOG MANAGER INFORMATION LOGM+ Collection Interval: REALTIME Start: 10/23 10:35:32+ Report Interval: 3 min End: 10/23 10:38:28++ Logging Mode = DUAL Archiving Mode = DUAL+ Number of Logs Defined = 3 Number of Logs Available = 1+ Checkpoint Frequency = 1000 Records until Checkpoint = 743.*+ Number of Checkpoints = 26 Time Last Checkpoint = 10/23 10:20:25.* im 610530+ Input Buffer Size = 28K Output Buffer Size = 400K+ Write Threshold = 20 Current Log Record RBA = 00004585EA26++ Primary Active Log = TDDB231A.LOGCOPY1.DS02+ Secondary Active Log = TDDB231A.LOGCOPY2.DS02++ TOTAL INTERVAL /SECOND /THREAD /COMMIT+ QUANTITY QUANTITY ( 176) ( 0) ( 0)+ -------- -------- ------- ------- -------+ Reads from Output Buffers 0 0 .00 .00 .00+ Reads from Active Log 1717 0 .00 .00 .00+ Reads from Archive Log 0 0 .00 .00 .00+ Reads Delayed - Tape Contention 0 0 .00 .00 .00+ Reads Delayed - No Tape Unit 0 0 .00 .00 .00+ Look-Ahead Tape Mounts Attempted 0 0 .00 .00 .00+ Look-Ahead Tape Mounts Performed 0 0 .00 .00 .00++ Write NOWAIT Requests 24222 0 .00 .00 .00+ Write FORCE Requests 108 0 .00 .00 .00+ Write Delayed - No Buffer 0 0 .00 .00 .00++ Write Active Log Buffers 1414 0 .00 .00 .00+ Active Log CIs Created 1962 0 .00 .00 .00+ Archive Log Read Allocations 0 0 .00 .00 .00+ Archive Log Write Allocations 2 0 .00 .00 .00+ Archive Log CIs Offloaded 3492 0 .00 .00 .00+ BSDS Access Requests 349 0 .00 .00 .00=============================================================================

Page 203: OMEGAMON II for DB2 Tuning Guide, Version 540 - IBMpublib.boulder.ibm.com/tividd/td/ITOMEGAIIDB2/G251... · 2 OMEGAMON II for DB2 Tuning Guide, Version 540 Registered trademarks and

Analyzing DB2 Resource Manager Performance 203

Log Manager

Number of logs available

The Number of Logs Available value should always be at least 1 to facilitate DB2 processing. When no logs are available for DB2 to write to, its processing stops.

Checkpoint frequency

The value that appears in the Checkpoint Frequency field (defined in DSNZPARM LOGLOAD) tells you how many log records DB2 will write between checkpoints. If this value is very low, the system will perform frequent (costly) checkpoint operations. If it is too high, your restart time will be excessive. You must weigh these factors and decide on the proper balance for your environment.

Note: To determine how long it takes your system to write the number of records specified in LOGLOAD, observe the Records until Checkpoint field. If it cycles between the LOGLOAD value and zero in 10 to 15 minutes (as recommended by IBM), your checkpoint frequency is probably adequate.

Read and write activityThe Log Manager Information panel shows detailed read and write activity for the active and archive logs. Some of the information available, along with its implications, is summarized below.

Write Delayed - No Buffer

This field should always be 0. If it is not, your output buffer (DSNZPARM OUTBUFF) may be too small, the write threshold (DSNZPARM WRTHRSH) may be too high, or your DB2 log writes may be taking too long.

Reads from Archive Log

If Reads from Archive Log is high, your active log may be too small, requiring DB2 to perform time-consuming reads from archive logs that may exist on tape. Other possible reasons are that some programs may not be performing commits as frequently as they should, or that one or more threads are performing database recovery.

Archive Log Read or Write Allocations

If Archive Log Read Allocations or Archive Log Write Allocations seems high, you may need to enlarge your active log datasets so DB2 won't be required to archive so frequently. A rule of thumb is to size each active log dataset, plus the bootstrap dataset (BSDS), so that it completely fills a single tape when archived.

Zooming for detailsThe current active, secondary, and archive log datasets are listed at the bottom of the Log Manager Information display. For more information about these datasets, you may zoom to the Log Dataset Information panel.

Page 204: OMEGAMON II for DB2 Tuning Guide, Version 540 - IBMpublib.boulder.ibm.com/tividd/td/ITOMEGAIIDB2/G251... · 2 OMEGAMON II for DB2 Tuning Guide, Version 540 Registered trademarks and

Log Dataset Information

204 OMEGAMON II for DB2 Tuning Guide, Version 540

Log Dataset Information

The DB2 Log Dataset Information panel (see Figure 83) presents data related to the size of the active and archival log datasets, and the rate at which DB2 is filling them.

Where do I start?To reach the Log Dataset Information panel:

� Zoom on a dataset name on the Log Manager Information panel.

Result: The Log Dataset Information panel is displayed.

DB2 log dataset information

FIGURE 83. DB2 Log Dataset Information Panel

Log percent usedYou can use the Log Percent Used field to estimate when DB2 will switch to its next log dataset.

When a log dataset is being archived, information about this process appears at the bottom of the display. When DB2 is waiting for a tape to be mounted, the Output Volser field is blank and the Archive In Progress field is highlighted.

______________ ZLOGD VTM O2 V540./C $DB2 mm/dd/yy 18:11:23> Help PF1 Back PF3=============================================================================> DB2 LOG DATASET INFORMATION LOGD+ Primary Active Log Is TDDB201.LOGCOPY1.DB01+ Log Percent Used = 16% Log Dataset Size = 122879+ Beginning Log RBA = 0000002D0000 Ending Log RBA = 0000002EDFFF+ Current Log RBA = 0000002D4C4B+ Log Volser = DB2L01++ Secondary Active Log Is TDDB201.LOGCOPY2.DB01+ Log Percent Used = 16% Log Dataset Size = 122879+ Beginning Log RBA = 0000002D0000 Ending Log RBA = 0000002EDFFF+ Current Log RBA = 0000002D4C4B+ Log Volser = DB2L02++ Archive In Progress For TDDB201.ARCLOG1.DB01+ Begin RBA = 00000001 End RBA to Archive = 4011004+ High RBA Archived = 00003980 Percent Archive Complete = 36%+ Output Device Type = TAPE6+ Output Volser = DB0001=============================================================================

Page 205: OMEGAMON II for DB2 Tuning Guide, Version 540 - IBMpublib.boulder.ibm.com/tividd/td/ITOMEGAIIDB2/G251... · 2 OMEGAMON II for DB2 Tuning Guide, Version 540 Registered trademarks and

Analyzing DB2 Resource Manager Performance 205

EDM Pool

EDM Pool

The environmental descriptor management (EDM) pool contains cursor tables (CTs), package tables (PTs), skeleton cursor tables (SKCTs), skeleton package tables (SKPTs), database descriptors (DBDs), and dynamic SQL caches (DSCs) that describe the execution environment of a DB2 application. You can view information about these elements on the EDM Pool Information panel, shown in Figure 84 on page 206.

Note: For DB2 Version 6.1 and above, you can choose to locate the dynamic SQL cache in a dataspace rather than in the EDM pool. If you choose to use a dataspace, the dynamic SQL cache has no impact on the EDM pool.

Where do I start?For information about the EDM pool:� Select option C, EDM Pool, from the Resource Manager menu.

Result: The EDM Pool Information panel is displayed.

EDM Pool Information panelFollowing is an example of the EDM Pool Information panel.

Page 206: OMEGAMON II for DB2 Tuning Guide, Version 540 - IBMpublib.boulder.ibm.com/tividd/td/ITOMEGAIIDB2/G251... · 2 OMEGAMON II for DB2 Tuning Guide, Version 540 Registered trademarks and

EDM Pool

206 OMEGAMON II for DB2 Tuning Guide, Version 540

FIGURE 84. EDM Pool Information Panel

Measuring EDM pool performanceEDM pool performance is measured in terms of the volume of requests to the pool in relation to the percentage of loads from DASD (directory database DSNDB01) and the number of load failures because the EDM pool was full or fragmented. (A failure occurs when DB2 needs to load an object to allow an application to execute, and there isn't enough contiguous storage to load the object.)

General EDM pool informationThe EDM Pool Information panel displays the number of requests since DB2 was started, the number of requests in the last cycle, and the rate of requests (per second). The top

______________ ZEDMP VTM O2 V540./C $DB2 mm/dd/yy 17:41:02> Help PF1 Back PF3>> A-EDM POOL SNAPSHOT H-HISTORICAL=============================================================================> EDM POOL INFORMATION EDMP+ Collection Interval: REALTIME Start: 06/26 17:40:56+ Report Interval: 6 sec End: 06/26 17:41:02++ Pool Usage Pages Pct Percent of Total EDM Pool+ ----------- ------- ---- |---10---20---30---40---50---60---70---80---90--100|+ In Use 49 20% |---------> . . . . . . . .|+ DBDs 26 10% |----> . . . . . . . . .|+ CTs 23 9% |----> . . . . . . . . .|+ PTs 0 0% | . . . . . . . . . .|+ Available 201 80% |---------------------------------------> . .|+ SKCTs 21 8% |--->. . . . . . . . . .|+ SKPTs 0 0% | . . . . . . . . . .|+ SQL CACHE 373 0% | . . . CACHE IN DATASPACE. . . .|+ Free 180 72% |-----------------------------------> . . .|+ Total Pages 250 100% |---10---20---30---40---50---60---70---80---90--100|++ TOTAL INTERVAL /SECOND /THREAD /COMMIT+ QUANTITY QUANTITY ( 6) ( 64) ( 365)+ -------- -------- ------- ------- -------+ Failures due to EDM Pool Full 0 0 .00 .00 .00++ Database Descriptor (DBD) Reqs 14896 22 3.67 .34 .06+ DBD Loads 7 0 .00 .00 .00+ % of DBD Loads from DASD .05% .00% N/C N/C N/C++ Cursor Table (CT) Reqs 222096 426 71.00 6.66 1.17+ CT Loads 28 0 .00 .00 .00+ % of CT Loads from DASD .01% .00% N/C N/C N/C++ Package Table (PT) Reqs 0 0 .00 .00 .00+ PT Loads 0 0 .00 .00 .00+ % of PT Loads from DASD .00% .00% N/C N/C N/C++ Dynamic Sql (DSC) Reqs 0 0 .00 .00 .00+ DSC Loads 0 0 .00 .00 .00+ % of DSC Loads from DASD .00% .00% N/C N/C N/C=============================================================================

Page 207: OMEGAMON II for DB2 Tuning Guide, Version 540 - IBMpublib.boulder.ibm.com/tividd/td/ITOMEGAIIDB2/G251... · 2 OMEGAMON II for DB2 Tuning Guide, Version 540 Registered trademarks and

Analyzing DB2 Resource Manager Performance 207

EDM Pool

part of the panel contains both a graphic and numeric representation of the current pool usage, which is based on DB2 statistics information.

Snapshot valuesThe pool usage values displayed on the EDM Pool Information panel are snapshot values taken when you refresh the panel by pressing Enter, or when you generate a DB2 historical statistics trace record. The values displayed, therefore, are not high-water marks. You can use the pool usage data to analyze the current status of the pool in realtime displays, but for historical purposes the data is almost meaningless (because it is impossible to determine how high the values were at any particular point during a 15-minute interval). Keep in mind that DB2 statistics information doesn't indicate whether or not the available space is fragmented.

Size of EDM poolThe bottom half of the EDM Pool Information panel displays performance information that can help you determine the appropriate size for the EDM pool. The displayed values include the following:

Note: No calculation is performed for some fields, because the result would not be a meaningful value. These fields display n/c (not calculated) instead of a numeric value.

In Use Includes DBDs, CTs, and PTs. This value includes both active and inactive DBD pages.

Available Includes SKCTs, SKPTs, DSCs, and free storage pages.

Notice that SKCT, SKPT, and DSC usage is not included in the calculation of the In Use value. Since SKCTs, SKPTs, and DSCs are reusable for CTs, PTs, and DBDs on a least recently used (LRU) basis, it would exaggerate total pool usage if the SKCT, SKPT, and DSC usage values were included.

You can calculate the number of free pages in your EDM pool by subtracting the number of SKCT, SKPT, and DSC pages from the available pool usage count.

Total Quantity Total quantity since DB2 startup.

Interval Quantity Interval quantity for the report interval displayed.

/Second Value per second.

/Thread Value per thread.

/Commit Value per commit.

Page 208: OMEGAMON II for DB2 Tuning Guide, Version 540 - IBMpublib.boulder.ibm.com/tividd/td/ITOMEGAIIDB2/G251... · 2 OMEGAMON II for DB2 Tuning Guide, Version 540 Registered trademarks and

EDM Pool Tuning Indications

208 OMEGAMON II for DB2 Tuning Guide, Version 540

EDM Pool Tuning Indications

There are several indications that an increase in the size of your EDM pool may be warranted. They are discussed in the sections that follow.

Loads required for EDM pool requestsThe number and rate of loads required for EDM pool requests should be low to contribute to DB2 efficiency. (The DBD Loads, CT Loads and PT Loads fields include occasions when data was retrieved from a buffer pool as well as occasions when data was retrieved from DASD.) If either value seems high, you should consider enlarging the EDM pool.

High load valuesA high value in any of the fields that report the number of times a request resulted in a load from DASD (% of DBD Loads from DASD, % of CT Loads from DASD, % of PT Loads from DASD, or % of DSC Loads from DASD) may be another indication that DB2 is too frequently required to go outside the pool to retrieve needed data. These values should be 20% or lower to be acceptable.

Note: Since DBDs tend to be very large objects (40k or more), and must be loaded in their entirety, you should size the EDM pool to minimize DBD loads.

Failures due to EDM Pool FullThe value in the Failures due to EDM Pool Full field should always be zero in a production environment where response time and availability are important. Load failures indicate that the storage pool size of your environment is too small to support the number and size of your DB2 objects, or that the allocated storage has become fragmented. Some EDM pool objects (such as DBDs and SKCT headers and directories) must be loaded into contiguous storage. If these objects are very large, fragmentation and load failures may become more of a problem.

The value in this field may sometimes be greater than zero, even though Available Pages is not low. This combination indicates that the EDM pool space is fragmented (in other words, you have many small chunks of storage and not enough large storage blocks). Fragmentation of free storage space can cause load failures to occur even when pool usage fields are low. If the failure count is very high, increasing the size of the EDM pool may improve the situation.

EDMU exceptionThe EDM Pool utilization exception (EDMU) helps you identify peak pool utilization. Keep in mind that this exception is based on DB2 statistics information; therefore, this exception may not identify storage fragmentation problems. Note that the EDMU exception does not include the number of SKCT or SKPT pages that have been used.

Page 209: OMEGAMON II for DB2 Tuning Guide, Version 540 - IBMpublib.boulder.ibm.com/tividd/td/ITOMEGAIIDB2/G251... · 2 OMEGAMON II for DB2 Tuning Guide, Version 540 Registered trademarks and

Analyzing DB2 Resource Manager Performance 209

EDM Pool Tuning Indications

Historical indicatorsYou can use historical displays or reports to determine when load failures occurred. As soon as you have identified a load failure, you should review the DSNT500I message generated by DB2 to determine the name of the object that failed to be loaded. (This can help you determine whether the object was large or small.) The EDM Pool Snapshot feature (described in the next section) can also be used to determine the current amount of fragmentation and pool utilization.

Page 210: OMEGAMON II for DB2 Tuning Guide, Version 540 - IBMpublib.boulder.ibm.com/tividd/td/ITOMEGAIIDB2/G251... · 2 OMEGAMON II for DB2 Tuning Guide, Version 540 Registered trademarks and

EDM Pool Snapshot

210 OMEGAMON II for DB2 Tuning Guide, Version 540

EDM Pool Snapshot

The EDM Pool Snapshot feature allows you to determine the exact contents of the EDM pool. This information is summarized into the following categories: database descriptors (DBDs), cursor tables (CTs), package tables (PTs), skeleton cursor tables (SKCTs), cache, skeleton package tables (SKPTs), dynamic SQL caches (DSCs), and free storage.

Where do I start?To view the EDM Pool Snapshot Summary panel:

� Select option A from the EDM Pool Information panel.

Result: The EDM Pool Snapshot Summary panel is displayed.

EDM Pool Snapshot Summary panelYou can view information about EDM pool elements on the EDM Pool Snapshot Summary panel, as shown in Figure 85.

FIGURE 85. EDM Pool Snapshot Summary Panel

Zooming to more detailYou can use the zoom key (PF11) to view the names and sizes of each object type. The detail panels display each individual object in the EDM pool by name and show its size in bytes and 4K pages.

________________ ZEDSN VTM O2 V540./C $DB2 mm/dd/yy 8:20:59 2> Help PF1 Back PF3 Zoom PF11>==============================================================================> EDM POOL SNAPSHOT SUMMARY> EDSN+ <<< The following EDM snapshot was collected on mm/dd/yy at 15:05:14. >>>++ EDM % of Pages Count of Avg Pages Max Pages+ Storage Type Pool Alloc Entries Entry Entry+ ------------ ------ ------- -------- --------- ---------+ DBDs 4.1% 61.0 10 6.1 21.0+ CTs .3% 5.0 3 1.6 3.0+ PTs .1% 1.0 1 1.0 1.0+ SKCTs .5% 7.5 4 1.8 4.0+ CACHE .0% .5 2 .2 .2+ SKPTs .3% 4.0 4 1.0 1.0+ SQL Cache .0% .0 0 .0 .0+ FREE 94.7% 1421.0 1 1421.0 1421.0==============================================================================

Page 211: OMEGAMON II for DB2 Tuning Guide, Version 540 - IBMpublib.boulder.ibm.com/tividd/td/ITOMEGAIIDB2/G251... · 2 OMEGAMON II for DB2 Tuning Guide, Version 540 Registered trademarks and

Analyzing DB2 Resource Manager Performance 211

EDM Pool Snapshot

Free storage

When you zoom on the FREE storage line, you can identify the amount of fragmentation that existed in your EDM pool the last time the snapshot was invoked. The free storage line identifies

� the number of 4K pages that are free� the number of blocks of free storage� the average and maximum size (in pages) of free storage blocks

Example: If your Max Pages Entry field equals 20, with the Count of Entries field at 10, this means you have 10 blocks of free storage (with the largest block valued at 20 4K pages). By zooming on the free storage field, you can see the size of the 5 largest free contiguous blocks of storage.

Cache

When you zoom on the CACHE line, OMEGAMON II displays each SKCT that has an authorization cache block allocated by DB2. The information displayed includes the cache size and percentage used. The cache size of a bound plan can be anywhere from 256 to 4096 bytes.

DB2 uses the cache block to store 8-byte authorization identifiers (AUTHIDs) in order to reduce catalog I/O. The % of Pool field shows the percentage of the cache block that actually contains AUTHIDs. You can use this value to decide whether to increase, decrease or turn off cache for a particular plan. You can change cache by using the BIND/REBIND CACHESIZE parameter.

Dynamic SQL Cache by Authorization ID

When you zoom on the SQL CACHE storage line, OMEGAMON II displays information about the dynamic SQL caches that are using some portion of the EDM pool. One line of output is produced for each AUTHID (authorization ID) using dynamic SQL cache (DSC) storage when the displayed data was collected. For each AUTHID, the information includes the number of SQL statements cached, the number of SQL cache pages allocated, and the number of bytes in use by the SQL cache. You can sort the output by display column by moving the cursor to a display column heading and pressing F10.

To see the actual SQL text for a dynamic SQL statement, move the cursor to an AUTHID and press F11 to zoom to the EDM Snapshot Dynamic SQL Cache SQL Detail panel. This panel shows the SQL text for all the entries that belong to an AUTHID.

To see more detailed statistical information about a specific dynamic SQL statement, move the cursor to the SQL statement and press PF11 to zoom to the EDM Snapshot Dynamic SQL Cache Statistics panel.

Dynamic SQL Cache Statistics

From the Dynamic SQL Cache by Authid panel, you can enter option B to display the Dynamic SQL Cache (DSC) Statistics panel. This panel provides additional details about the dynamic SQL caches. One line of output is produced for each DSC AUTHID located in the pool when the display data was collected. The information includes the number of times the SQL statement was executed, CPU time, elapsed time, wait time, the number of

Page 212: OMEGAMON II for DB2 Tuning Guide, Version 540 - IBMpublib.boulder.ibm.com/tividd/td/ITOMEGAIIDB2/G251... · 2 OMEGAMON II for DB2 Tuning Guide, Version 540 Registered trademarks and

EDM Pool Snapshot

212 OMEGAMON II for DB2 Tuning Guide, Version 540

getpages, the number of synchronous buffer reads, and the number of synchronous buffer writes.

Note: The monitor class 1 trace for IFCID 318 must be started before any statistics are produced.

Using snapshots to analyze fragmentationYou can take snapshots periodically and see how fragmentation continues to grow the longer your DB2 system is active. When the largest blocks of storage get too small (for example, when your storage blocks become smaller than some of your DBD and SKCT base sizes), you may need to schedule a DB2 outage to clean up the EDM pool at restart time.

Page 213: OMEGAMON II for DB2 Tuning Guide, Version 540 - IBMpublib.boulder.ibm.com/tividd/td/ITOMEGAIIDB2/G251... · 2 OMEGAMON II for DB2 Tuning Guide, Version 540 Registered trademarks and

Analyzing DB2 Resource Manager Performance 213

Bind Statistics

Bind Statistics

OMEGAMON II collects statistics on DB2's bind activity and reports this information on the Bind Statistics panel, shown in Figure 86.

Where do I start?For information about bind statistics:

� Select option D, Bind Statistics, from the Resource Managers menu.

Result: The Bind Statistics panel is displayed.

Bind Statistics panelFollowing is an example of the Bind Statistics panel.

FIGURE 86. Bind Statistics Panel

______________ ZBIND VTM O2 V540./C $DB2 mm/dd/yy 14:10:00> Help PF1 Back PF3 Up PF7 Down PF8> R.D>> H-HISTORICAL=============================================================================> BIND STATISTICS BIND+ Collection Interval: REALTIME Start: 05/29 15:34:18+ Report Interval: 20 sec End: 05/29 15:34:38++ TOTAL INTERVAL /SECOND /THREAD/COMMIT+ QUANTITY QUANTITY ( 20) ( 0)( 0)+ -------- -------- ------- --------------+ Automatic Bind Plan Attempts 1 0 .00 .00 .00+ Automatic Bind Plan Successes 1 0 .00 .00 .00+ Automatic Bind Pkg Attempts 0 0 .00 .00 .00+ Automatic Bind Pkg Successes 0 0 .00 .00 .00++ Static Bind Plan Attempts 5 0 .00 .00 .00+ Static Bind Plan Successes 5 0 .00 .00 .00+ Static Bind Pkg Attempts 0 0 .00 .00 .00+ Static Bind Pkg Successes 0 0 .00 .00 .00++ Rebind Plan Attempts 0 0 .00 .00 .00+ Rebind Plan Successes 0 0 .00 .00 .00+ Rebind Pkg Attempts 0 0 .00 .00 .00+ Rebind Pkg Successes 0 0 .00 .00 .00++ Free Plan Attempts 0 0 .00 .00 .00+ Free Plan Successes 0 0 .00 .00 .00+ Free Pkg Attempts 0 0 .00 .00 .00+ Free Pkg Successes 0 0 .00 .00 .00++ Plan Allocation Attempts 76 0 .00 .00 .00+ Plan Allocation Successes 75 0 .00 .00 .00+ Package Allocation Attempts 33 0 .00 .00 .00+ Package Allocation Successes 33 0 .00 .00 .00+ Auth Check Attempts 838 0 .00 .00 .00+ Auth Check Successes 831 0 .00 .00 .00+ Auth Check Using Cache 47 0 .00 .00 .00+ Auth Check Public Authority 8 0 .00 .00 .00+ Test Binds (No Plan ID) 0 0 .00 .00 .00=============================================================================

Page 214: OMEGAMON II for DB2 Tuning Guide, Version 540 - IBMpublib.boulder.ibm.com/tividd/td/ITOMEGAIIDB2/G251... · 2 OMEGAMON II for DB2 Tuning Guide, Version 540 Registered trademarks and

Bind Statistics

214 OMEGAMON II for DB2 Tuning Guide, Version 540

High bind and rebindIf bind and rebind activities are high in a production system, especially during peak hours, you should investigate further. These activities can absorb substantial DB2 resources (locking against catalog and directory) and cause longer response time for the applications.

Low success countsIf success counts are low, you can learn more about the situation by examining the Locking Conflicts panel. This will help you identify the applications that are monopolizing DB2 resources.

High automatic bind attemptsA high value for Automatic Bind Attempts indicates that the plan's access path has changed (for example, an index was dropped). When users make changes without rebinding the plan, DB2 is forced to perform an automatic bind, which depletes its resources.

Automatic binds can be disabled by setting the ABIND parameter to NO. If automatic binds are allowed, the DSNZPARM parameter ABEXP specifies whether explain processing is enabled during automatic bind. In a production environment you may want to set ABEXP to NO to reduce the overhead involved.

Page 215: OMEGAMON II for DB2 Tuning Guide, Version 540 - IBMpublib.boulder.ibm.com/tividd/td/ITOMEGAIIDB2/G251... · 2 OMEGAMON II for DB2 Tuning Guide, Version 540 Registered trademarks and

Analyzing Query Performance 215

Analyzing Query Performance

This chapter explains how SQL calls affect performance.

Chapter Contents Overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 216How SQL Calls Affect Performance . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 218

11

Page 216: OMEGAMON II for DB2 Tuning Guide, Version 540 - IBMpublib.boulder.ibm.com/tividd/td/ITOMEGAIIDB2/G251... · 2 OMEGAMON II for DB2 Tuning Guide, Version 540 Registered trademarks and

Overview

216 OMEGAMON II for DB2 Tuning Guide, Version 540

Overview

In any application or online query, the SQL statement has a great effect on the performance of the task and the system. SQL statements that are not sufficiently qualified can consume vital system resources unnecessarily.

Where do I start?As explained in“The SQL Call” on page 102, you can view the SQL call that is associated with the active thread displayed on the Thread Detail panel:

� Select option E, SQL Call, from the Thread Detail panel.

Result: The SQL Call Being Executed panel is displayed as shown in Figure 87 on page 216.

Note: If no call is active,OMEGAMON II displays the information about the last active call, but not the text.

SQL Call Being Executed panelOMEGAMON II automatically determines whether it is a dynamic call or a static call. OMEGAMON II displays the call and appropriate text describing the type of call and related details.

FIGURE 87. SQL Call Being Executed Panel

____________ ZSQL VTM O2 V540./C $DB2 mm/dd/yy 08:30:17> Help PF1 Back PF3 > THREAD INFORMATION: Enter a selection letter on the top line. > A-THREAD DETAIL B-LOCK COUNTS C-LOCK WAITS D-LOCKS OWNED E-GLOBAL LOCKS> *-CURRENT SQL G-SQL COUNTS H-DISTRIBUTED I-BUFFER POOL J-GROUP BP> K-PACKAGES L-RES LIMIT M-PARALLEL TASKS N-UTILITY O-OBJECTS> P-CANCEL THREAD Q-DB2 CONSOLE R-DSN ACTIVITY S-APPL TRACE=============================================================================> SQL CALL BEING EXECUTED PLAN+ Thread: Plan=DSNESPRR Connid=TSO Corrid=TDO209B Authid=TDO209B+ Attach: TSO Userid=TDO209B Region asid= 225+ Package: SP61B Collection= call++ Thread Status = IN-SQL-CALL SQL Request Type = DYNAMIC+ Total SQL Reqs = 2 SQL Call Type = CLOSE CURSOR+ SQL DBRM Name = DSNESM68 SQL Statement Number = 00153+ Collection ID = DSNESPRR+++ SELECT *+ FROM BANK.ACCOUNTS+ WHERE BALANCE < 50000 ORDER BY NAME ;==============================================================================

Page 217: OMEGAMON II for DB2 Tuning Guide, Version 540 - IBMpublib.boulder.ibm.com/tividd/td/ITOMEGAIIDB2/G251... · 2 OMEGAMON II for DB2 Tuning Guide, Version 540 Registered trademarks and

Analyzing Query Performance 217

Overview

Monitoring SQL informationAny number of people in different capacities can make use of OMEGAMON II information to improve application and query performance.

Application programmers can track their application (in either a test or a production environment) to determine how efficiently they are running.

People in a training and education capacity can monitor the types of SQL calls that are used at their site, and educate users about common mistakes and more efficient ways to perform queries.

People in an information center or support capacity can assist users with long running applications or queries by looking at the SQL calls as they are executing, and diagnosing problems as they occur.

Page 218: OMEGAMON II for DB2 Tuning Guide, Version 540 - IBMpublib.boulder.ibm.com/tividd/td/ITOMEGAIIDB2/G251... · 2 OMEGAMON II for DB2 Tuning Guide, Version 540 Registered trademarks and

How SQL Calls Affect Performance

218 OMEGAMON II for DB2 Tuning Guide, Version 540

How SQL Calls Affect Performance

The following sections describe some common situations where an SQL call can affect DB2 system performance:

Retrieving dataWhen retrieving data from a database, it is important to make the SQL call as explicit as possible. A call that specifies column names explicitly is

more efficient than a call that uses a SELECT *. This is particularly true if the call is ordering by rows, using a sort, because DB2 writes the retrieved rows to sort work files and then rereads them. The more rows that the call selects, the more I/Os and CPU resources DB2 requires to order the rows. This is because DB2 uses cross-memory services to pass data to the user. It does this by column, not by row.

Do the following to improve performance:

� Use aggregations (built-in functions such as AVG for averages and COUNT to obtain counts) to reduce the number of rows that DB2 must retrieve to produce a result. The use of NULL instead of NOT NULL WITH DEFAULT will return different results when null values exist in a column.

� Use the GROUP BY function to improve performance by limiting the amount of data passed back to the program.

� Use a SELECT statement instead of opening a cursor and fetching a row, when the row is unique. If DB2 is to update the row, it is more economical to perform the action without a cursor.

� Define tablespaces containing read-only data with LOCKSIZE TABLESPACE. This reduces the number of locks the applications have to acquire and release.

� When possible, use the UNION ALL operator in place of UNION to save the DB2 overhead caused by eliminating duplicate rows.

Using viewsIn dynamic SQL statements, specify the table name, not the view name. Specifying the view name increases the dynamic BIND process because DB2 must access the catalog tables twice, once for the view and once for the base table.

The view definition can affect performance. To increase performance, retrieve only the relevant columns. This limits the amount of data that DB2 must transfer to the program.

Another way to improve performance is to create the view definition using an optimized SQL statement to provide the most efficient path to the data.

Using indexesIndexes can improve DB2's efficiency. The following items describe situations in which DB2 may not use an index. Avoid these situations whenever possible to improve DB2's performance.

Page 219: OMEGAMON II for DB2 Tuning Guide, Version 540 - IBMpublib.boulder.ibm.com/tividd/td/ITOMEGAIIDB2/G251... · 2 OMEGAMON II for DB2 Tuning Guide, Version 540 Registered trademarks and

Analyzing Query Performance 219

How SQL Calls Affect Performance

� Do not use a subquery in an IN list. DB2 will not use the index created on the column specified with the IN predicate. Whenever possible, use a JOIN statement instead of this type of subquery.

� Do not JOIN a table to itself. For example, do not compare one column in a table to another column in the same table. This causes DB2 to scan the entire tablespace.

� Do not use a LIKE predicate where the first character is % or _. Using the predicate in those cases causes DB2 to scan the tablespace.

� Do not use literal or host variables with a length longer than the column length. DB2 does not use an index in these cases.

� DB2 does not use an index for an UPDATE statement when the column specified in the WHERE clause is also specified in the SET clause.

� DB2 does not use an index for any column specified in a FOR UPDATE OF statement.

Bind OptionsWhen an application must compare two rows in a table and no other user is using the table, repeatable read is the most efficient bind option.

When binding a plan or package for a production system, specify EXPLAIN=YES and examine the selected access path or paths in the PLAN_TABLE. Check for the following performance hazards:

� Tablespace scans of large tablespaces or tables.

If this is a frequently executed path, you may want to create an index and rebind to remove the scan.

� Nonmatching index scan on large indexes with many rows.

Using an index that supports the predicate may benefit the application.

� Excessive sorting.

DB2 performs a sort to satisfy a GROUP BY or ORDER BY specification. If the resulting table contains many rows, the sort can be expensive. Re-evaluate the need for using ORDER BY, or consider using an index for those select elements.

� Tablespace scans ignoring the clustering index.

Check the value in column CLUSTERED in SYSIBM.SYSINDEXES to see if the tablespace needs reorganizing.

Numeric Conversions

The DB2 optimizer, during BIND processing, may decide not to use an index. One instance may be when the data type of a literal or host variable has greater precision than the data type of the column being compared to. For example:

SELECT EMPLOYEE, SALARY FROM EMP_TABLE

WHERE SALARY > :SAL

Page 220: OMEGAMON II for DB2 Tuning Guide, Version 540 - IBMpublib.boulder.ibm.com/tividd/td/ITOMEGAIIDB2/G251... · 2 OMEGAMON II for DB2 Tuning Guide, Version 540 Registered trademarks and

How SQL Calls Affect Performance

220 OMEGAMON II for DB2 Tuning Guide, Version 540

If there was an index on SALARY, then SALARY is defined as SMALLINT and the host variable is defined as DECIMAL. The DB2 optimizer will not use the SALARY index, but rather will choose a tablespace scan (which is usually costlier in resource consumption).

Character String Padding

In a slightly different vein from the above numeric conversion topic, suppose the following query:

SELECT A FROM TABLE

WHERE B=:B

AND C=:C

AND D=:D

AND E=:E

Let us further suppose that columns (A, B, C, D, E) are defined as CHAR(3) and a clustered index is defined as a composite index on all the columns referenced in the predicate (B, C, D, E). Also, the host variables (:B, :C, :D, :E) are defined as PIC X(4).

The user would be unpleasantly surprised to find out that the DB2 optimizer would not use the clustered index. It is documented that DB2 will not use an index if the literal value or host variable is longer than the column length.

Page 221: OMEGAMON II for DB2 Tuning Guide, Version 540 - IBMpublib.boulder.ibm.com/tividd/td/ITOMEGAIIDB2/G251... · 2 OMEGAMON II for DB2 Tuning Guide, Version 540 Registered trademarks and

221

Automated Facilities (XLF, ASF, TSF)

This appendix discusses the automated facilities that are for advanced users who are familiar with OMEGAMON II commands and creating screen spaces. For information about customizing screen spaces, see the OMEGAMON II for DB2 Configuration and Customization Guide.

Appendix Contents Overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 222Controlling Automated Features . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 223Exception Logging Facility (XLF) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 224Automatic Screen Facility (ASF) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 225Setting Parameters for XLF and ASF Operation . . . . . . . . . . . . . . . . . . . . . . . . . . . . 226Timed Screen Facility (TSF) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 228Setting Printer and Routing Options . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 230Using Screen Spaces in ASF and TSF. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 232

A

Page 222: OMEGAMON II for DB2 Tuning Guide, Version 540 - IBMpublib.boulder.ibm.com/tividd/td/ITOMEGAIIDB2/G251... · 2 OMEGAMON II for DB2 Tuning Guide, Version 540 Registered trademarks and

Overview

222 OMEGAMON II for DB2 Tuning Guide, Version 540

Overview

OMEGAMON II can automatically invoke displays, initiate action, and log information in response to exception conditions (that is, when an exception message is triggered), or at specific times during the day. When the sequence is finished, OMEGAMON II then resumes normal operation. All this occurs without manual intervention through three event- and time-driven features: the exception logging facility (XLF), the automatic screen facility (ASF), and the timed screen facility (TSF).

Auto update requirementXLF and ASF operate only when OMEGAMON II is running in dedicated or VTAM mode with automatic update on. To activate Auto Update, specify Y for AUP (Auto Update) on the Realtime Customization—VTAM panel.

OMEGAVIEW considerationDo not use any of these background facilities if OMEGAMON II is running under an overview product (OMEGAVIEW).

Page 223: OMEGAMON II for DB2 Tuning Guide, Version 540 - IBMpublib.boulder.ibm.com/tividd/td/ITOMEGAIIDB2/G251... · 2 OMEGAMON II for DB2 Tuning Guide, Version 540 Registered trademarks and

223

Controlling Automated Features

Controlling Automated Features

This section explains how to access the options that control OMEGAMON II's event- and time-driven features.

Where do I start?To access automated screen facilities, select Profile from the Main Menu.

Result: The Profile Maintenance Menu is displayed.

From the Profile menu, you can reach panels that set XLF, ASF and TSF options. Select

� SESSION OPTIONS (option A) to turn on and off XLF, ASF and TSF (fastpath P.A.A).

� EXCEPTION ANALYSIS (several options) to define XLF and ASF parameters for each individual exception or exception group (fastpaths P.B through P.B.E).

� LOGGING to set printing and routing options for XLF and ASF, turn logging on and off, or print the logs (fastpaths P.I through P.I.H).

____________ ZPROF VTM O2 V540./C $DB2 mm/dd/yy 08:30:12> Help PF1 Back PF3> Type a selection letter on the top line and press ENTER.============================================================================> PROFILE MAINTENANCE MENU _ A SESSION OPTIONS ...... Set session options _ B EXCEPTION ANALYSIS ... Exception analysis options _ C LIST PROFILES ........ List profiles_ D DESCRIBE PROFILE ..... Describe a profile _ E SAVE USER ............ Save new/altered user profile_ F DELETE USER .......... Delete user profile_ G SAVE INSTALL ......... Save new/altered installation profile_ H DELETE INSTALL ....... Delete installation profile _ I LOGGING .............. Exception and automatic screen logging_ J MESSAGES ............. Set DB2/IRLM messages that MSGE exception monitors==============================================================================

Page 224: OMEGAMON II for DB2 Tuning Guide, Version 540 - IBMpublib.boulder.ibm.com/tividd/td/ITOMEGAIIDB2/G251... · 2 OMEGAMON II for DB2 Tuning Guide, Version 540 Registered trademarks and

Exception Logging Facility (XLF)

224 OMEGAMON II for DB2 Tuning Guide, Version 540

Exception Logging Facility (XLF)

Exception logging (XLF) automatically time-stamps and logs exception messages to the XLFLOG file for your review. It enables you to correct intermittent performance problems by documenting the frequency and severity of systemwide exceptions. To activate it, you must turn on XLF and specify each exception to be included in XLF.

For information about setting parameters for XLF operation, see “Setting Parameters for XLF and ASF Operation” on page 226.

Turning XLF on and offSelect XLF On (option B) on the Exception Logging panel to activate XLF (fastpath P.I.B). Select XLF Off (option C) to turn off XLF (fastpath P.I.C).

You can specify the exceptions you want to be logged by selecting Exception Analysis (option B) on the Profile Maintenance menu (fastpath P.B).

Page 225: OMEGAMON II for DB2 Tuning Guide, Version 540 - IBMpublib.boulder.ibm.com/tividd/td/ITOMEGAIIDB2/G251... · 2 OMEGAMON II for DB2 Tuning Guide, Version 540 Registered trademarks and

225

Automatic Screen Facility (ASF)

Automatic Screen Facility (ASF)

This feature automatically invokes a predefined screen space when a given exception occurs for more than a specified number of successive cycles. The predefined screen space can contain commands to turn on the log, further evaluate the exception condition, and perform other options.

For information about setting parameters for ASF operation, see “Setting Parameters for XLF and ASF Operation” on page 226.

Activating ASFTo activate ASF, you must

1. specify exceptions to be monitored

2. specify which screen to invoke

3. turn ASF onYou set the exceptions to be monitored and the screen to invoke from the Exception Analysis Options Menu (fastpaths P.B through P.B.E).

To turn on ASF, select ASF On (option F) on the Exception Logging panel (fastpath P.I.F). panel. To turn off ASF, select ASF Off (option G) on the logging panel (fastpath P.I.G).

Guidelines for using ASFIf you do not return to the original screen after a series of ASF screen spaces, you may experience difficulties with the PF key settings, menu system, and navigation.

For an example of how ASF is used to invoke screen spaces, see “ASF example” on page 233.

Page 226: OMEGAMON II for DB2 Tuning Guide, Version 540 - IBMpublib.boulder.ibm.com/tividd/td/ITOMEGAIIDB2/G251... · 2 OMEGAMON II for DB2 Tuning Guide, Version 540 Registered trademarks and

Setting Parameters for XLF and ASF Operation

226 OMEGAMON II for DB2 Tuning Guide, Version 540

Setting Parameters for XLF and ASF Operation

To set both XLF and ASF parameters, use the XACB statement section of Exception Analysis panels (fastpaths P.B.A through P.B.E). On the XACB statement, you can set values for the XLF Parameters field that activate XLF and ASF for all occurrences of any given exception, or for exceptions that persist for a specified number of cycles. You can also set a limit on the number of times a given exception invokes the XLF or ASF feature.

XACB statement exampleThe following figure shows the format of the XACB statement. The variable cccc is the exception name. To set parameters for an exception, type over the current value displayed with the XACB command. See “Defining Standards and Monitoring Performance” on page 41 for detailed information about customizing exceptions.

XLF and ASF parametersYou can set the following XLF and ASF parameters on the XACB statement:

Auto Controls the status of ASF for this exception (ON/OFF).

Log Controls the status of XLF for this exception (ON/OFF). It does not affect logging for ASF.

Limit Limits the number of times (nn) XLF and/or ASF is invoked if the exception occurs. If you specify Limit=00, no events are logged. If you specify Limit=NONE, XLF and/or ASF are invoked each time the exception occurs. The parenthetical number to the right of this parameter indicates the remaining number of times that the exception will be logged. You can reset Limit to continue logging the exception.

Repeat Used with the Persist threshold, Repeat=YES specifies that XLF logging or ASF action occurs each time the Persist threshold is reached. For example, if Persist=5, the exception condition persists for 15 cycles, and logging is in effect, then the message would be logged three times. If Repeat=NO, the message is logged only once as specified with the Persist parameter.

XACB LIST=cccc: cccc+ DISPLAY Parameters: THRESHOLD Parameters: XLF Parameters:: State= Threshold= Auto=: Group= Display= Log=: Bell= Attribute= Limit=nn+ BOX Parameters: CYCLE Parameters: Repeat=: Boxchar=' ' ExNcyc=n Persist=nn: Boxclr= Stop=n (m) Sc=: Boxattr= Cumulative=n

Page 227: OMEGAMON II for DB2 Tuning Guide, Version 540 - IBMpublib.boulder.ibm.com/tividd/td/ITOMEGAIIDB2/G251... · 2 OMEGAMON II for DB2 Tuning Guide, Version 540 Registered trademarks and

227

Setting Parameters for XLF and ASF Operation

Persist Logs the exception message and/or invokes the ASF screen spaces when the condition persists for nn consecutive OMEGAMON II cycles. After it has reached the threshold, the message is logged only once (or ASF is invoked only once) unless the condition stops for at least one cycle and then trips again. If you specify Persist=00, no events are logged.

Sc Sc, where c may be either an S or L. You must specify this parameter for ASF to work.

SL Specifies the screen space to invoke if ASF is in effect (Auto=ON), and specifies that the output of the ASF screen spaces is to be logged. REPORT file logging automatically turns on when the exception trips and screen space logging starts.

SS Specifies the screen space to invoke if ASF is in effect. It does not turn on the log.

Page 228: OMEGAMON II for DB2 Tuning Guide, Version 540 - IBMpublib.boulder.ibm.com/tividd/td/ITOMEGAIIDB2/G251... · 2 OMEGAMON II for DB2 Tuning Guide, Version 540 Registered trademarks and

Timed Screen Facility (TSF)

228 OMEGAMON II for DB2 Tuning Guide, Version 540

Timed Screen Facility (TSF)

The Timed Screen Facility (TSF) automatically invokes specified screen spaces at specified times of the day or at specified intervals. Many sites use TSF to spin off copies of the screen log (REPORT) and/or exception log (XLFLOG) files to the printer. In general, you can use the TSF facility to automate many day-to-day housekeeping routines.

For example, you may want to issue a /LOGOUT command to release the log file, or issue a DB2 trace command at 2:00 p.m. every weekday, and then turn it off again at 2:15 p.m. Or, you may want to invoke a screen space and have its commands executed and logged every hour.

Using TSFTo use TSF, follow this procedure:

1. Create any screen spaces you want TSF to invoke.You can use the .SGO or .FGO command to chain screens together, and .RTN to end the cycle. Special considerations for creating screen spaces in TSF are discussed in “Using Screen Spaces in ASF and TSF” on page 232.

2. Specify TSF On on the Set Display Options panel (fastpath P.A.A).

3. Fastpath M.F to the OMEGAMON Commands panel. From this panel, enter .TSF00 to list all entries in the TSF table.

4. The TSF Entries table is shipped with 99 blank entries. For example:.TSF00

+ 1 Time=0000 SS=*NONE* DAY=DAILY

+ 2 Time=0000 SS=*NONE* DAY=DAILY

+ 3 Time=0000 SS=*NONE* DAY=DAILY

+ 4 Time=0000 SS=*NONE* DAY=DAILY

Enter .TSFnn to display TSF table entry nn. To define an entry, type .TSF followed by the number of the entry. For example, type .TSF01 to produce

.TSF01 Time=0000 SS=*NONE* DAY=DAILY

Type any new values over the current entry, and press Enter to reset the values.

If you want to change an entry that does not appear on the panel, you can specify an argument to skip nn entries. For example, type TSF00 20 to display entries 21 through 99 in the TSF panel, skipping the first 20.

Page 229: OMEGAMON II for DB2 Tuning Guide, Version 540 - IBMpublib.boulder.ibm.com/tividd/td/ITOMEGAIIDB2/G251... · 2 OMEGAMON II for DB2 Tuning Guide, Version 540 Registered trademarks and

229

Timed Screen Facility (TSF)

TSF keywordsThe following describes keywords and valid entries for the TSF Entries panel:

Sample TSF entriesFollowing is an example of five TSF entries.

.TSF01 1 TIME=1800 SL=WENDSHFT DAY=DAILY

.TSF02 2 TIME=0600 SS=WEEKSTRT DAY=MONDAY

.TSF03 3 TIME=1200 SL=NOONTIME DAY=(TH,F)

.TSF04 4 TIME=0800 SS=MONTHEND DAY=30

.TSF05 5 TIME=+30 SL=STATUS DAY=DAILY

Guidelines for changing TSF entriesYou must change or add one TSF entry at a time. Enter the entry number after the .TSF statement (.TSFnn) and then type over the values displayed. Then enter another entry number and type over its values. Then enter the next entry number and so on.

To add a new entry, use an unused entry which is identified by TIME=0000.

Time Specifies the time of day (from 0000 to 2400) to invoke the screen. TIME=+nn invokes the screen every nn minutes.

Note: The screen space will not execute while the TIME=+nn entry remains on your current screen

SL or SS Specifies the screen space to invoke if TSF is in effect. SS specifies the screen space to invoke, but does not turn on the log. SL automatically turns on the REPORT log when the screen is fetched, and screen space logging starts. You must specify either SS or SL for TSF to function.

DAY The valid entries for day of week are MONDAY, TUESDAY, WEDNESDAY, THURSDAY, FRIDAY, SATURDAY, SUNDAY, WEEKDAY, WEEKEND, and DAILY. The days of the month (1–31) are also valid entries. The default value is DAILY. You can abbreviate the input if it is unique, and the days of the week are recognizable.

You may specify day combinations by enclosing the names of the days within parentheses, and by separating each day with either a comma or a blank.

TSF01 Executes and logs screen space WENDSHFT at 6:00 p.m. daily.

TSF02 Executes screen space WEEKSTRT at 6:00 a.m. every MONDAY.

TSF03 Executes and logs screen space NOONTIME at 12:00 p.m. every Thursday and Friday.

TSF04 Executes screen space MONTHEND on the 30th of each month at 8:00 a.m.

TSF05 Executes and logs screen space STATUS every 30 minutes every day.

Page 230: OMEGAMON II for DB2 Tuning Guide, Version 540 - IBMpublib.boulder.ibm.com/tividd/td/ITOMEGAIIDB2/G251... · 2 OMEGAMON II for DB2 Tuning Guide, Version 540 Registered trademarks and

Setting Printer and Routing Options

230 OMEGAMON II for DB2 Tuning Guide, Version 540

Setting Printer and Routing Options

Exception messages that trip when XLF is in effect are routed to the XLFLOG file. Screen space output from ASF and TSF is routed to the REPORT file. The ddnames for XLFLOG and REPORT are defined in the OMEGAMON II jobstream.

To set exception logging output options for XLF, ASF and TSF, use the Set Printer and Routing Options panel.

Displaying and changing logging optionsTo set XLF printing and routing options, enter option A on the Exception Logging panel (fastpath P.I.A).

To set ASF and TSF printing and routing options, enter option E on the Exception Logging panel (fastpath P.I.E).

Result: The Set Printer and Routing Options panel appears.

Follow the instructions on this panel to modify printing and routing options. To save your changes, delete the comment character (>) next to .XLFOUT, and press Enter. This moves the Pending column values to the Current column, and reallocates the log using the new values.

For a description of panel fields, press F1.

Using logging featuresIn XLF and ASF processing, only one record is written to the log while a given exception condition persists. However, new records are written to the XLFLOG or the REPORT log if any of the following situations occur:

____________ ZXLFOPT VTM O2 V540./C $DB2 mm/dd/yy 08:30:12> Help PF1 Back PF3==============================================================================> SET XLF PRINTER AND ROUTING OPTIONS > To change an option, type the new value to the right of the option name and> press ENTER. The new value appears in the Pending column. To make the value> the Current value, remove the > preceding .XLFOUT and press ENTER. >.XLFOUT OUTP XLFLOG+ |----- Pending ------|----- Current ------| copy | 1 | 1 | ddnm | (*DYNAMIC) | (*DYNAMIC) | dest | *NONE* | *NONE* | dstu | *None* | *None* | fold | YES | YES | form | *None* | *None* | hold | NO | NO | id1 | 'USER01' | 'USER01' | id2 | ' ' | ' ' | id3 | ' ' | ' ' | id4 | ' ' | ' ' | lnct | 60 | 60 | sout | A | A |==============================================================================

Page 231: OMEGAMON II for DB2 Tuning Guide, Version 540 - IBMpublib.boulder.ibm.com/tividd/td/ITOMEGAIIDB2/G251... · 2 OMEGAMON II for DB2 Tuning Guide, Version 540 Registered trademarks and

231

Setting Printer and Routing Options

� If an exception disappears for even one cycle, and then reappears, it is considered a new event.

� If you turn off a given exception and then turn it on again, you clear the event. If the exception condition still exists, another record goes to the XLF log. OMEGAMON II does not check for the condition unless the exception is turned on.

� If you turn off XLF or ASF and then turn it on again, you clear all events and new records go to the log.

� For a given exception, if you set the XACB REPEAT parameter to YES and specify a threshold for the PERSIST parameter, a new record is written each time the PERSIST threshold is reached.

Page 232: OMEGAMON II for DB2 Tuning Guide, Version 540 - IBMpublib.boulder.ibm.com/tividd/td/ITOMEGAIIDB2/G251... · 2 OMEGAMON II for DB2 Tuning Guide, Version 540 Registered trademarks and

Using Screen Spaces in ASF and TSF

232 OMEGAMON II for DB2 Tuning Guide, Version 540

Using Screen Spaces in ASF and TSF

The power of ASF and TSF lies in their ability to branch to, execute, and log an analysis screen space (or series of screen spaces). The screen space you define to call when ASF is activated can contain whatever information-gathering and/or action-taking commands you specify. You might include commands to turn on the log, change OMEGAMON II defaults, further analyze the exception condition, or even call other screen spaces (with .SGO or .FGO).

This section contains information on how to use and execute screen spaces, and how to use the .RTN command.

How ASF and TSF screen spaces executeIf two exceptions occur at the same time, screen spaces and logging execute for the first exception until the final screen space issues the .RTN command. If the second exception persists, the automatic mode reactivates on the next cycle.

If the EXSY command appears on any of your target screen spaces, any triggered exception messages appear as usual, but ASF ignores these new exceptions until the sequence is ended with the .RTN command. If the exception condition still exists, ASF proceeds to the next exception in sequence.

If you want to cancel an ASF or TSF screen space sequence while it is displaying, press any key other than a cursor key. If, for example, you press Enter, the sequence immediately terminates. However, when it terminates without a .RTN command, OMEGAMON II does not return to the original calling panel, or to another screen space defined with .RTN.

Note that TSF sequences always function at their scheduled times, except when an ASF sequence is also tripped. ASF sequences take precedence over TSF. That means that if an ASF sequence trips while a TSF sequence is in progress, the ASF sequence cancels the TSF sequence. When the ASF sequence is complete, OMEGAMON II returns to the panel displayed at the time that ASF tripped, but the TSF sequence does not continue. Similarly, if a TSF sequence is scheduled while an ASF sequence is already in progress, the TSF sequence is ignored.

Using the .RTN commandYou can branch to as many screen spaces as you want in ASF and TSF by using the .FGO or .SGO command to chain screen spaces together. The .RTN immediate command is required at the bottom of the last screen space in an ASF or TSF sequence in order to terminate the sequence, return to the original calling panel or branch to the next, and re-enable exception analysis for further automatic calls. You can use OMEGAMON II definition mode (the /DEF ON command) when creating screen spaces that contain the .RTN command.

Normally, you use the .RTN command without a screen space name to return to the calling :i1.chaining screens panel. The .RTN command also accepts an argument which forces the return to a screen space that is not the calling panel. For example, to return to a panel called SCREEN2, enter the .RTN command followed by SCREEN2.

Page 233: OMEGAMON II for DB2 Tuning Guide, Version 540 - IBMpublib.boulder.ibm.com/tividd/td/ITOMEGAIIDB2/G251... · 2 OMEGAMON II for DB2 Tuning Guide, Version 540 Registered trademarks and

233

Using Screen Spaces in ASF and TSF

You can delay the return for up to 35 cycles by placing the number of cycles to be delayed in the label field of .RTN (1 to 9 for numbers 1–9 andA–Z for numbers 10–35). The following command causes a return to SCREEN2 after 6 cycles.

6.RTN SCREEN2

On each cycle, OMEGAMON II replaces the number in the label field with the next lower number. When the count reaches zero, OMEGAMON II fetches SCREEN2.

ASF exampleASF functions only in dedicated mode or VTAM mode with automatic updating in effect. Select the ASF On option (F) on the Exception Logging panel to activate ASF or enter fastpath P.I.F from any panel.

Here are some parameters set with the XACB command for the DRDY exception.

In this example, when the exception condition exists for 5 cycles in a row, ASF invokes screen space DEX01. From this point on, an A appears in the far right portion of the INFO-line, which indicates that the current panel is part of an ASF sequence.

DEX01 might consist of the following sequence of commands:

In this example, the OMEGAMON II cycle time is set to 15 seconds. Since the 8.SGO entry waits 8 cycles before it jumps to DEX02, bottleneck analysis runs on this screen for 2 minutes and logs the results. At this point, screen space DEX02 is invoked as shown below.

XLF Parameters: Auto=ON Log=OFF Limit=3 Repeat=NO Persist=5 SL=DEX01

________________ DEX01 DED LOG PROD01 V540./C $DB2 mm/dd/yy 17:03:37 A=============================================================================> After 8 cycles, branch to screen space DEX028.SGO DEX02=======> Reset the OMEGAMON II cycle time to 15 seconds .SET INTERVAL=15=======> Start degradation analysis PDEX START=======> Display degradation analysis for performance group 2 PDEX02

________________ DEX02 DED LOG PROD01 V540./C $DB2 mm/dd/yy 17:03:37 A===============================================================================> Suspend degradation analysis PDEX STOP=======> Return to the calling screen .RTN

Page 234: OMEGAMON II for DB2 Tuning Guide, Version 540 - IBMpublib.boulder.ibm.com/tividd/td/ITOMEGAIIDB2/G251... · 2 OMEGAMON II for DB2 Tuning Guide, Version 540 Registered trademarks and

Using Screen Spaces in ASF and TSF

234 OMEGAMON II for DB2 Tuning Guide, Version 540

Upon return, the ASF sequence terminates (the A disappears from the INFO-line), thus re-enabling EXSY for further automatic calls. The .RTN command also automatically resets the interval to the one in effect when the ASF sequence started. (You can, however, add an NR argument to .RTN (.RTNNR) to keep the new interval in effect.)

Note that because the SL= parameter was used, ASF automatically turned on the REPORT log when the exception occurred (if it was not already on). When you leave automatic mode, ASF also turns off the log (if it was in the off state before the exception tripped).

When you use ASF to turn on the log automatically with SL=, OMEGAMON II first logs the panel in use and then branches to the scheduled screen space. This is done so that any exceptions are logged before the ASF sequence begins.

Page 235: OMEGAMON II for DB2 Tuning Guide, Version 540 - IBMpublib.boulder.ibm.com/tividd/td/ITOMEGAIIDB2/G251... · 2 OMEGAMON II for DB2 Tuning Guide, Version 540 Registered trademarks and

235

Navigation Flowcharts

The figures in this appendix show the options that are available from the OMEGAMON II for DB2 Realtime Menu and how to navigate between panels.

Appendix Contents Section A: Realtime Panels . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 236Exception Analysis . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 237Thread Activity . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 238Locking Conflicts . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 240Resource Managers. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 241Application Trace Facility . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 243Distributed Data Facility . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 245Object Analysis . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 247Miscellaneous Displays . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 249Profile Maintenance Facility . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 251Near-Term Historical Information . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 253Section B: Historical ISPF Panels . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 255

B

Page 236: OMEGAMON II for DB2 Tuning Guide, Version 540 - IBMpublib.boulder.ibm.com/tividd/td/ITOMEGAIIDB2/G251... · 2 OMEGAMON II for DB2 Tuning Guide, Version 540 Registered trademarks and

Section A: Realtime Panels

236 OMEGAMON II for DB2 Tuning Guide, Version 540

Section A: Realtime Panels

The OMEGAMON II menu system structures the information that OMEGAMON II provides in a way that is easy to understand and easy to access.

Main MenuThe OMEGAMON II for DB2 Realtime Main Menu is the primary panel for navigating through the OMEGAMON II classic interface.

FIGURE 88. OMEGAMON II for DB2 Realtime Main Menu

The following menu options go directly to information panels when selected.

� Summary of DB2 Activity� MVS System Console and Message Traffic� DB2 System Console and Message TrafficAll other menu options display submenus when selected.

_______________ ZMENU VTM 02 V540./C D61D mm/dd/yy 13:24:53 2> Help/News/Index PF1 Exit PF3 PF Keys PF5>> Type a selection letter at the left end of the top line and press ENTER.>= = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = > OMEAGMON II FOR DB2 CLASSIC INTERFACE -- REALTIME MAIN MENU

_ S SUMMARY ..............Summary of DB2 activity_ E EXCEPTIONS ...........Current or potential system problems_ T THREAD ACTIVITY ......Thread activity information_ U THREAD ACTIVITY ......Thread activity information by Package_ L LOCKING CONFLILCTS ...Locking conflict information _ R RESOURCE MANAGERS ....Resource manager, other DB2 subsystem information_ A APPLICATION TRACE ....Trace and view application activity _ D DISTRIBUTED DATA .....Distributed database system information _ O OBJECT ANALYSIS ......Object and Volume information _ C MVS CONSOLE ..........MVS console to issue commands and view messages _ B DB2 CONSOLE ..........DB2 console to issue commands and view messages _ M MISCELLANEOUS ........Address space information, OMEGAMON commands, etc. _ P PROFILE ..............Customize OMEGAMON session and exception settings _ H HISTORICAL ...........Online historical information _ I IFCID TRACE ..........Start an IFCID trace _ Z OTHER DB2 ............Redirect monitoring to another DB2

Page 237: OMEGAMON II for DB2 Tuning Guide, Version 540 - IBMpublib.boulder.ibm.com/tividd/td/ITOMEGAIIDB2/G251... · 2 OMEGAMON II for DB2 Tuning Guide, Version 540 Registered trademarks and

237

Exception Analysis

Exception Analysis

The OMEGAMON II exception analysis panels provide information about current or potential problems within the system.

Menu structureFigure 89 on page 237 shows the options available to display OMEGAMON II exception analysis information.

FIGURE 89. Hierarchy of Exception Analysis Panels

Each of the Exception Messages panels show the messages associated with the exceptions that have tripped since the last OMEGAMON II cycle.

Exception Status

This selection provides a path to information about the threshold values associated with the exceptions.

Exception Messages for All Exceptions (E)

Exception Messages for All Exceptions

(A)

Exception Messages for

Thread Exceptions

(B)

Exception Messages for

CICS Exceptions

(C)

Exception Messages for

IMS Exceptions

(D)

Exception Messages for

System Exceptions

(E)

Exception Status

Information (F)

Exception Recomendation

(zoom/PF10)

Relevant Thread Detail

(zoom/Pf11) Current Status for

Tripped ALL, THREAD, CICS,

IMS and SYSTEM Exceptions

(F-J)

Current Status for ALL, THREAD, CICS, IMS, and

SYSTEM Exceptions

(A-E)

Reset Last & Worst Values for ALL, THREAD, CICS,

IMS and SYSTEM Exceptions

(K-O)

Page 238: OMEGAMON II for DB2 Tuning Guide, Version 540 - IBMpublib.boulder.ibm.com/tividd/td/ITOMEGAIIDB2/G251... · 2 OMEGAMON II for DB2 Tuning Guide, Version 540 Registered trademarks and

Thread Activity

238 OMEGAMON II for DB2 Tuning Guide, Version 540

Thread Activity

The OMEGAMON II thread activity panels provide information about the threads connected to DB2.

Menu structureFigure 90 on page 238 shows the panels available to display information about thread activity.

FIGURE 90. Hierarchy of Thread Activity Panels

Each of the Thread Summary panels provides general information about the threads that originate from the specified connection.

Threads Connected to DB2 (T)

All Threads Summary

(A)

TSO Thread Summary

(B)

CICS Thread

Summary

(C)

IMS Thread

Summary

(D)

Background Thread

Summary

(E)

Distributed Allied

Thread Summary

(F)

Distributed Database Access Thread

Summary(G)

Utility Summary

(H)

Inactive Threads

(I)

Filter Options

(J)

CICS RCT Detail

(zoom)

CICS RCT Summary

(zoom)

IMS Connection

Detail (Zoom)

Utility Detail (zoom)

(I)

Stopped Utility

Information (zoom)

Thread Detail

(zoom) (A)

Distributed Thread Detail

(zoom) (H)

Thread Detail

(A)

Locks Waits

(C)

Lock Counts

(B)

Locks Owned

(D)

Global Locks

(E)

Current SQL

(F)

SQL Counts

(G)

Distrib-uted

(H)

Buffer Pool

(I)

Package Summary

(K)

Parallel Tasks

(M)

Objects

(O)

DB2 Console

(Q)

Appl Trace

(S)

Resource Limit

(L)

Utility

(N)

Cancel Thread

(P)

DSN Activity

(R)

Func-tions

(K)

Stored Proce-dures

(L)

Triggers

(M)

Sysplex

(N)

Group Buffer Pool (J)

Page 239: OMEGAMON II for DB2 Tuning Guide, Version 540 - IBMpublib.boulder.ibm.com/tividd/td/ITOMEGAIIDB2/G251... · 2 OMEGAMON II for DB2 Tuning Guide, Version 540 Registered trademarks and

239

Thread Activity

Zooming to detailsFrom the Summary panels, to reach more detailed information

� about a specific thread, move the cursor to the name of the thread and press PF11. This takes you to the Thread Detail panel.

� about a specific IMS ID, place the cursor on the IMS ID and press PF11. The IMS Connection Detail panel appears. (You can then zoom to the Thread Detail panel if you wish.)

� about a specific CICS jobname, place the cursor on the CICS jobname, and press PF11. The CICS RCT Summary panel appears. This panel displays information about the DB2-CICS connection and about the RCT table assigned to that connection. (You can then zoom to the CICS Transaction Detail panel, and from there you can zoom to the Thread Detail panel.)

Navigation from thread detailsFrom the Thread Detail panel, you can choose several other panels:

� Thread Lock/Claim/Drain Activity� Locks/Claims Causing a Thread to Wait� Locks/Claims Owned by a Thread� Thread Global Lock Activity� SQL Call Being Executed� Current SQL Counts� Distributed Thread Detail� Thread Buffer Pool Activity� Thread Group Buffer Pool Activity� Thread Package Summary� Thread Resource Limit Statistics� Current Parallel Task Summary� Utility Detail Information� Objects � Cancel Thread� DB2 System Console and Message Traffic� Dataset activity � Application Trace

Page 240: OMEGAMON II for DB2 Tuning Guide, Version 540 - IBMpublib.boulder.ibm.com/tividd/td/ITOMEGAIIDB2/G251... · 2 OMEGAMON II for DB2 Tuning Guide, Version 540 Registered trademarks and

Locking Conflicts

240 OMEGAMON II for DB2 Tuning Guide, Version 540

Locking Conflicts

The Locking Conflicts option provides information about current conflicts for DB2 resources.

Menu structureFigure 91 shows the hierarchy of the Locking Conflict panels.

FIGURE 91. Hierarchy of Locking Conflict Panels

Zooming to detailsFrom the Locking Conflicts panel, move the cursor to the resources in conflict, and press PF11. This will display The Locks/Claims Owned by a Thread and Locks/Claims Causing a Thread to Wait panels.

Locking Conflicts

Locks/Claims Owned (zooom)

Lock/Claims Waits

(zoom)

Page 241: OMEGAMON II for DB2 Tuning Guide, Version 540 - IBMpublib.boulder.ibm.com/tividd/td/ITOMEGAIIDB2/G251... · 2 OMEGAMON II for DB2 Tuning Guide, Version 540 Registered trademarks and

241

Resource Managers

Resource Managers

The panels within the Resource Managers option provide information about the DB2 resource managers and other subsystem information.

Menu structureFigure 92 shows the hierarchy of the DB2 Resource Manager Information panels.

FIGURE 92. Hierarchy of Resource Managers and Other Subsystem Information Panel

Resource Managers and Other Subsystem Information (R)

Buffer Manager

Information(A)

EDM Pool Information

(C)

Subsystem Manager

(E)

IRLM Options

(G)

Lock Manager

(I)

OPEN/CLOSE Statistics

(K)

DB2 Log Manager Statistics

(B)

EDM Pool Snapshot Summary

(A)

Bind Statistics

(D)

Active Trace Summary

(F)

DSNZPARM

(H)

SQL Statistics

(J)

DB2 Commands

(L)

Buffer Pool Detail

(zoom)

Log Dataset Information

(zoom)

Active Trace Detail

(zoom)

Database Descriptors Snapshot

(zoom)

Cursor Tables Snapshot

(zoom)

Skeleton Cursor Tables

Snapshot(zoom)

Free Storage Snapshot

(zoom)

Buffer Pool Snapshot Datasets(zoom)

Pkg Tablesl Snapshot

(zoom)

Authorization Cache

Snapshot(zoom)

Skeleton Pkg Tables Snapshot

(zoom)

Buffer Pool Snapshot Datasets (zoom)

DSNZPARM Thread

Parameters (A)

DSNZPARM Trace

Parameters (B)

DSNZPARM Logging

Parameters (C)

DSNZPARM Archiving

Parameters (D)

DSNZPARM DDCS

Parameters (I)

DSNZPARM Access & Security

Parameters(E)

DSNZPARM IRLM

Parameters (F)

DSNZPARM Storage

Parameters(G)

DSNZPARM Dataset & Database

Parameters(H)

Page 242: OMEGAMON II for DB2 Tuning Guide, Version 540 - IBMpublib.boulder.ibm.com/tividd/td/ITOMEGAIIDB2/G251... · 2 OMEGAMON II for DB2 Tuning Guide, Version 540 Registered trademarks and

Resource Managers

242 OMEGAMON II for DB2 Tuning Guide, Version 540

Types of resource manager informationResource manager information covers:� buffer manager� log manager� EDM pool� lock manager� bind statistics� SQL statistics

You can also access information about:� statistics (for example, commit rate and create thread rate)� DSNZPARM parameters� open/close statistics� DB2 commands.

Zooming to detailsTo reach more detailed information

� about a specific buffer pool (from the Buffer Manager panel), move the cursor to the name of the buffer pool, and press PF11

� about a specific log or archive dataset (from the Log Manager panel), move the cursor to the name of the dataset, and press PF11

� about active traces (from the Active Trace Summary panel), move the cursor to the trace type, and press PF11

DSNZPARM informationTo display DSNZPARM information, use the horizontal menu to access the following types of parameters:

� thread� trace� logging� archiving� access and security� IRLM � storage� dataset/database� data definition control support (DDCS)

Page 243: OMEGAMON II for DB2 Tuning Guide, Version 540 - IBMpublib.boulder.ibm.com/tividd/td/ITOMEGAIIDB2/G251... · 2 OMEGAMON II for DB2 Tuning Guide, Version 540 Registered trademarks and

243

Application Trace Facility

Application Trace Facility

The panels within the Application Trace option provide information about the current DB2 application execution being traced.

Menu structureFigure 93 shows the hierarchy of the application trace facility panels.

FIGURE 93. Hierarchy of Application Trace Facility Panels

Specify Trace Request and Stop Trace

These selections allow you to start and stop an application trace.

View Active Trace

This selection displays summary information about the application trace that OMEGAMON II is currently executing, and provides navigation paths to additional information about specific areas of the trace. These areas include summaries at the unit of work and program levels, and details about specific programs, SQL statements, locks, and events.

Application Trace Facility Menu (A)

Specify Trace Request

(A)

View Active Trace

Summary

(B)

Stop Trace Request

(C)

Select Dataset &

Trace Parameters

View Trace Datset

(E)

Stop Viewing Trace Dataset

(F)

Unit of Work Summary

(zoom)

Program Summary

(A)

SQL Index

(B)

SQL Detail

(C)

Lock Detail

(D)

Event Detail

(E)

Program Detail

(zoom)

Page 244: OMEGAMON II for DB2 Tuning Guide, Version 540 - IBMpublib.boulder.ibm.com/tividd/td/ITOMEGAIIDB2/G251... · 2 OMEGAMON II for DB2 Tuning Guide, Version 540 Registered trademarks and

Application Trace Facility

244 OMEGAMON II for DB2 Tuning Guide, Version 540

Select Dataset and Trace Parameters

This selection allows you to choose a dataset in which trace data or extracted performance data has been stored. You can then view the data by selecting View Trace Dataset. This selection provides access to the same paths and panels as View Active Trace, but the data accessed is historical in nature.

Release Trace Dataset

Use this selection when you finish viewing a dataset to make the dataset available for redefinition/recreation.

Page 245: OMEGAMON II for DB2 Tuning Guide, Version 540 - IBMpublib.boulder.ibm.com/tividd/td/ITOMEGAIIDB2/G251... · 2 OMEGAMON II for DB2 Tuning Guide, Version 540 Registered trademarks and

245

Distributed Data Facility

Distributed Data Facility

The panels within the Distributed Data option provide information about the activity of DB2's Distributed Data Facility (DDF).

Menu structureFigure 94 shows the hierarchy of the DDF panels.

FIGURE 94. Hierarchy of Distributed Database System Panels

DDF Statistics

This selection displays information about the DDF-related interaction between a monitored DB2 subsystem and one or more remote DB2s.

DDF VTAM Summary

This selection displays DDF VTAM-related activity, such as analysis of VTAM APPC conversations.

Distributed Database System Information (D)

Distributed Data Facility Statistics

(A)

Distributed Data Facility VTAM

Summary (B)

Distributed Data Facility VTAM

Detail (C)

Distributed Data Historical

(H)

Distributed Thread Detail(zoom)

Lock Waits(C)

Thread Detail

(A)

Global Locks

(E)

SQL Counts

(G)

Buffer Pool(I)

Group Buffer Pool(J)

Package summary

(K)

Resource List

(L)

Utility

(N)

DB2 Console

(P)

Lock counts

(B)

Locks Owned

(D)

Current SQL

(F)

Distributed

(H)

Package Detail

(zoom)

Parallel Tasks

(M)

Cancel Thread

(O)

Dataset name activity

(R)

Page 246: OMEGAMON II for DB2 Tuning Guide, Version 540 - IBMpublib.boulder.ibm.com/tividd/td/ITOMEGAIIDB2/G251... · 2 OMEGAMON II for DB2 Tuning Guide, Version 540 Registered trademarks and

Distributed Data Facility

246 OMEGAMON II for DB2 Tuning Guide, Version 540

DDF VTAM Detail

This selection provides a look at DDF activity from a VTAM-session perspective and provides access to the panels that display thread detail information.

DDF Historical

The Distributed Data Facility Summary by Report Interval panel provides an overview of the DDF activity that was recorded during a series of report intervals.

Page 247: OMEGAMON II for DB2 Tuning Guide, Version 540 - IBMpublib.boulder.ibm.com/tividd/td/ITOMEGAIIDB2/G251... · 2 OMEGAMON II for DB2 Tuning Guide, Version 540 Registered trademarks and

247

Object Analysis

Object Analysis

The panels within the Object Analysis option help you evaluate DB2 objects.

Menu structureFigure 95 on page 247 shows the hierarchy of the object analysis panels.

FIGURE 95. Hierarchy of Object Analysis Panels

Object Allocations

This path displays allocation-related information at the database, space (tablespace/indexspace), and dataset levels.

Object Activity

This path displays getpage and I/O activity at the database and space level.

From the object activity panels, you can navigate to related thread panels that analyze thread I/O activity by database and spacename.

Object Analysis (O)

Object Allocation Summary

(A)

Object Activity

Summary (B)

Volume Activity

Summary (C)

Dataset Extend Activity

(D)

Display Options

(E)

Collector Control

(F)

Database Allocations

(zoom)

Database Activity(zoom)

Thread Database

Activity (C)

Volume Database Activity

(A)

Volume Service

(B)

Thread Activity by

Volume (C)

SpacenameAllocations

(zoom)

SpacenameActivity (zoom)

Thread Space Activity

(C)

Dataset Allocations

(zoom)

Volume Spacename

Activity (zoom)

Volume Thread

Database (C)

Volume Dataset Activity (zoom)

Volume Thread

Spacename (C)

Volume DS/Extent

Activity (zoom)

Volume Thread Dataset

(C)

Start Object Analysis

Collection (A)

Stop Object Analysis

Collection (B)

Page 248: OMEGAMON II for DB2 Tuning Guide, Version 540 - IBMpublib.boulder.ibm.com/tividd/td/ITOMEGAIIDB2/G251... · 2 OMEGAMON II for DB2 Tuning Guide, Version 540 Registered trademarks and

Object Analysis

248 OMEGAMON II for DB2 Tuning Guide, Version 540

Volume Activity

This path allows you to observe the performance of volumes that contain DB2 objects in order to evaluate DASD performance by volume.

From the volume activity panels, you can navigate to related thread activity panels that analyze thread I/O activity by volume, database, spacename and dataset.

Other Panels

Other object analysis panels allow you to:

� analyze dataset extent activity� select filtering criteria for the panels described above� select options for the operation of the object analysis collector

Page 249: OMEGAMON II for DB2 Tuning Guide, Version 540 - IBMpublib.boulder.ibm.com/tividd/td/ITOMEGAIIDB2/G251... · 2 OMEGAMON II for DB2 Tuning Guide, Version 540 Registered trademarks and

249

Miscellaneous Displays

Miscellaneous Displays

The panels within the Miscellaneous option provide information about the DB2 address spaces. They also provide a place for you to issue OMEGAMON II commands.

Menu structureFigure 96 on page 249 shows the hierarchy of the DB2 address space and OMEGAMON II commands panels.

FIGURE 96. Hierarchy of Address Space and OMEGAMON Commands Panels

Address Space Information

These selections provide a way to display detailed information about four DB2 address spaces:

� system services� database services� IRLM � Distributed Data Facility

Address Space Information and OMEGAMON Commands (M)

Examine DB2 Database Services

Address Space(B)

Examine DB2 System Services Address Space

(A)

Examine DB2 IRLM Address Space

(C)

Examine DB2 DDF Address Space

(D)

Issue OMEGAMON Commands

(E)

DB2 Address Space Virtual Storage Map

(A)

DB2 Address Space Job

Information (C)

DB2 Address Space Region

(E)

DB2 Address Space TCB Structure

(G)

DB2 Address Space Allocations

(B)

DB2 Address Space Modules

(D)

DB2 Address Space Subpool

Usage

(F)

Page 250: OMEGAMON II for DB2 Tuning Guide, Version 540 - IBMpublib.boulder.ibm.com/tividd/td/ITOMEGAIIDB2/G251... · 2 OMEGAMON II for DB2 Tuning Guide, Version 540 Registered trademarks and

Miscellaneous Displays

250 OMEGAMON II for DB2 Tuning Guide, Version 540

OMEGAMON II Commands Menu

This selection provides a panel that allows you to issue OMEGAMON II commands.

When you select one of the four DB2 address spaces, OMEGAMON II makes the following types of information available, using a horizontal menu format:

� virtual storage map� allocations� job information� modules� regions� subpool usage� TCB structure

Page 251: OMEGAMON II for DB2 Tuning Guide, Version 540 - IBMpublib.boulder.ibm.com/tividd/td/ITOMEGAIIDB2/G251... · 2 OMEGAMON II for DB2 Tuning Guide, Version 540 Registered trademarks and

251

Profile Maintenance Facility

Profile Maintenance Facility

The panels within the Profile Maintenance Facility allow you to set the options that control how &O. displays information on your terminal and to set exception threshold values and characteristics.

Menu structureFigure 97 on page 251 shows the options available from the OMEGAMON II Profile Maintenance Menu.

Note: To set exception thresholds for the CUA interface, log onto the CUA interface and set threshold values. These settings will also be effective for the classic interface. Thresholds set through the classic interface will not be effective for the CUA interface

FIGURE 97. .Hierarchy of Profile Maintenance Facility Panels

From the Profile Maintenance Menu, you can:

� reach other menus that allow you to set options that control your &O. session, or that set the characteristics of OMEGAMON II exceptions

Profile Maintenance Menu (P)

Session Options

(A)

Save New/Altered User Profile

(E)

List Profiles

(C)

Save New/Altered Installation Profile

(G)

Exception and Automatic Panel

Logging(I)

Exception Analysis Options

(B)

Describe a Profile

(D)

Delete User Profile

(F)

Delete Installation

Profile(H)

Set Messages that MSGE Exception Monitors

(J)

Single Exception

(E)

DB2 System

(A)

Thread

(B)

CICS

(C)

IMS

(D)

Set Display Options

(A)

Set Control Function Options

(B)

Set Printer and routing Options (

C)

Set ExceptionAnalysis

Message Option(D)

Set Performance

Options (E)

Set BackgroundException Processing

(F)

Page 252: OMEGAMON II for DB2 Tuning Guide, Version 540 - IBMpublib.boulder.ibm.com/tividd/td/ITOMEGAIIDB2/G251... · 2 OMEGAMON II for DB2 Tuning Guide, Version 540 Registered trademarks and

Profile Maintenance Facility

252 OMEGAMON II for DB2 Tuning Guide, Version 540

� save the session options and exception characteristics that you specify in a user or installation profile

� delete an existing user or installation profile

Session Options

This selection provides the path to options that control:

� the display of information on panels� how the session runs� the printing and routing of information� the default exception analysis message� performance options� background exception processing

Set Exception Analysis Options by Alphabetical Range Menu

This selection allows you to set the characteristics of one or more exceptions in an alphabetical range.

Set Exception Analysis Options by Group Menu

This selection allows you to set the characteristics of an entire group of exceptions.

Exception Logging

This selection allows you to turn on and off the exception logging facility (XLF) and the automatic panel logging facility (ASF), and to control printer and routing options.

Page 253: OMEGAMON II for DB2 Tuning Guide, Version 540 - IBMpublib.boulder.ibm.com/tividd/td/ITOMEGAIIDB2/G251... · 2 OMEGAMON II for DB2 Tuning Guide, Version 540 Registered trademarks and

253

Near-Term Historical Information

Near-Term Historical Information

The panels within the Historical option allow you to view near-term historical information and online collector-related information. Figure 98 on page 253 shows the hierarchy of the online history panels.

FIGURE 98. Hierarchy of Near-Term Historical Panels

Online Historical Information (H)

Collector Information

(C)

Near-Term Statistics

(A)

Near-Term Thread History

(B)

Filter

Confirm

Collector Options

(A)

Historical Record

Information (B)

By Report Interval

By Sub Interval

Group By

Thread Summary

SubsystemStats

Summary (A)

Bind Stats

Summary (B)

Buffer Pool Stats

Summary(C)

DDF Stats

Summary(E)

EDM Pool Stats

Summary (F)

Log Manager

Stats Summary

(G)

Lock/ClaimDrain-

Summary(J)

SQL Stats

Summary (I)

OPEN/ CLOSE Stats

Summary (H)

DB2 Command

Stats Summary

(L)

SubsystemStats Detail (zoom)

Bind Stats Detail (zoom)

Buffer pool stats detail

(zoom)

DDF Stats Detail

(zoom)

EDM Pool Stats Detail

(zoom)

Log Manager

Stats Detail (zoom)

Lock Manager

Stats Detail

(zoom)

SQL Stats Detail (zoom)

OPEN /CLOSE

Stats Detail

(zoom)

DB2 Command

Stats Detail

(zoom)

Near-TermReport Options

(O)

Group BP (D)

Global Lock(K)

Page 254: OMEGAMON II for DB2 Tuning Guide, Version 540 - IBMpublib.boulder.ibm.com/tividd/td/ITOMEGAIIDB2/G251... · 2 OMEGAMON II for DB2 Tuning Guide, Version 540 Registered trademarks and

Near-Term Historical Information

254 OMEGAMON II for DB2 Tuning Guide, Version 540

Using the Online Historical Information Menu

Near-term history

These selections selections trace information that has been gathered by the online collector and stored in core. Up to 96 intervals' worth of data can be viewed on these panels, in summary and detail formats.

These panels can also be accessed from the corresponding panels in the Resource Managers menu path. For example, if you select option H(istorical) while you are on the Buffer Pool Detail panel, the Buffer Pool Statistics Summary by Report Interval panel will appear.

Online collector

These selections display your current data collection specifications and information about the records that have been collected since the collector was started.

Page 255: OMEGAMON II for DB2 Tuning Guide, Version 540 - IBMpublib.boulder.ibm.com/tividd/td/ITOMEGAIIDB2/G251... · 2 OMEGAMON II for DB2 Tuning Guide, Version 540 Registered trademarks and

255

Section B: Historical ISPF Panels

Section B: Historical ISPF Panels

When you begin an OMEGAMON II historical session, the first panel that appears is the OMEGAMON II for DB2 ISPF Primary Options Menu. To access OMEGAMON II's historical panels, select HISTORICAL from this menu.

Historical Main MenuFigure 99 shows how OMEGAMON II's historical panels relate to each other. For more information on navigation between panels, see the OMEGAMON II for DB2 Reference Manual and the OMEGAMON II for DB2 Historical Reporting Guide.

FIGURE 99. Hierarchy of Historical Component Panels

Historical Main Menu

Reporter Menu

Data Collection

Data Extraction

Data Sum-marization

Online Data Dictionary

OnlineOMEGAMONMessages

ATF Reporter (ISPF)

Data Collection

Data Types

Data Extraction

Data Types

Data Sum-marization Data Types Print JCL

Options

Data Collection Options

Extractor JCL Options

Summiar-ization JCL

Options

Reporter Options

Statistics Reports

Account-ing

Reports

Audit Reports

DSNZPARMReports

Perfor-mance Reports

Graphical Reports

Input Summary

Batch Job GenerationOptions

Report Specifica-

tion

Source Datasets

DB2 Tables

Selection Criteria

Date/Time Criteria

Page 256: OMEGAMON II for DB2 Tuning Guide, Version 540 - IBMpublib.boulder.ibm.com/tividd/td/ITOMEGAIIDB2/G251... · 2 OMEGAMON II for DB2 Tuning Guide, Version 540 Registered trademarks and

Section B: Historical ISPF Panels

256 OMEGAMON II for DB2 Tuning Guide, Version 540

Using the Historical Main MenuThe following features can be accessed from the Historical Main Menu:

� OMEGAMON II for DB2 reporter� data collection� data extraction� data summarization� online data dictionary� online OMEGAMON II messages documentation� application trace facility (an ISPF version that accesses trace data stored in VSAM

datasets)

Page 257: OMEGAMON II for DB2 Tuning Guide, Version 540 - IBMpublib.boulder.ibm.com/tividd/td/ITOMEGAIIDB2/G251... · 2 OMEGAMON II for DB2 Tuning Guide, Version 540 Registered trademarks and

257

Symbols.FGO command 228, 232.RTN command 232.SGO command 228, 232/C default profile 53

Numerics3270 access 26

AAdobe portable document format 12advanced features 222alarm feature for exceptions 26analyzing IFCID trace data 165analyzing system problems

CICS subsystems 81, 91analyzing thread problems

background threads 85batch threads 85CICS threads 80IMS threads 83stored procedures threads 90TSO threads 84utility threads 86

analyzing trace data 165APPC conversations 180application activity analysis 188application performance monitoring 62application trace facility (ATF) 134, 141, 243

releasing a dataset 163starting a trace 138, 159stopping a trace 143trace information (event detail) 156trace information (lock summary) 148trace information (program detail

information) 144trace information (scan summary) 149trace information (sort summary) 147trace information (SQL detail) 151, 153trace information (SQL index) 151trace information (SQL summary) 146trace information (thread summary) 140, 161trace information (trace datasets) 138trace information (trace overhead) 138, 161trace information (unit of work summary) 141,

161

viewing active traces 140viewing trace dataset 158

ASF 225, 226ASF example 233Auto keyword 226automated features 223automatic screen facility (ASF) 225

parameters 226

Bbackground facilities 222background option 223background thread problems 85batch thread problems 85bell feature for exceptions 26bind options 219bind statistics 213buffer pool activity

detail 196expansion 197snapshot information 201summary 194thresholds 199

Ccanceling traces 143Candle Web site 14character string padding 220CICS RCT Summary panel 81, 91CICS resource control block 81, 91CICS thread problems 80classic interface 24COLLECT option 55commits per second 63Communications Database (CDB) 170connection detail, IMS 83connection information 62Connections field 62conversation

definition 170primary 175secondary 175status 177types 176VTAM APPC 180

CPU field 62

Index

Page 258: OMEGAMON II for DB2 Tuning Guide, Version 540 - IBMpublib.boulder.ibm.com/tividd/td/ITOMEGAIIDB2/G251... · 2 OMEGAMON II for DB2 Tuning Guide, Version 540 Registered trademarks and

258 OMEGAMON II for DB2 Tuning Guide, Version 540

Create Thread Rate field 63CUA interface 24

with VTAM mode 38Current Lock Suspensions field 62cursor position, customizing 32customizing

cursor placement 32thread detail panel 103

cycles for exception reporting 61

Ddata collection 42data extraction 42, 55database access threads 170

detail information 179summary information 88types 88

Database Activity panel 189Database Allocations panel 190database request module (DBRM) 142datasets

maximum open 195trace 139

date format 26DB2 activity

application performance 62exception conditions 61locks 62locks owned by a DB2 thread 128resource managers 62system environment 63thread locking activity 130threads 62

DB2 ISPF Primary Options Menu 34DB2 locks, troubleshooting 62, 128, 131DB2 messages, monitoring 69DB2 resource manager information 62DB2 START TRACE command 159DB2 tools 35DB2./IRLM messages, monitoring with MSGE 69DDF (Distributed Data Facility)

definition 170deadlocks 62dedicated mode 61defining standards 44, 53DEFTIOTS 195detailed utility information 99displaying IFCID trace data 167distributed allied threads 170

detail information 179summary information 89types 88

Distributed Data Facility 245definition 170DSNZPARM parameters 172flush data to requestor 181MAXDBAT parameter 172, 173MDBT exception 172MDBW exception 172SQL statistics 181statistics 171thread detail 179VTAM APPC conversations 180VTAM detail information 176VTAM summary information 174

DRDY exception 233DSNZPARM 249

DDF parameter 172MAXDBAT parameter 172, 173

Dynamic SQL cache 211

EEDM pool 210

dynamic SQL cache (DSC) 206starting 205

EDM Pool SnapshotSQL cache 211viewing 210

EDSN 210elapsed time 62Elapsed Time field 62exception analysis 48, 223, 224

logging parameters 226setting thresholds 42, 46using historical reports 71, 73

exception logging facility 224exception messages 68

response procedure 66exception option 223exception rules 50

global exclude rules 52exceptions

alarm feature 26analyzing tripped 66definition 42for threads 49information reported 46MDBT exception 172MDBW exception 172monitoring 42MSGE 69options for settings 48, 50problems with 66, 73recommendations for 33, 68

Page 259: OMEGAMON II for DB2 Tuning Guide, Version 540 - IBMpublib.boulder.ibm.com/tividd/td/ITOMEGAIIDB2/G251... · 2 OMEGAMON II for DB2 Tuning Guide, Version 540 Registered trademarks and

259

resolving 66saving a profile 53setting thresholds 48, 50tripped 45, 46validate default setting 46writing exception rules 50

exit key 29EXSY command 232EXTRACT option 55

Ffast paths 31filtering historical data 57flagging exception messages

DB2 messages 69IRLM messages 69

flush DDF data 181FMH5 data 181function keys

default settings 29in ISPF dialog 37use with historical features 37

GGetpage Rate field 62getpage to read I/O ratio 62getpages per second 62Getpages/Read I/O field 62global exclude rules 52GTF 134, 160

Hhelp 33

for historical panels 37for ISPF panels 37for report displays 37PF 1 key 29

highlighting 33historical features

accessing 36data collection 55data extraction 55, 160help 33ISPF dialog 34main menu 55, 56near-term history 253panel format 34

Historical Main Menu 55, 56Historical Reporter Date/Time Criteria panel 57Historical Reporter Menu 56historical reporting 56

analyzing exception conditions 71, 73, 105, 108

generating reports 36Historical Reporter Options menu 57setting report options 56using to track locking conflicts 131

historical sessionsstarting (from ISPF PDF option 6) 39starting (from TSO READY) 39stopping 40

horizontal menus 30

IIFCID trace facility 165

displaying trace data 167header information 167output dataset requirements 167starting 167stopping 168types of information collected 166

IMS Connection Detail panel 83IMS thread information 83inactive threads 87indexes, use of in DB2 218INFO-line 25information collected by IFCID trace 166IRLM messages, monitoring 69ISPF dialog 34, 37ISPF mode of operation

cycle length 61starting a historical session 39starting a realtime session 39

ISPF Primary Options Menu 34

KKD2SPF CLIST 34

LLimit field 226location, DB2 170lock activity conflicts 128

locks owned by a DB2 thread 128resolving 128, 131thread locking activity 130using historical reports 131

lock summary 148Locking Conflicts panel 128locking information 62, 128

lock summary 148LOG component on INFO-line 26Log Dataset Information panel 204Log field 226log manager 202logging facililty (XLF) 224

Page 260: OMEGAMON II for DB2 Tuning Guide, Version 540 - IBMpublib.boulder.ibm.com/tividd/td/ITOMEGAIIDB2/G251... · 2 OMEGAMON II for DB2 Tuning Guide, Version 540 Registered trademarks and

260 OMEGAMON II for DB2 Tuning Guide, Version 540

logging parameters 230logical tuning approach 42LU 6.2 services 170, 180

MMAXDBAT parameter 172, 173MDBT exception 172MDBW exception 172menus 30

historical 36messages

generating 36ISPF menu option 35monitoring 69

modes of operationdedicated 39ISPF 38TSO 39VTAM 38

MSGE exception 69

Nnavigation 30

fast path 31, 46ISPF dialog menu options 37options 27

near-term history 253numeric conversions 219

OObject Activity Summary panel 188object analysis information 184

analyzing application activity 188analyzing volume response time 185panel flow chart 247

OMEGAMON II ISPF Primary Options Menu 34OMEGAVIEW 222online help 33operation modes

dedicated 39ISPF 38TSO 39VTAM 38

optimizer, DB2 219Options Menu, historical reporter 57Options selection 56OPTN immediate, TSF keyword 228OPTN keyword 233OUTP 230output dataset requirements

IFCID trace data 167OWN status 128

Ppages written per write I/O 62Pages/Write I/O field 62panels

Buffer Pool Snapshot Datasets 201CICS RCT Summary 81, 91Database Activity 189Database Allocations 190Historical Reporter Date/Time Criteria 57Object Activity Summary 188Realtime Main Menu 27Volume Database Activity 186Volume Spacename Activity 187

PDF files, adding annotations 13PDF option 6 39performance monitoring 44, 53, 60Persist keyword 227PF 1 key 29PLAN

SQL Call panel 102SQL Counts panel 100

PPRF SAVE option 53Prefetch Req Rate field 61, 62primary conversation (DDF) 175Primary Options Menu 35print key, realtime 29printing problems 12problems,system 45profile identifier 25, 26profile maintenance 251Profile Maintenance Menu 48Profile selection on Main Menu 48profiles

(/C) 53menu option 223modifying exception settings 48saving 53

program summaries 141

Qquery performance 216

RREADY prompt 39realtime 29realtime panels

accessing 35cursor placement 32exception recommendations 33fast path 31function keys 29highlighting 33

Page 261: OMEGAMON II for DB2 Tuning Guide, Version 540 - IBMpublib.boulder.ibm.com/tividd/td/ITOMEGAIIDB2/G251... · 2 OMEGAMON II for DB2 Tuning Guide, Version 540 Registered trademarks and

261

INFO-line 25navigation 30, 31online help 33

realtime session 40functions 27main menu 27monitoring DB2 activity 61stopping 40

recommendations, exception 33, 68PF key 29

remote DB2 170remote terminals 38Repeat keyword 226REPORT log 230, 234Report selection, historical main menu 56reporting options, setting 56requestor, DB2 170resolving exception conditions 73resolving locking conflicts 128, 131resource manager information 62, 192response procedure 68return key, realtime 29

SSave User selection, Profile Maintenance Menu 53saving

exception settings 53user profile 53

Sc field 227scan, summary information 149screen space 223screen space, creating 103screens, logging 136scroll keys 29secondary conversaton (DDF) 175sequential prefetch requests per second 61, 62server, DB2 170session

starting 38VTAM (in DDF) 170

setting exception thresholds 48setting report options 56Single selection, Exception Analysis Option Menu 49SL keyword 227, 229SMF 134, 160snapshot data 201snapshot information for buffer pools 201sort summary information 147specifying dataset 159split-panel mode 38SQL

calls 102, 218

counts 100distributed statistics 181performance data 134query performance 216using indexes 218using views 218

SQL cache 211SQL summary information 146SS keyword 227, 229START TRACE command 159starting a realtime session 38starting an IFCID trace 167Statistics Reports panel 59stopped utility information 99stopping an IFCID trace 168stopping OMEGAMON II sessions

historical 40realtime 40

stored procedures, problems 90string padding 220suspended threads 130Synch Read I/O Rate field 61, 62synchronous read I/Os per second 61, 62system activity 61system performance

characterizing 45monitoring 60realtime monitoring of 61

system problemsapplication performance 62exception conditions 61, 71, 73general environment 63locks 62, 128, 131resource managers 62threads 62, 75, 108tuning 45

system thread information 62, 92

TThis 177Thread Commit Rate field 63thread exception rules, using 50thread history facility 108, 125Thread Signon Rate field 63thread signon requests per second 63threads

background 85batch 85CICS 80, 90connection type 77detail 94, 103distributed 88, 179

Page 262: OMEGAMON II for DB2 Tuning Guide, Version 540 - IBMpublib.boulder.ibm.com/tividd/td/ITOMEGAIIDB2/G251... · 2 OMEGAMON II for DB2 Tuning Guide, Version 540 Registered trademarks and

262 OMEGAMON II for DB2 Tuning Guide, Version 540

distributed (hung) 177, 180exceptions (setting rules for) 49exceptions (viewing) 49historical activity 75, 108IMS 83inactive 87locking activity 130monitoring 62near-term history 108, 125suspended 130system 92TSO 84utility 86

Threads field 62thresholds, exception 50

definition 42setting 46

timed screen facility (TSF) 228cancel while running 232logging parameters 230using screen spaces 232

trace datasets 139, 159releasing 163

trace, application 159starting 137, 158stopping 143viewing 161

trace, IFCIDdisplaying trace data 167output dataset requirements 167overview 165starting 167stopping 168types of information collected 166

TSF command 228TSF00 command 228TSO

mode of operation 39, 61, 84READY prompt 39threads 84

Uunit of work (UOW) 141Update Request Rate field 62update requests per second 62user interface 24user profile 53

default 26facility 48saving 53

using screen spaces 232utility detail for a thread 98

utility thread information 86

Vvalidating thresholds 46vertical menus 30views, use of 218volume response scenario 185Volume Spacename Activity panel 187VSAM datasets

for ATF capture 134VTAM

APPC conversations 180CONTROL= macro 180DDF detail information 176DDF summary information 174FMH5 data 181LU 6.2 services 170, 180mode of operation (cycle length) 61modes of operation 38QUALIFY= macro 180session (in DDF) 170

WWAIT status 128Web site, Candle 14Write I/O Rate field 62write I/Os per second 62

XXACB 233XLF 224, 226XLFLOG 230

Zzooming 31

PF key 29