DB2 Through My Eyes

download DB2 Through My Eyes

If you can't read please download the document

Transcript of DB2 Through My Eyes

1. Session zPE2235 : DB2 Through My Eyes Martin Packer [email protected] 2. Abstract Bridging the gap in perspectives between DB2 and System Performance specialists is a perennial concern of mine: As a specialist in one you're much more valuable if you can bridge that gap. This presentation shows some techniques I use to understand a customer's DB2 environment before I talk to a customer's DB2 specialists (or indeed my own). All these techniques are available to you, the data being readily available. I hope you find them useful. 3. What Is DB2? (for the purposes of this discussion) 4. Subsystems 5. CPU 6. CPU ... Track CPU by e.g. Time Of Day Regular variations Spikes Detect split between e.g. zIIP-eligible and non- For example, Prefetch and Deferred Write might fall away at certain times What is a reasonable expectation? Notice when zIIP-eligible work ends up on GCPs For DIST detect when non-Enclave work is large Might suggest issues with e.g. Authentication 7. 2014 IBM Corporation8 A DB2 Version DBM1 Address Space's zIIP and CPU Usage Over 24 Hours 8. Real Memory SMF 30 data useless for real memory Memory service declines if CPU queuing experienced Use SMF 72 Subtype 3 Reporting Class for individual or groups of DB2 subsystems Vast majority will be DBM1 Use DB2 IFCID 225 data Accurate real memory statistics 9. Virtual Memory SMF 30 shows allocated Above and below the line High and Low 64-Bit Accurate - so far as it goes - for all address spaces Use DB2 IFCID 225 data Accurate virtual memory statistics for DBM1 IRLM, MSTR, DIST much smaller Use DB2 Statistics Trace for area usage / value 10. I/O Both system and database I/O best represented by SMF 42-6 Database and Table Space / Index Space encoded in data set qualifiers Relatable to buffer pool by the DB2 Catalog Looking for: I/O rate cacheability* Read / Write ratio Components of response time * Caution over Sync Remote Copy Disconnect Time 11. Coupling Facility 12. Parallel Sysplex Coupling Facility 3 types of Coupling Facility structure: GBPs, LOCK1, SCA Often duplexed Configurations vary considerably Lots of useful information e.g. LOCK1 False Contention e.g. Group Buffer Pool sizing & Data / Directory split Augment with DB2 Statistics Trace perspective 13. XCF 14. Parallel Sysplex - XCF Most traffic in support of LOCK1 IXCLOmmm Telling XES Contention from False Latter usually caused by Lock structure being too small DXRnnnnn Telling IRLM Contention from XES Understand how traffic varies with time of day Note: XCF member job name in R742MJOB 15. Stored Procedures Native run in DBM1 address space Others run in Server Address Spaces Stored procedure defined with Application Environment Caller runs in a Service Class Queue serves combination of SC and AE WLM starts and stops address spaces PGM=DSN9XWLM Can see e.g. CPU, virtual storage, EXCPs, Unix statistics in SMF 30 Data set in SMF 42-6 Normally I roll up all address spaces with same name Probably not a good idea for server address spaces Not rolling up yields start / stop timestamps, balance Population might be important and roll up is fine for this 16. Applications 17. Application SMF 30 Usage Data Section 18. Application Performance - Using SMF 101 CPU usage and lots of elapsed time buckets With Trace Classes 1,2,3 Down to program (Package) with 7,8 SQL counts at program level with 10 For Interactive Granularity down to eg CICS Transaction and Program For DDF The SMF way to detect DDF access to a DB2 Lots of identifiers Suitable for encoding in WLM Policy 19. Accounting Trace (SMF 101) - Batch 20. Specialist Subjects 21. Workload Manager SMF 30 identifies Workload, Service Class, Report Class I use this to establish if eg DBM1 well classified DDF requires Accounting Trace QWACWLME field Allows analysis of what DDF work comes in and how it's classified WLM ISPF TLIB tells me the rules 22. Rules Goal 23. DDF Rules 24. Restarts SMF 30 has Reader Start Time Can compare to IPL No customer (yet) restarts Production DB2 daily Some restart weekly or fortnightly Some have been up for months My parallel sysplex customers roll round the sysplex Gap because I have data from Weds onwards 25. Conclusion A bridge, not a bypass In a cloudier world detecting e.g. DB2 subsystems without specialist instrumention is valuable. Understanding what's normal is valuable Especially if you can do it with little effort