49
© 2017 IBM Corporation IBM Data Server Manager for z/OS John Casey Senior Solutions Advisor [email protected]

IBM Data Server Manager for z/OS - neodbug · Capture best practices and procedures Team responsible for creating the measurements understands the what and ... DB2 Performance Solution

  • Upload
    others

  • View
    6

  • Download
    0

Embed Size (px)

Citation preview

Page 1: IBM Data Server Manager for z/OS - neodbug · Capture best practices and procedures Team responsible for creating the measurements understands the what and ... DB2 Performance Solution

© 2017 IBM Corporation

IBM Data Server Manager for z/OS

John Casey

Senior Solutions Advisor

[email protected]

Page 2: IBM Data Server Manager for z/OS - neodbug · Capture best practices and procedures Team responsible for creating the measurements understands the what and ... DB2 Performance Solution

© 2016 IBM Corporation 2

Page 3: IBM Data Server Manager for z/OS - neodbug · Capture best practices and procedures Team responsible for creating the measurements understands the what and ... DB2 Performance Solution

© 2016 IBM Corporation 3

What’s the cost of application downtime to your business?

Minutes of Downtime

x Average revenue per minute

= Downtime Losses

Page 4: IBM Data Server Manager for z/OS - neodbug · Capture best practices and procedures Team responsible for creating the measurements understands the what and ... DB2 Performance Solution

© 2016 IBM Corporation 4

Performance tuning challenges across the organization

“We can’t adequately test for

peak workload since we don’t

have enough human or IT

resources.”

“I need to get my

business results

fast and accurate.

What’s going on ?”

”I don’t have time to

hone my SQL skills.

I need to focus on

developing core

application

functionality.”

Application Developer

“I don’t understand why

our developers aren’t

focused on creating better

performing SQL.”

“Performance problems

seem to appear without

warning and deep

technical skills are hard

to find.” QA Manager

DBA

“It is very challenging

to aggregate

performance data

across our complex

data environment.”

IT Manager

LOB Manager

Page 5: IBM Data Server Manager for z/OS - neodbug · Capture best practices and procedures Team responsible for creating the measurements understands the what and ... DB2 Performance Solution

© 2016 IBM Corporation 5

Does this sound familiar?

SQL performance issues:

Challenge to deliver applications to meet client and service-level objectives

Organization under pressure to do more with less

Advances in programming frameworks contribute to performance issues

SQL tuning issues:

Application performance is affecting the organization’s business

Aggressive project delivery schedules and limited human and database resources have a negative impact on application performance

Writing effective Java™ code and writing optimized SQL are different skill sets.

Lack of focus on query optimization during development resulted added to performance issues

Result:

Service-level objectives were missed

Business users experience unanticipated application and database outages.

Customer satisfaction declines and revenue opportunities were lost

Page 6: IBM Data Server Manager for z/OS - neodbug · Capture best practices and procedures Team responsible for creating the measurements understands the what and ... DB2 Performance Solution

© 2016 IBM Corporation 6

Reactive vs. Proactive performance management

Problems addressed

after performance

impact

Measuring flashing light

indicators

Noticing either the very

good or the very bad

Takes longer to react to

bad performance

because of measuring

lagging indicators

Understanding what behavior

is desired

Measuring leading indicators

Capture best practices and

procedures

Team responsible for creating

the measurements

understands the what and

why

Page 7: IBM Data Server Manager for z/OS - neodbug · Capture best practices and procedures Team responsible for creating the measurements understands the what and ... DB2 Performance Solution

© 2016 IBM Corporation 7

What should you look for in a performance management solution?

Cost reductions of DB2 and associated applications

Faster identification and resolution

Improved overall performance

Replacing ad-hoc methods

Faster DB2 and application migration

Page 8: IBM Data Server Manager for z/OS - neodbug · Capture best practices and procedures Team responsible for creating the measurements understands the what and ... DB2 Performance Solution

© 2016 IBM Corporation 8

.

.

. .

IBM DB2 Performance Management Solution

provides:

Fast identification with automated alerts,

proactive notification and 24x7 monitoring

Tuning of queries and workloads proactively

Expert advice with built-in advisors

Diverse set of capabilities managed

via Data Server Manager (DSM)

Easy-to-use integrated view of

overall DB2 performance management

Seamless navigation and

movement via functional capabilities versus

individual products

DSM

Page 9: IBM Data Server Manager for z/OS - neodbug · Capture best practices and procedures Team responsible for creating the measurements understands the what and ... DB2 Performance Solution

© 2016 IBM Corporation 9

Page 10: IBM Data Server Manager for z/OS - neodbug · Capture best practices and procedures Team responsible for creating the measurements understands the what and ... DB2 Performance Solution

© 2016 IBM Corporation 10

Data Server Manger – Where DBAs Spend Time

Administration

– helps you manage, and maintain complex database environments for increased productivity and optimized use of system resources

Performance Tuning

– helps you develop and implement a performance strategy including providing expert recommendations to improve query workload performance

Identifying Environment changes

– offers centralized management of database and client configuration

Troubleshooting

– capture production application workloads then compare capture and enforce configuration settings

Page 11: IBM Data Server Manager for z/OS - neodbug · Capture best practices and procedures Team responsible for creating the measurements understands the what and ... DB2 Performance Solution

© 2016 IBM Corporation 11

DB2 Performance Solution Pack

Features of the Data Server Manager z/OS Based Tools - At A Glance

Data Server Manager Base

• Connect to DB2 for z/OS V10/ V11/V12

• Database object navigation, viewing

object detail, and linking to related

objects.

• Database object dependency display.

• Data browsing and editing.

• Basic database object operations, such

as creation of tables, indexes,

constraints, and tablespaces; dropping of

tables, indexes and constraints; altering

tables.

• Show system privilege from the

perspective of Group/User, Role, or SQL

object. Choose:

-"Group/User" to see the role and the

relative object privilege for a user

account;

- "Role" to see the role a user account

belongs to and its relative object privilege;

- "SQL object" to see a specific object

and users or roles that have the relative

authority.

• Single query tuning

• Statistics Advisor

• Query Environment Capture

• Access Path Graph

IBM Query Workload Tuner

• Launch of visual explain and tune query on the

SQL editor

• Tuning wizard to capture SQL statements from

multiple sources

• Tuning advisors provide recommendations for:

• Statistics Advisor

• Index Advisor

• IDAA Advisor

• Problem analysis of query or workload

• Access plan graph

• Query formatting and annotation

• Tuning Report

• Test Candidate Index

• Access Plan Comparison

• Index Impact Analysis

• Query and Workload Environment

Capture

• Selectivity Override

IBM DB2 Query Monitor

• Launching of DSM from Query Monitor Web UI

for end to end performance analysis

• Host variable collection

OMEGAMON XE for DB2 PE

• Key Performance Indicators (KPIs) displayed

in Data Server Manager on the Subsystems

Dashboard

DB2 Admin Solution Pack Configuration Manager for z/OS V5.1

• Track configuration changes

• Configure zParm

• Compare and clone configurations

• Manage application profile

• Manage alias

• Manage and control clients

DB2 Utility Solution Pack V4.1

• Customizable profiles for performing conditional

object evaluations and generating actions

mapped to resolving utilities (reorg,

copy, runstats, etc)

• Ability to control prioritization of objects,

evaluation conditions and generated resolving

actions.

• Ability to define maintenance windows for

enabling autonomics, allowing DB2 to self

manage utility runs

• Graphical trend analysis of historical RTS

• Capture of utility history, recording utility output,

time, duration, etc.

NO CHARGE

Page 12: IBM Data Server Manager for z/OS - neodbug · Capture best practices and procedures Team responsible for creating the measurements understands the what and ... DB2 Performance Solution

© 2016 IBM Corporation 12

Where do I start ?...... Data Server Manager

http://ibm.biz/IWANTDSM

Page 13: IBM Data Server Manager for z/OS - neodbug · Capture best practices and procedures Team responsible for creating the measurements understands the what and ... DB2 Performance Solution

© 2016 IBM Corporation 13

Simple 3-step setup

http://ibm.biz/IWANTDSM

Page 14: IBM Data Server Manager for z/OS - neodbug · Capture best practices and procedures Team responsible for creating the measurements understands the what and ... DB2 Performance Solution

© 2016 IBM Corporation 14

Page 15: IBM Data Server Manager for z/OS - neodbug · Capture best practices and procedures Team responsible for creating the measurements understands the what and ... DB2 Performance Solution

© 2016 IBM Corporation 15

Migrating workloads from QWT 4.1.x to DSM

Page 16: IBM Data Server Manager for z/OS - neodbug · Capture best practices and procedures Team responsible for creating the measurements understands the what and ... DB2 Performance Solution

© 2016 IBM Corporation 16

Manage Databases Using the Database Explorer

http://ibm.biz/IWANTDSM

Manage database objects

Explore database

object properties Explore the catalog

Page 17: IBM Data Server Manager for z/OS - neodbug · Capture best practices and procedures Team responsible for creating the measurements understands the what and ... DB2 Performance Solution

© 2016 IBM Corporation 17

Develop and Run SQL Scripts

Validate SQL

• Customize and filter

result output

• Save execution results

• Manage scripts

• Explain SQL

• Tune SQL

http://ibm.biz/IWANTDSM

Page 18: IBM Data Server Manager for z/OS - neodbug · Capture best practices and procedures Team responsible for creating the measurements understands the what and ... DB2 Performance Solution

© 2016 IBM Corporation 18

Create and schedule jobs

Schedule a Create

Table job from Explore

Databases

Scheduled

commands from

Explore Databases

Alternatively, create a

script and schedule

the job

http://ibm.biz/IWANTDSM

Page 19: IBM Data Server Manager for z/OS - neodbug · Capture best practices and procedures Team responsible for creating the measurements understands the what and ... DB2 Performance Solution

© 2016 IBM Corporation 19

DB2 Utilities Solution Pack 2.2

“More integration,

greater value”

Automate Data Collection Utility

History

Symptoms/actions on subsystem and object dashboards

View upcoming

autonomic maintenance

windows

with scheduled actions

Components:

DB2 Automation Tool

DB2 High Performance

Unload for z/OS

DB2 Sort for z/OS

DB2 Utilities Enhancement Tool

Autonomics support

Data Server Manager

Optimize, control

manage & automate

DB2 Utilities

Solution

http://ibm.biz/IWANTDSM

Page 20: IBM Data Server Manager for z/OS - neodbug · Capture best practices and procedures Team responsible for creating the measurements understands the what and ... DB2 Performance Solution

© 2016 IBM Corporation 20

Traditional Reactive Tuning

Page 21: IBM Data Server Manager for z/OS - neodbug · Capture best practices and procedures Team responsible for creating the measurements understands the what and ... DB2 Performance Solution

© 2016 IBM Corporation 21

What to do next …. Performance Tuning Using Data Server Manager : Query Workload Tuner 5.1

http://ibm.biz/IWANTDSM

Page 22: IBM Data Server Manager for z/OS - neodbug · Capture best practices and procedures Team responsible for creating the measurements understands the what and ... DB2 Performance Solution

© 2016 IBM Corporation 22

The effort for tuning the whole application with good performance by evaluating every statement is overwhelming. Optimization decisions are based on trade offs:

Statistics – CPU costs vs. query savings

Indexing – query speed vs resource and transaction

Sometimes performance improvement for one statement in an application may regress other statements in the application.

When your application data grows, allows you to do proactive application health check periodically to find potential problems earlier before costly application outages

Workload tuning speeds up analysis

Analyzes multiple queries at once

Workload tuning consolidates and optimizes recommendation for overall workload

Statistics recommendations

Index recommendation

Why is workload tuning important?

Workload: Multiple SQL statements defined by user

Page 23: IBM Data Server Manager for z/OS - neodbug · Capture best practices and procedures Team responsible for creating the measurements understands the what and ... DB2 Performance Solution

© 2016 IBM Corporation 23

Where is the most time spent?

Page 24: IBM Data Server Manager for z/OS - neodbug · Capture best practices and procedures Team responsible for creating the measurements understands the what and ... DB2 Performance Solution

© 2016 IBM Corporation 24

Improve Performance and Reduce Costs Improve end-user experience of performance

Monitor KPIs that better reflect end-user experience

• i.e., transaction response time

Get early warning of degrading performance before users are affected

Isolate problems to correct area for fast response

Get expert advice for improving query and workload performance

Reduce costs Improve performance and govern system utilization to

defer upgrades

Save hours of staff time and stress • Isolate problems to the right layer of the application stack,

database component, even the line of code

Enable developers and novice DBAs to tune like an expert

Accelerate analysis

and reduce downtime

for urgent situations .

Page 25: IBM Data Server Manager for z/OS - neodbug · Capture best practices and procedures Team responsible for creating the measurements understands the what and ... DB2 Performance Solution

© 2016 IBM Corporation 25

Where is the time spent within DB2?

Page 26: IBM Data Server Manager for z/OS - neodbug · Capture best practices and procedures Team responsible for creating the measurements understands the what and ... DB2 Performance Solution

© 2016 IBM Corporation 26

What is your query tuning objective ……..

reduced CPU usage or reduced

elapsed time ?

Page 27: IBM Data Server Manager for z/OS - neodbug · Capture best practices and procedures Team responsible for creating the measurements understands the what and ... DB2 Performance Solution

© 2016 IBM Corporation 27

Most expensive SQL statement in your DB2 subsystem

Most expensive SQL within a PLAN

All of the PLANS where a specific package is used

All of the “exceptional SQL for a given plan”

All of the objects accessed by a specific package

All of the SQL which access a specific object

Unnecessary negative SQLCODES

Common Scenarios & Collection

Page 28: IBM Data Server Manager for z/OS - neodbug · Capture best practices and procedures Team responsible for creating the measurements understands the what and ... DB2 Performance Solution

© 2016 IBM Corporation 28

Data available to be collected or viewed SQL metrics

DB2 object access

SQL text and host variables

DB2 commands

Negative SQLCODES

Expanded and grouped Information about exceptions

Buffer Pool Statistics

Delays

Three types of data Summary – data summarized for each unique SQL statement executed in a

particular interval of time

• Plan + Program + Section + Statement # + Statement type

• SQL Codes are not collected by default

Exceptions – individual SQL calls that have exceeded user defined thresholds

Alerts – events that require immediate attention; can be classified as exceptions

Determine what data needs to be collected 1

Page 29: IBM Data Server Manager for z/OS - neodbug · Capture best practices and procedures Team responsible for creating the measurements understands the what and ... DB2 Performance Solution

© 2016 IBM Corporation 29

Identify the topN (50 , 200 , 250 …….) most expensive queries

Drill down into results

Save workload and/or start tuning

Identify workload for proactive tuning 2

Page 30: IBM Data Server Manager for z/OS - neodbug · Capture best practices and procedures Team responsible for creating the measurements understands the what and ... DB2 Performance Solution

© 2016 IBM Corporation 30

Drill down into results

2

Tune or Tune all

Page 31: IBM Data Server Manager for z/OS - neodbug · Capture best practices and procedures Team responsible for creating the measurements understands the what and ... DB2 Performance Solution

© 2016 IBM Corporation 31

Capture from Statement Cache & customize collection

• Accelerate analysis, reduce downtime

Page 32: IBM Data Server Manager for z/OS - neodbug · Capture best practices and procedures Team responsible for creating the measurements understands the what and ... DB2 Performance Solution

© 2016 IBM Corporation 32

Execute Advisors

Statistics

Get recommendations on the best statistics to capture to influence access path selection

Index

Get recommendations on indexes changes that can reduce database scans

Analytics Accelerator

Get recommendations on optimizing and managing accelerated analytic queries and applications

3

Page 33: IBM Data Server Manager for z/OS - neodbug · Capture best practices and procedures Team responsible for creating the measurements understands the what and ... DB2 Performance Solution

© 2016 IBM Corporation 33

Improve statistics quality and collection

Results

• Accurate estimated costs

• Better query performance

• Less CPU consumption

• Improved maintenance window throughput

“80 % of access path PMRs could be resolved by statistics advisor before calling IBM support.” – IBM Support

Generates RUNSTATS

control statements

Conflicting statistics

explanation

Page 34: IBM Data Server Manager for z/OS - neodbug · Capture best practices and procedures Team responsible for creating the measurements understands the what and ... DB2 Performance Solution

© 2016 IBM Corporation 34

Indexing advice to improve database design

Workload Index Impact Analysis

.

Indexes are decided at design stage

Lot of effort is spent making SQL to use the provided indexes

But what if the SQL is "right" and it's the indexes that are "wrong“

Cost resources to maintain

How do you simply test your hypotheses without

impacting production?

Removing obsolete indexes simplify use

Consolidate indexes and provide a single recommendation

Enables what-if analysis

Provides DDL to create indexes

Run immediately or save

Test before deployment

Use virtual index capabilities built into the DB2 engine

Page 35: IBM Data Server Manager for z/OS - neodbug · Capture best practices and procedures Team responsible for creating the measurements understands the what and ... DB2 Performance Solution

© 2016 IBM Corporation 35

Workload Analytics Accelerator Advisor

Identify candidate queries and tables to be routed to the Accelerator

Identify candidate tables to be routed to the accelerator

Implement advisor-based tuning recommendations for mixed

workloads of accelerated and un-accelerated queries

Diagram accelerated queries in Access Plan Graphs

Integrates with Query Monitor and OMPE for

capturing query workloads for complete analysis

Enable “what if” analysis

Benefits

Shorten the process of selecting tables to be

accelerated

Visualize access paths of accelerated queries

Increase productivity by working with accelerated

queries through a unified interface

Increase overall system capacity

Optimizing the selection and tuning of accelerated workloads

Page 36: IBM Data Server Manager for z/OS - neodbug · Capture best practices and procedures Team responsible for creating the measurements understands the what and ... DB2 Performance Solution

© 2016 IBM Corporation 36

Prevent problems before they impact the business

Optimize beyond the prior level of service

Determine whether the later version of the collection has degraded performance.

Determine whether any packages have errors.

Identify which packages have SQL statements that have degraded performance

Available Actions

Apply filters and review Comparison result

Review comparison result

Generate HTML comparison report or in csv

Generate new query workload for tuning & perform

analysis

Enhancements

Compare two different workloads

Workload Comparison

Workload Access Plan Comparison

4

.

Page 37: IBM Data Server Manager for z/OS - neodbug · Capture best practices and procedures Team responsible for creating the measurements understands the what and ... DB2 Performance Solution

© 2016 IBM Corporation 37

Derived Worksheet with V11V12 comparison

Import generated CSV data from V11 and V12 execution into the provided several worksheets

Prevent problems before they impact the business 4

.

migration comparison

Page 38: IBM Data Server Manager for z/OS - neodbug · Capture best practices and procedures Team responsible for creating the measurements understands the what and ... DB2 Performance Solution

© 2016 IBM Corporation 38

Why did the DB2 Optimizer choose that path?

Helps users improve query access plans for dynamic queries with

parameter markers

The selectivity override feature utilizes parameter marker information

Users can deploy a selectivity profile generated by this function to

create better access plans.

Host variable Collection & Selectivity Override IBM Solution

Exclusive!

SELECT * FROM

EMPLOYEES WHERE

SALARY BETWEEN ?

AND ?

Page 39: IBM Data Server Manager for z/OS - neodbug · Capture best practices and procedures Team responsible for creating the measurements understands the what and ... DB2 Performance Solution

© 2016 IBM Corporation 39

Run a test application now to get a

baseline.

Average execution time for this application

is: 125ms

Note this query is well tune before

selectivity override analysis

Remember this number

Create a Baseline 1

Page 40: IBM Data Server Manager for z/OS - neodbug · Capture best practices and procedures Team responsible for creating the measurements understands the what and ... DB2 Performance Solution

© 2016 IBM Corporation 40

Collection Period Choose the Activity Browser data from a past time period

Collect Host Variables Configure how the host variable information is captured

Request host variable collection

Summaries Access and refine view of your system's query activity

Collect Activity 2

Page 41: IBM Data Server Manager for z/OS - neodbug · Capture best practices and procedures Team responsible for creating the measurements understands the what and ... DB2 Performance Solution

© 2016 IBM Corporation 41

With parameter marker, high elapse time, CPU time, execution count etc.

Analyze Hostvars details and identify candidate query

Tune or Tune all For selectivity override analysis

3

Page 42: IBM Data Server Manager for z/OS - neodbug · Capture best practices and procedures Team responsible for creating the measurements understands the what and ... DB2 Performance Solution

© 2016 IBM Corporation 42

Page 43: IBM Data Server Manager for z/OS - neodbug · Capture best practices and procedures Team responsible for creating the measurements understands the what and ... DB2 Performance Solution

© 2016 IBM Corporation 43

Tune selectivity override 4

Selectivity Override Job

Go to View Workload

Statements, you can see

the query is Selectivity

Override Candidate

Then, select Host

Variables

Page 44: IBM Data Server Manager for z/OS - neodbug · Capture best practices and procedures Team responsible for creating the measurements understands the what and ... DB2 Performance Solution

© 2016 IBM Corporation 44

Review analysis

In this dialog, you can see:

parameter markers

distribution

Weight of each parameter

marker value set

Select the sets (all) for

Selectivity Override analysis

Click Selectivity Override

Page 45: IBM Data Server Manager for z/OS - neodbug · Capture best practices and procedures Team responsible for creating the measurements understands the what and ... DB2 Performance Solution

© 2016 IBM Corporation 45

View results and deploy the selectivity profile

Run recommended scripts

Flush the statement cache

.

A selectivity override analysis job is created

Click View Results when it is completed

5

Page 46: IBM Data Server Manager for z/OS - neodbug · Capture best practices and procedures Team responsible for creating the measurements understands the what and ... DB2 Performance Solution

© 2016 IBM Corporation 46

Compare against baseline

Run the test application

again run after Selectivity

Override analysis

Average execution time

for this application is:

92ms

Improvement of 26%

On an already well-tuned

query!!

26% faster!!

6

Page 47: IBM Data Server Manager for z/OS - neodbug · Capture best practices and procedures Team responsible for creating the measurements understands the what and ... DB2 Performance Solution

© 2016 IBM Corporation 47

DB2 performance depends on “health” of DB2 objects

Often, a REORG is done on DB2 application objects

whether needed or not, affecting resources and availability

The best REORG is the one you don’t perform

Consider the following:

Granular query monitoring and analysis at object level:

Ability to detect, apply intelligence and decide best action for object:

• Perform REORG if performance will improve

• Skip REORG if determined no performance benefit

Aligning data management with application needs

Hands-free performance monitoring tied into maintenance actions

Improves application performance, reduce system and IT resources

Move from reactive to proactive to predictive results

Page 48: IBM Data Server Manager for z/OS - neodbug · Capture best practices and procedures Team responsible for creating the measurements understands the what and ... DB2 Performance Solution

© 2016 IBM Corporation 48

Reduce costs of DB2 for z/OS and applications

Improve performance of all package applications

Tune performance of query warehouse

Identify and solve faster closing the loop on problem resolution

Replace ad-hoc methods with integrated solutions for scalable,

robust approach to performance management

Improve performance and time to resolution by up to 50%

Speed DB2 and application migration with

comprehensive comparison capabilities

IBM delivers complete DB2 performance management

.

.

. .

Page 49: IBM Data Server Manager for z/OS - neodbug · Capture best practices and procedures Team responsible for creating the measurements understands the what and ... DB2 Performance Solution

© 2016 IBM Corporation 49