Evolution of CPU and ziip usage inside the DB2 system address spaces

Similar documents
CPU and ziip usage of the DB2 system address spaces Part 2

DB2 Performance Health Check... in just few minutes. DUGI 8-9 April 2014

DB2 and Memory Exploitation. Fabio Massimo Ottaviani - EPV Technologies. It s important to be aware that DB2 memory exploitation can provide:

The Present and Future of Large Memory in DB2

The Major CPU Exceptions in EPV Part 2

DB2 Performance A Primer. Bill Arledge Principal Consultant CA Technologies Sept 14 th, 2011

IFCID Instrumentation Accounting Data This topic shows detailed information about Record Trace - IFCID Instrumentation Accounting Data.

A. Specify NUMTCB=10 and allow 1 WLM managed stored procedure address space per sysplex for AE1.

Measuring the WebSphere Message Broker - Part 2

DB2 for z/os Real Storage Monitoring, Control and Planning

Practical Capacity Planning in 2010 zaap and ziip

DB2 for z/os and ziip & zaap

z10 Capacity Planning Issues Fabio Massimo Ottaviani EPV Technologies White paper

Collecting DB2 Metrics in SMF Part 3

DB2 for z/os Distributed Data Facility Questions and Answers

What Developers must know about DB2 for z/os indexes

Maximizing offload to ziip processors with DB2 9 for z/os native SQL stored procedures

DB2 Data Sharing Then and Now

Times - Class 3 - Suspensions

Facebook Website LinkedIn

The Present and Future of Large Memory in DB2. Jay Yothers DB2 for z/os Development, IBM

z/os 1.11 and z196 Capacity Planning Issues (Part 2) Fabio Massimo Ottaviani EPV Technologies White paper

White Paper. 1 Introduction. Managing z/os costs with capping: what s new with zec12 GA2 and z/os 2.1? Fabio Massimo Ottaviani - EPV Technologies

CA IDMS 18.0 & 18.5 for z/os and ziip

Key Metrics for DB2 for z/os Subsystem and Application Performance Monitoring (Part 1)

Sysplex: Key Coupling Facility Measurements Cache Structures. Contact, Copyright, and Trademark Notices

First z/os Knights tournament

WLM Work Manager Delays (Part 2) Fabio Massimo Ottaviani EPV Technologies White paper WLM series

290 Index. Global statement cache. See Caching

DB2 V10 upgrade Colruyt. slide 1

Key Metrics for DB2 for z/os Subsystem and Application Performance Monitoring (Part 1)

Managing CPU Utilization with WLM Resource Groups Part 2

Avoiding Performance SRs. Title 32. Copy/Deck/Line 22. Adrian Burke DB2 SWAT Team SVL Insert Custom Session QR if Desired.

What it does not show is how to write the program to retrieve this data.

DB2 9 for z/os V9 migration status update

DB2 for z/os Distributed Data Facility Questions and Answers

DB2 Analytics Accelerator Loader for z/os

IBM Application Performance Analyzer for z/os Version IBM Corporation

Memory for MIPS: Leveraging Big Memory on System z to Enhance DB2 CPU Efficiency

Are you an application DBA, but you hear the call of DB2 system administration? Then this session is for you. We will explain different aspects and

DB2 Stored Procedures Monitoring, Analysis, and Tuning on System z

From SMF to Excel: graphs and reports in one click Part 1

Stored Procedure Monitoring and Analysis

z/os Availability: Blocked Workload Support

Expert Stored Procedure Monitoring, Analysis and Tuning on System z

DB2 for z/os: Data Sharing Update

IBM Education Assistance for z/os V2R2

Collecting DB2 Metrics in SMF

DB2 is a complex system, with a major impact upon your processing environment. There are substantial performance and instrumentation changes in

DB2 11 for z/os Availability Enhancements. More Goodies Than You May Think

DB2 for z/os Utilities Update

What Happened to My DB2? The Top Missteps in High Availability

ANALYZING DB2 DATA SHARING PERFORMANCE PROBLEMS

Db2 12 for z/os. Data Sharing: Planning and Administration IBM SC

End to End Analysis on System z IBM Transaction Analysis Workbench for z/os. James Martin IBM Tools Product SME August 10, 2015

Optimising Insert Performance. John Campbell Distinguished Engineer IBM DB2 for z/os Development

Best practices. IBMr. How to use OMEGAMON XE for DB2 Performance Expert on z/os to identify DB2 deadlock and timeout. IBM DB2 Tools for z/os

DB2 for z/os Tools Overview & Strategy

DB2 Stop & Start Deep Dive

IMS K Transactions Per Second (TPS) Benchmark Roadblocks, Limitations, and Solutions

DB2 11 for z/os Application Functionality (Check out these New Features) Randy Ebersole IBM

DB2 11 for z/os : Performance Topics

Click to edit Master subtitle style

DB2 10 for z/os Technical Update

IMS Performance - Getting The Most Out Of Your Monitoring Technology: Isolating And Solving Common Issues

Managing WLM on your desktop

An A-Z of System Performance for DB2 for z/os

DB2 Type II Index Processing in a Data Sharing Environment William J. Raymond David J. Young Amdahl Corporation

Auto Alter for DB2 Couch Potatoes

DB2 for z/os Stored Procedures Update

The Modern Mainframe At the Heart of Your Business

F e b r u a r y Tech Papers. Tech News. Tech Notes. Tech Support

DB2 for z/os and OS/390 Performance Update - Part 1

Optimizing Insert Performance - Part 1

Key Metrics for DB2 for z/os Subsystem and Application Performance Monitoring (Part 2)

IBM Mobile Workload Pricing Opportunity or Problem?

IMS V13 Overview. Deepak Kohli IMS Product Management

DB2 for z/os Buffer Pool Tuning: Win by divide and conquer or lose by multiply and surrender

Automation for IMS: Why It s Needed, Who Benefits, and What Is the Impact?

Vendor: IBM. Exam Code: C Exam Name: DB2 10 System Administrator for z/os. Version: Demo

Session 8861: What s new in z/os Performance Share 116 Anaheim, CA 02/28/2011

The Dark Side of Monitoring MQ on z/os - SMF 115 and 116 Record Reading and Interpretation

HiperDispatch Logical Processors and Weight Management

Version Overview. Business value

WMQ for z/os Auditing and Monitoring

Understanding The Interaction Of z/os Workload Manager And DB2

Roll Up for the Magical Mystery Tour of Software Costs 16962

OMEGAMON Enhanced 3270UI Webcast Monitoring Db2 using the Enhanced 3270 UI New Feature Thread History

IMS/DBCTL Migration and Performance Considerations

IBM Education Assistance for z/os V2R1. Item: Log Stream Primary Storage Consumption Alert Messaging Element/Component: BCP System Logger

DB2 for z/os Buffer Pool Tuning: "Win by divide and conquer or lose by multiply and surrender"

GDPS/PPRC 100Km Distance Testing

Software Migration Capacity Planning Aid IBM Z

z/os 1.11 and z196 Capacity Planning Issues

DB2 for z/os Best Practices Recommendations from DB2 Health Check Studies: Operations

Workload Insights Without a Trace - Introducing DB2 z/os SQL tracking SOFTWARE ENGINEERING GMBH and SEGUS Inc. 1

IBM DB2 for z/os: Data Sharing Technical Deep Dive

Ins & Outs of Distributed Processing in DB2 on z/os. Bill Arledge BMC Software, Inc.

VM & VSE Tech Conference May Orlando Session G41 Bill Bitner VM Performance IBM Endicott RETURN TO INDEX

Reducing MIPS Using InfoSphere Optim Query Workload Tuner TDZ-2755A. Lloyd Matthews, U.S. Senate

Transcription:

Evolution of CPU and ziip usage inside the DB2 system address spaces Danilo Gipponi Fabio Massimo Ottaviani EPV Technologies danilo.gipponi@epvtech.com fabio.ottaviani@epvtech.com www.epvtech.com

Disclaimer, copyright and trademarks Disclaimer: THE INFORMATION CONTAINED IN THIS PRESENTATION HAS NOT BEEN SUBMITTED TO ANY FORMAL REVIEW AND IS DISTRIBUTED ON AN AS IS BASIS WITHOUT ANY WARRANTY EITHER EXPRESS OR IMPLIED. THE USE OF THIS INFORMATION OR THE IMPLEMENTATION OF ANY OF THESE TECHNIQUES IS A USER RESPONSIBILITY AND DEPENDS ON THE USER S ABILITY TO EVALUATE AND INTEGRATE THEM INTO THE USER S OPERATIONAL ENVIRONMENT. WHILE EACH ITEM MAY HAVE BEEN REVIEWED FOR ACCURACY IN A SPECIFIC SITUATION, THERE IS NO GUARANTEE THAT THE SAME OR SIMILAR RESULTS WILL BE OBTAINED ELSEWHERE. USERS ATTEMPTING TO ADAPT THESE TECHNIQUES TO THEIR OWN ENVIRONMENTS DO SO AT THEIR OWN RISK. Copyright Notice: EPV Technologies. All rights reserved. Trademarks: All the trademarks mentioned here belong to their respective companies. 2

Agenda Introduction System AS CPU usage in DB2 V9 System AS CPU usage in DB2 V10 and V11 Evolution of MSTR functions Conclusions 3

Introduction 4

Introduction DB2 is the preferred repository for mission critical data at all z/os sites Performance of z/os and non z/os based applications accessing DB2 data is critical for every company business Managing even simple DB2 environments with continuously shrinking staff is more and more a challenge 5

Introduction DB2 system programmers and DBAs have normally not enough time to dedicate to performance analysis and tuning of DB2 subsystems and applications They also don t have time to provide data and reports needed by other performance analysts (CICS, IMS, z/os, WebSphere, Capacity Planning) 6

Introduction EPV for DB2 is an out of the box Performance and Capacity Management solution for z/os environments of any size, type and complexity Some of the most important sites in Italy already use it EPV for DB2 uses standard input data normally available in any z/os environments (mostly SMF records) 7

Introduction The main goal of EPV for DB2 is to provide a comprehensive view of DB2 environments of any level of complexity and to allow a quick and effective top down analysis of DB2 subsystems and workloads This goal is accomplished through a completely automated process, without any need for human intervention More than 500 different report types in HTML pages are provided 8

Introduction A.S. CPU USAGE A.S. IIP USAGE DIST A.S. CPU UTILIZATION DIST A.S. IIP UTILIZATION DBM1 A.S. STORAGE DIST A.S. STORAGE DBM1 A.S. VIRTUAL STORAGE DIST A.S. VIRTUAL STORAGE MSTR LOG WRITES MSTR LOG READS 9

Introduction All the graphs, tables reported in the following have been created starting from the EPV for DB2 views highlighted in the previous slide This presentation is based on a white paper published in the EPV Newsletter (January and February 2016) For time reasons we will not discuss the performance impact of ziip over utilization on DB2 but we strongly suggest you to read this chapter in the paper 10

System AS CPU usage in V9 11

System AS CPU usage in V9 No ziip offload is possible with DB2 V9 The next picture shows the split of DBM1, MSTR and IRLM functions in TCB and SRB mode (based on DB2 Managing Performance manual) Underlined functions refer to data sharing environments 12

System AS CPU usage in V9 System AS TCB mode SRB mode DBM1 Opening and closing of dataset Deferred writes DBM1 full system contraction Prefetch reads Preformat Parallel child tasks Extend Castouts Asynchronous GBP writes P-lock negotiation Notify Exit Page set close or pseudo-close to convert to non-gbp dependent GBP checkpoints Archiving Physical log writes BSDS (bootstrap data set) Thread deallocation processing MSTR Update commit (including unlocking of page P-locks) Backouts Checkpoints Error checking Local IRLM latch contention Management IRLM and XES global contention IRLM Asynchronous XES contention P-lock negotiation Deadlock detection 13

System AS CPU usage in V9 DBM1 is by far the major CPU consumer Normally most of DBM1 functions run in SRB mode 14

System AS CPU usage in V9 3.500 DB2 V9 CPU usage of system address spaces 3.000 C P U s e c o n d s 2.500 2.000 1.500 1.000 500 0 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 MSTR DBM1 IRLM 15

System AS CPU usage in V9 100% DB2 V9 DBM1 CPU split into SRB and TCB 90% 80% 70% 60% 50% 40% 30% 20% 10% 0% TCB SRB 16

System AS CPU usage in V10 & V11 17

System AS CPU usage in V10 & V11 Most of DBM1 functions offloaded to ziip in DB2 V10 (light blue) and DB2 V11 (light green) With DB2 V11 MSTR logging functions are offloaded to ziip (light green) 18

System AS CPU Usage in V10 & V11 System AS TCB mode SRB mode DBM1 Opening and closing of dataset Deferred writes DBM1 full system contraction Prefetch reads Preformat Parallel child tasks Extend Castouts Asynchronous GBP writes P-lock negotiation Notify Exit Page set close or pseudo-close to convert to non-gbp dependent GBP checkpoints Archiving Physical log writes BSDS processing Thread deallocation MSTR Update commit (including unlocking of page P-locks) Backouts Checkpoints Error checking Local IRLM latch contention Management IRLM and XES global contention IRLM Asynchronous XES contention P-lock negotiation Deadlock detection 19

System AS CPU usage in V10 & V11 MSTR CPU usage higher in DB2 V10 and V11 MSTR offload to ziip in DB2 V11 generally not enough to balance that increase About 20 MIPS offloaded to ziip per 1.000 write/sec See next slides 20

System AS CPU Usage in V10 & V11 2.500 DB2 V11 CPU and ziip usage by system address spaces 2.000 M I P S 1.500 1.000 500 0 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 MSTR - CPU DBM1 - CPU IRLM - CPU MSTR - ziip DBM1 - ziip 21

System AS CPU Usage in V10 & V11 1.200 DB2 V11 Log write rate vs ziip usage 25 W r i t e 1.000 800 600 20 15 z I I P r a t e 400 200 10 5 M I P S - 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 - LOG WRITE RATE MSTR - ziip 22

Evolution of MSTR functions 23

Evolution of MSTR functions Many functions have been extended and added to the MSTR AS in the recent DB2 versions The first new important function, introduced with DB2 V9, is the System Monitor task; this task continuously checks the health of the system at one-minute intervals trying to address the following major issues: CPU stalls in DB2 resulting in latch contention critical usage of DBM1 virtual storage below the 2GB bar (IFCID 225 produced by class 1 statistics trace) 24

Evolution of MSTR functions With DB2 V10 and V11, virtual storage constraints have been practically eliminated by exploiting 64-bit virtual storage and allowing DB2 to use much more real storage to improve application performance So IBM introduced other new functions in MSTR to help customers monitor the real and auxiliary storage used by DB2 subsystems (many IFCID 225 enhancements) 25

Evolution of MSTR functions With DB2 V10 the amount of virtual storage that needs to be monitored is an order of magnitude higher than before An increase of MSTR CPU usage can be considered normal However by tracking MSTR CPU usage when migrating to DB2 V10 some customers discovered an excessive increase Most relevant corrections: DB2 APAR (PM49816) and z/os APAR (OA37821) 26

Evolution of MSTR functions 180 MSTR CPU usage Comparison V9 - V10 160 140 120 M I P S 100 80 60 40 20 0 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 DB2A V10 DB2A V9 27

Evolution of MSTR functions However the most important MSTR new function in DB2 V10 and V11 is the interaction with the z/os RSM (Real Storage Manager) to control and manage the DB2 real storage Two new system configuration parameters are provided: REALSTORAGE_MAX; this parameter sets the maximum of real and auxiliary storage (in GB) a DB2 subsystem can use; DB2 will terminate if this threshold is reached; new message DSNS003I will be written by MSTR when DB2 approaches the specified threshold REALSTORAGE_MANAGEMENT; this parameter will tell DB2 how to manage thread storage pages that are backed in real storage but not used anymore 28

Evolution of MSTR functions DB2 thread storage is now allocated in a memory object in 64-bit shared storage To give back real storage frames backing virtual pages inside a memory object the IARV64 DISCARDDATA service has to be used together with the optional KEEPREAL parameter 29

Evolution of MSTR functions When DB2 uses DISCARDDATA with KEEPREAL(YES), the storage is only "virtually freed"; RSM flags the page as freed or unused, but the storage is still in real storage with the data Real memory statistics not always accurate When DB2 uses KEEPREAL(NO), RSM frees and reclaims the page immediately 30

Evolution of MSTR functions Depending on parameters settings and on the system condition customers experimented high CPU usage in MSTR or a high amount of memory apparently free but not usable by z/os IBM provided some corrections trying to find the best compromise between CPU and memory usage 31

Evolution of MSTR functions This is the situation after APAR PM99575 : if REALSTORAGE_MAX boundary is approaching or z/os has notified DB2 (through ENF 55 signal) that there is a critical auxiliary shortage; MSTR issues DISCARDDATA requests with KEEPREAL=NO if REALSTORAGE_MANAGEMENT is set to OFF, MSTR will not issue DISCARDDATA requests; more real storage is used; 32

Evolution of MSTR functions if REALSTORAGE_MANAGEMENT is set to AUTO (default) with no paging in the system, MSTR issues DISCARDDATA requests with KEEPREAL=YES to free storage at thread deallocation or after 120 commits; more CPU is used and charged to MSTR if REALSTORAGE_MANAGEMENT is set to AUTO (default) with paging or REALSTORAGE_MANAGEMENT is set to ON, MSTR issues DISCARDDATA requests with KEEPREAL=YES to free storage at thread deallocation or after 30 commits; stack storage is also discarded; even more CPU is used and charged to MSTR 33

Evolution of MSTR functions Unfortunately even after all these fixes some of our customers complain about excessive real storage usage when REALSTORAGE_MANAGEMENT is set to OFF Running with the AUTO default should be the best option but one of our customers, running DB2 V11, had recently a very bad surprise 34

Evolution of MSTR functions 35

Conclusions 36

Conclusions DB2 evolution in the last years allowed more and more DBM1 and now MSTR logging activities to become ziip eligible with positive effect on hardware and software costs On the other hand the exploitation of 64 bit virtual storage and the availability of much bigger quantities of real storage increased the functions to be performed by the MSTR AS Appropriate reporting has to be available to control and solve possible CPU and memory issues 37

Questions? fabio.ottaviani@epvtech.com www.epvtech.com www.tps-data.eu 38