tuning db2 to reduce your rolling 4 hour average costsmullins+r4... · •align •© 2012 mullins...
TRANSCRIPT
•align
•© 2012 Mullins Consulting, Inc.
Tuning DB2 to Reduce Your Rolling 4 Hour Average Costs
•Craig S. Mullins•Mullins Consulting, Inc.•http://www.craigsmullins.com
•Sponsored by:
•© 2012 Mullins Consulting, Inc. •2
Author
This presentation was prepared by:
Craig S. MullinsPresident & Principal Consultant
Mullins Consulting, Inc.15 Coventry CtSugar Land, TX 77479Tel: 281-494-6153Fax: 281.491.0637 E-mail: [email protected]
This document is protected under the copyright laws of the United States and other countries as an unpublished work. Any use ordisclosure in whole or in part of this information without the express written permission of Mullins Consulting, Inc. is prohibited.
© 2012 Craig S. Mullins, Mullins Consulting, Inc. All rights reserved.
•Now Available:•6th edition covering up thru DB2 10 for z/OS
•© 2012 Mullins Consulting, Inc. •3
Agenda
• Pricing, Reducing Cost, and Tuning DB2 for z/OS• General Terminology• Pricing models • VWLC
• SubCapacity Report Tool (SCRT)• Understanding IMSU and R4H
• But I thought it was usage pricing?• What does this mean for DB2?• DB2 tuning approaches to reduce
the R4H…• …and therefore reduce your monthly
software bill.
•© 2012 Mullins Consulting, Inc. •4
• Technical terms & abbreviations used in this presentation.– MSU: (Million Service Units) : reference unit for Software billing.
– IMSU (or ACTMSU): instantaneous MSU consumption
– R4H: Rolling 4 Hours
– DC: Defined Capacity
– CPC and CEC
– CPC: Central Processor Complex
– CEC: Central Electronic Complex
– CPC Capacity: z/Server full capacity
– HMC: Hardware Management Console
Terminology
•© 2012 Mullins Consulting, Inc. •5
MIPS vs. MSUsMIPS: an acronym for Millions of Instructions Per Second.› No longer in vogue
MSU: million service units is a measurement of the amount of processing work that can be performed in an hour. › One “service unit” originally related to an actual hardware
performance measurement, but that is no longer the case.
› A service unit is an imprecise measurement
E.g., “tubes of toothpaste.”
IBM publishes MSU ratings for every mainframe model.
•© 2012 Mullins Consulting, Inc. •6
Licensing vs. PricingIt is important to understand the difference between licensing and pricing.› If you execute IBM zSeries software on a CPC, you must
have a license to do so. A license for an IBM monthly license charge product is specific to the
product and a CPC with a particular serial number. The license is sold in terms of MSUs. If you are executing a product on a 1500 MSU CPC, you must have a
1500 MSU license, specifying the serial number of that CPC.
› The price for a product, that is, how much you pay IBM each month, depends on the pricing metric that is used for that product. Examples of pricing metrics include PSLC and VWLC.
•© 2012 Mullins Consulting, Inc. •7
MLC Products
Monthly License Charge (MLC) Products › Monthly license charges apply to many IBM software
products› Some of the most common include z/OS, DB2, CICS,
IMS, MQSeries, and COBOL There are others.
› Pricing and terms and conditions for MLC products are based on the pricing metric you select.
› Pricing metrics can roughly be grouped into two categories: Full capacity Sub-capacity
•© 2012 Mullins Consulting, Inc. •8
Full vs. Sub Capacity
Full capacity based pricing metrics› Under a full capacity-based metric, all software charges are
determined by the capacity of the CPC in which the product runs.
› Parallel Sysplex License Charges (PSLC) and zSeries Entry License Charges (zELC) are examples of full capacity based metrics.
Sub-capacity capable pricing metrics› Under a sub-capacity metric, software charges for certain products
are based on the utilization capacity of the LPARs in which the product runs.
› Workload License Charges (WLC) and Entry Workload License Charges (EWLC) are examples of sub-capacity capable pricing metrics.
•© 2012 Mullins Consulting, Inc. •9
IBM Software Pricing Metrics
* Metric eligible for Sub‐Capacity charges
+ Metric eligible for Aggregation in a qualified Parallel Sysplex
1 Customer may select VWLC pricing for a z196 machine only when the z196 participates in a VWLC Sysplex under the AWLC Transition Charges for Sysplexes terms and conditions with at least one of the following machines (z10 EC, z10 BC, z9 EC, z9 BC).
2 VWLC and FWLC are only available on z10 BC, z9 BC, z890 or z800 when that machine is participating in a qualified Parallel Sysplex environment.
3 PSLC are only available on z10 BC, z9 BC, z890 or z800 when that machine is participating in a qualified Parallel Sysplex environment.
4 The z10 BC model A01, z9 BC model A01, and the z890 model 110 are priced using zSeries Entry License Charges (zELC).
•http://www-03.ibm.com/systems/z/resources/swprice/reference/index.html
•© 2012 Mullins Consulting, Inc. •10
Sub-Capacity Pricing Advantages
Your charges for products that use sub-capacity pricing are based on how much the LPARs in which the products run utilize system resources, rather than on the full capacity of the CPC. › You can purchase hardware capacity for future needs without
incurring an immediate increase in your software bill.
If your usage decreases when business is slow, your software bill decreases with it. › If your usage is seasonal, your monthly software bills are lower
during periods of lower usage.
You pay for capacity on a rolling four-hour (R4H) average, not on maximum capacity reached.
•© 2012 Mullins Consulting, Inc. •11
Be Aware…
Sub-capacity pricing can, in some cases, lower your overall software bill while increasing some components of your bill. › Perhaps some of your software products have higher costs
with sub-capacity pricing, but the overall software bill is lower.
› Or, maybe you have a seasonal usage pattern, so your bill might be higher in some months with sub-capacity pricing, but your total annual bill for all eligible products is lower.
•© 2012 Mullins Consulting, Inc. •12
• If you are not already using subcapacity pricing…• Read Planning for Subcapacity Pricing (A22-7999-04)
• Step by Step Guide• Form a team• Prerequisites• Timeline• Software inventory• Run a planning tool
• Get a cost analysis from IBM
• Create cost chart • Review T&C’s
Moving to VWLC
•© 2012 Mullins Consulting, Inc. •13
•The 4 parts of • VWLC !
•© 2012 Mullins Consulting, Inc. •14
•Part 1 of VWLC•R4H
•© 2012 Mullins Consulting, Inc. •15
The R4H represents the average consumption (in MSU) of the LPAR during the last 4 hours
= Average of the last 48 IMSU metrics.9:00 … 10:00 …. 11:00 … 1:00
120 250 300 340 350 160 150 …………………................... 145 140 130
19:00
19:00 …… 20:00 23:00
170 140 110 107 105 100 …………………................... 98 95 90 90
R4H 250
R4H 120
0
50
100
150
200
250
300
350
6:00 9:00 12:00 15:00 18:00 21:00 0:00 3:00 6:00
IMSU LPAR 1 R4H LPAR 1
•LPA
R 1
VWLC – The R4H
•© 2012 Mullins Consulting, Inc. •16
Clarifying R4H
Every 5 minutes IMSU consumption is measuredThe R4H is an average of the past 48 IMSU metrics› 48 (metrics) / 4 (hours) = 12 metrics/hour
•125•130•133•132•131•134•130
•.•.•.
•126•119
•127
•119
•5 minutes
•127•125•130•133•132•131•134•130•.•.•.•126
•removed from the calculation
•added to thecalculation
•© 2012 Mullins Consulting, Inc. •17
How Does R4H Translate Into Billing?
VWLC is not a product usage based pricing; instead, it is a bit of a hybrid.› Remember we use IMSU to calculate R4H.
So, assume you have three LPARs.› R4H averages are calculated for each qualified product, each hour, for each
LPAR, for the month. › A 30 day month has 720 hours (24 x 30 = 720)
•LPAR1
•LPAR3
•LPAR2
•Hour 1 2 3 4 5 6 . . . 718 719 720
• 60 55 50 48 44 47 . . . 49 50 45
• 70 80 75 60 64 68 . . . 71 75 70
• 40 40 42 40 34 38 . . . 41 47 44
•© 2012 Mullins Consulting, Inc. •18
Now we also have various products in each LPAR› LPAR1: z/OS, DB2, MQ› LPAR2: z/OS, CICS, DB2, COBOL› LPAR3: z/OS, CICS, IMS, COBOL
The products will be charged based on the peak period of the sum of the R4H for the LPARs in which they run› z/OS: LPAR1, LPAR2, LPAR3› CICS: LPAR2, LPAR3› DB2: LPAR1, LPAR2› MQ: LPAR1› COBOL: LPAR2, LPAR3› IMS: LPAR3
How Does R4H Translate Into Billing? (continued)
•© 2012 Mullins Consulting, Inc. •19
We need R4H sums for all combination with products
How Does R4H Translate Into Billing? (continued)
•LPAR1
•LPAR3
•LPAR2
•Hour 1 2 3 4 5 6 . . . 718 719 720
• 60 55 50 48 44 47 . . . 49 50 45
• 70 80 75 60 64 68 . . . 71 75 70
• 40 40 42 40 34 38 . . . 41 47 44
•1+2+3
•2+3
•1+2
•161 172 159
• 130 135 125 108 108 115 . . . 120 125 115
• 110 120 117 100 98 106 . . . 112 122 114
•…
•170 •175 •167 •148 •142 •153•z/OS
•CICS, COBOL
•DB2
•MQ
•IMS
•. . .
•© 2012 Mullins Consulting, Inc. •20
Q: So what is the billable MSU for each product?A: It is the peak R4H for the LPAR or grouping of LPARs in
which the product ran.
How Does R4H Translate Into Billing? (continued)
•LPAR1
•LPAR3
•Hour 1 2 3 4 5 6 . . . 718 719 720
• 60 55 50 48 44 47 . . . 49 50 45
• 40 40 42 40 34 38 . . . 41 47 44
•1+2+3
•2+3
•1+2
•161 172 159
• 130 135 125 108 108 115 . . . 120 125 115
• 110 120 117 100 98 106 . . . 112 122 114
•170 •175 •167 •148 •142 •153•z/OS = 175
•CICS, COBOL = 122
•DB2 = 135
•MQ = 60
•IMS = 47
•. . .
•© 2012 Mullins Consulting, Inc. •21
• Part 2 of VWLC•DC
•DC
•© 2012 Mullins Consulting, Inc. •22
DC vs. WLM vs. PR/SMDefined Capacity (DC)› Set in the HMC and used to control billing
› Does not enforce capping and is not mandatory
z/OS Workload Manager (WLM)› Calculates and monitors the R4H
› If DC is set to a non-zero number, WLM monitors the R4H and ensures that the R4H is less than or equal to the DC
› Of course, WLM also manages your workloads based on settings/goals (WLM operations are not within scope of this course)
Processor Resource/Systems Manager (PR/SM)› Enforces the soft cap when WLM determines it is needed
•© 2012 Mullins Consulting, Inc. •23
• Hardware Management Console (HMC) – you set the DC here
Defined Capacity
•© 2012 Mullins Consulting, Inc. •24
• Part 3 of VWLC•IMSU
•© 2012 Mullins Consulting, Inc. •25
IMSU : Instantaneous consumption of MSU for the LPAR
0
10
20
30
40
50
60
70
80
90
100
110
120
130
140
00:00 06:00 12:00 18:00 00:00
8:00 Beginning of OLTP
10:00 Peak of consumption AM
12:00 – 14:00
Lunch time
17:00 Peak of consumption PM
21:00
Beginning of Batch
IMSU
•© 2012 Mullins Consulting, Inc. •26
•Part 4 of VWLC•SCRT
•© 2012 Mullins Consulting, Inc. •27
VWLC – IBM Sub Capacity Reporting Your Invoice
•==B5========= SCRT SUB-CAPACITY REPORT - IBM Corp ====================
•Run Date/Time 05 Mar 2010 - 10:55•Name of Person Submitting Report: Joe User•E-Mail Address of Report Submitter: [email protected]•Phone Number of Report Submitter: 281 808-0270•Customer Name SOFTWAREONZ
•Customer Number 216•Machine Serial Number 99-026EE•Machine Type and Model 2094-706•Machine Rated Capacity (MSUs) 422•Purchase Order Number (optional)•Customer Comments (255 chars max) (optional)
•For recurring charge (MLC) products the data supplied in this report will be used to adjust•the billable MSUs in inventory for all MLC Products listed under the MLC Product Name•column on this report. In accordance with our agreement IBM will treat a change in product•licensed capacity as an order. If the MSUs have changed since the last report software billing•based on inventory MSUs will increase or decrease accordingly.••For One Time Charge (IPLA) products the data supplied in this report will be used to•bill those IPLA products listed under the IPLA Product Name column in this report which•exceed your entitled capacity. In accordance with our agreement•IBM will treat the use of a product in excess of its entitled capacity as an order and you will be billed for•the amount in excess of your entitlement.
•Note: This report is expected to provide a "% data collected" > 95% and data reporting•period beginning on the 2nd of the previous month and ending on the 1st of the current month.
•==C5===============================================================
•
•Section P5
•© 2012 Mullins Consulting, Inc. •28
• The Sub-Capacity Reporting Tool (SCRT) is a no-charge IBM tool that reports required license capacity for sub-capacity eligible products.
• The SCRT indicates the required license capacity (in MSUs) of each sub-capacity eligible product.• The SCRT cross-references LPAR utilization and product
execution by LPAR to determine the maximum concurrent LPAR four-hour rolling average utilization — the highest combined utilization of LPARs where each product executes during the reporting period.
• Sub-capacity products are charged based on the rolling four-hour (R4H) average utilization of the LPARs in which the sub-capacity products execute.
• The sub-capacity report determines the required license capacity by examining, for each hour in the reporting period:
• The four-hour rolling average utilization, by LPAR• Which eligible products were active in each LPAR
What is the SCRT?
•© 2012 Mullins Consulting, Inc. •29
Each hour, the (R4H) rolling four-hour average is compared to the defined capacity (DC), if set.• If the DC is set, the SCRT uses the lower of the two values for the
utilization value for the z/OS system for that hour.
• If R4H < DC then R4H is used• If R4H > DC then DC is used
• If the DC is set to zero (that is, no soft capping), the SCRT uses the R4H as the utilization value for the z/OS system for that hour.
R4H or DC: What is Reported?
•Remember, the R4H is the average value of SMF 70 for that hour.
•© 2012 Mullins Consulting, Inc. •30
• SCRT (Sub Capacity Reporting Tool) is a tool used by IBM for z/OS billing.
• It uses the following SMF records:• SMF 70-1 and SMF 89-1 / 89-2
• The SCRT is computed on a monthly basis :• During the month (from the second day of the month at 0h00 to the first
day at 24h00 of the following month)
• R4H averages are calculated for each WLC products, each hour, for each LPAR, for the month.
IBM Sub Capacity Reporting Tool (SCRT)
•© 2012 Mullins Consulting, Inc. •31
– When Rolling 4 Hours (R4H) becomes greater than or equal to DC then the LPAR is capped. That means that the IMSUconsumption will not be able to exceed DC anymore until the R4H becomes lower than the DC.
The Soft Capping Rule
•© 2012 Mullins Consulting, Inc. •32
VWLC with Soft-Capping: LPAR view
IMSU : Instantaneous consumption of MSU for the LPAR
0
10
20
30
40
50
60
70
80
90
100
110
120
130
140
00:00 06:00 12:00 18:00 00:00
8:00 Beginning of OLTP
10:00 Peak of consumption AM
12:00 – 14:00
Lunch time
17:00 Peak of consumption PM
21:00
Beginning of Batch
•© 2012 Mullins Consulting, Inc. •33
VWLC with Soft-Capping: LPAR view
0
10
20
30
40
50
60
70
80
90
100
110
120
130
140
00:00 06:00 12:00 18:00 00:00
IMSU : Instantaneous consumption of MSU for the LPAR
R4H : Average of IMSU in 4 consecutive hours.
… and that you can fix at any level you want
•© 2012 Mullins Consulting, Inc. •34
VWLC with Soft-Capping: LPAR view
0
10
20
30
40
50
60
70
80
90
100
110
120
130
140
00:00 06:00 12:00 18:00 00:00
IMSU : Instantaneous consumption of MSU for the LPARR4H : Average of IMSU in 4 consecutive hours.
DC : Defined Capacity, billing limit that you don’t want to exceed… and that you can fix at any level you want
But performance can be affected (capping IMSU is brought back to the DC) !
•© 2012 Mullins Consulting, Inc. •35
Conclusions
Pricing models and calculations can be confusing but…
• Subcapacity pricing can save you money!
There are more nuances to VWLC than can be adequately covered in an introductory presenation
• ooCOD, GCL, etc.
It is possible to impact the bill for multiple products by reducing the R4H for a single product.
• Subcapacity pricing charges by LPAR usage, so if the R4H for an LPAR decreases, it is possible that the bill for everyproduct in that LPAR will go down.
Intelligent DB2 tuning can be helpful!
•© 2012 Mullins Consulting, Inc. •36
Tactics for DB2 Tuning
Understand where your monthly peaks are and attack the peaks.
• The SCRT reports the peak for each LPAR• As well as the next highest peak usage time
• When DB2 contributes to the peak, use DB2 tuning techniques to reduce consumption
When you reduce one peak, find the next and attack that one.
Let’s look at some techniques that can be used.
•© 2012 Mullins Consulting, Inc. •37
Tuning “Outside the Box”
Remember, you are charged for each product based upon the LPARs in which the product runs.
• You may be able to tune DB2 usage and reduce the cost of other products that run in the same LPARs• z/OS, CICS, IMS, COBOL, etc.
• Likewise, you may be able to tune non-DB2 usage and reduce the cost of DB2 • Consider: say you have a batch VSAM program that consumes a lot of
resources during your monthly peak, tuning that program to be more efficient could reduce your peak R4H, and thereby reduce the cost for all products running in that LPAR.
• For example, running a REPRO to reorganize the file and eliminate CI and CA splits can improve VSAM performance and reduce resource requirements
• And if that job ran in the same LPAR as DB2, it could also reduce the cost of DB2
•© 2012 Mullins Consulting, Inc. •38
Where is Your Peak?
What if your monthly R4H peak is in the batch window? Are you meeting your batch SLAs? Consider what can be done to reduce MSU consumption during batch
processing. COMMIT processing? Concurrency and locking? SQL tuning?
What if your monthly R4H peak is during your daily transaction processing?
Have your optimized your transactions? Is the workload appropriate for your system? Consider what can be done to reduce MSU consumption during OLTP. CICS tuning? RDO specifications? SQL tuning?
•© 2012 Mullins Consulting, Inc. •39
DB2 Tuning Tactics
• Tune the SQL/application• Most relational tuning experts agree that the
majority of performance problems with relational database applications are caused by poorly coded application code and SQL.
• Other DB2 tuning options• Tune the database• Tune the subsystem• Tune the environment
•.
•© 2012 Mullins Consulting, Inc. •40
SQL/Application Tuning
Identify the heaviest resource consuming SQL during the peak processing time(s)
Identify tuning opportunities
Review access paths and tune
• Indexing, eliminating scans
• Let SQL do the work (not the program)
• Avoid sorting when possible
• Favor Stage 1 and Indexable predicates
• Review locking considerations
• UOW, lock avoidance, COMMIT, isolation level (dirty read)
• Review cursors
• Multi-row FETCH
•© 2012 Mullins Consulting, Inc. •41
Let’s Take a Look at Multi-row Fetch
With multi-row Fetch, instead of obtaining data a row at a time to the program, data is obtained in blocks› That is, multiple rows are obtained into an array in the
program› The program then must navigate through the array and
request an additional block of rows when the current block has been processed
› Let’s look at high-level depictions of how a multi-row FETCH differs from a traditional, single row FETCH cursor
IF-THEN-ELSE
•© 2012 Mullins Consulting, Inc. •42
•Program
•FETCH •1 Row
•FETCH •1 Row
•FETCH •1 Row
•Start
•DB2 Result Set
•Row 3
•Row 2
•Row 1•Data
•Request
•Data
•Request
•Data
•Request
Typical DB2 Single-Row FETCH
•© 2012 Mullins Consulting, Inc. •43
•DB2 Result Set•Program
•FETCH •10 Rows
•FETCH •10 Rows
•Start
•Row 21•Row 20•Row 19•Row 18•Row 17•Row 16•Row 15•Row 14•Row 13•Row 12•Row 11•Row 10•Row 9•Row 8•Row 7•Row 6•Row 5•Row 4•Row 3•Row 2•Row 1
•Request•Data
•Request•Data
Example DB2 Multi-Row FETCH
•© 2012 Mullins Consulting, Inc. •44
Single Row vs. Multi-Row FETCH
With Multi-Row FETCH:› CPU can be greatly reduced because moving data across
address spaces is expensive With a multi-row FETCH multiple rows are moved with one operation With a row-at-a-time FETCH, each FETCH requires an operation
› More coding is required in the application program to enable Unless it is a distributed program using Block Fetch Block Fetch is a distributed technique for more efficiently blocking
fetched rows; when data is blocked, less overhead is required as data is sent over the communication lines
As of DB2 V8, Block Fetch will automatically use multi-row FETCH To ensure that your distributed read only cursors use Block Fetch be sure
to code the FOR READ ONLY clause and BIND specifying CURRENTDATA NO.
•© 2012 Mullins Consulting, Inc. •45
Performance of Multi-Row FETCH
The performance improvement using multi-row FETCH in general depends on:› Whether or not the request is distributed› Number of rows fetched in one FETCH› Number of columns fetched, data type and size of the
columns In general, the fewer columns the greater the performance
improvement with multi-row FETCH will be
› Complexity of the SELECT processing The fixed overhead saved for not having to go between the
database engine and the application program has a lower percentage impact for complex SQL that has longer path lengths
•© 2012 Mullins Consulting, Inc. •46
General Advice
Use Multi-row FETCH to improve application performance in all new development efforts
› Use it whenever 10 or more rows need to be fetched
Consider retrofitting it into existing application programs› Many times new features are only used on new programs instead of
examining existing workload to determine where the new features can improve performance
› MRF should be a prime candidate for retrofitting into existing applications
Look for programs that contain SQL statements from which a lot of data is fetched
•© 2012 Mullins Consulting, Inc. •47
Use SoftBase Attach Facility!
SoftBase Attach Facility’s MRF Feature
Quickly implement MRF in your existing applications
SQL statement CPU and elapsed time savings as high as 74%*
No changes to source code
Automatically implement MRF
•*Based on observations from internal testing of individual SQL statements. Individual results may vary, and will be based on many factors, including the number of FETCH statements an application initiates.
•© 2012 Mullins Consulting, Inc. •48
1Intercept
single-row FETCH call
3Pull rows into
temporary result set
2Issue
Multi-Row FETCH call
•DB2 Result Set
•Row 21•Row 20•Row 19•Row 18•Row 17•Row 16•Row 15•Row 14•Row 13•Row 12•Row 11•Row 10•Row 9•Row 8•Row 7•Row 6•Row 5•Row 4•Row 3•Row 2•Row 1
•Attach Facility MRF Feature
4Return rows as they are
called…FAST!
5After all rows are
called, the process repeats.
•Program
FETCH 1 Row
Start
•Request
•Request
FETCH 1 Row
FETCH 1 Row
SoftBase Attach Faciltiy MRF Feature
•© 2012 Mullins Consulting, Inc. •49
Attach Facility’s Multi-Row FETCH Feature
How does it save CPU time?
Each row can be pulled much faster
Each FETCH requires only tens of instructions, versus hundreds or thousands when issued to DB2
Tests have shown FETCH processing performance improvement by as much as 74%*
•*Results may vary
FETCH single row
•Program •MRF Temporary Table
•Row 1•Row 2•Row 3•Row 4•Row 5
•DB2 Result Set
•Row 5•Row 4•Row 3•Row 2•Row 1FETCH single
row
•Program
•100’s or 1000’s of instructions
•MRF Feature FETCH Processing
•Typical DB2 FETCH Processing
10’s of instructions per fetch
100’s or 1000’s of instructions per fetch
•© 2012 Mullins Consulting, Inc. •50
Attach Facility MRF Feature
•© 2012 Mullins Consulting, Inc. •51
CPU Time Reduction
Elapsed Time Reduction Description
75% 75% buffer_size=100 rows, Fetch:Open 100:0 (i.e very high)67% 67% N/A65% 58% N/A46% No data buffer_size=100 rows, Fetch:Open – 97:345% 35% N/A43% No data buffer_size=100 rows, Fetch:Open – 97:328% 9% buffer_size=100 rows, Fetch:Open - 81:19, ORDER BY was used24% 43% buffer_size=100 rows, Fetch:Open – 97:3
23% 48% N/A
Attach Facility MRF Feature
User Site Results
•© 2012 Mullins Consulting, Inc. •52
Where Can MRF Help?
Download and install SoftBase’s Batch Analyzer free trial Run for several days (very low overhead) Output identifies applications that will benefit the most
from multi-row FETCH
SoftBase’s Batch Analyzer quickly identifies applications that can benefit from MRF
JOB NAMEJOB
NUMBERPROGRAM
NAMECURSOR NAME
NUMBER OPENS
NUMBER FETCHES
AVERAGE FET/OPEN
OPEN DB2 ELAPSED TIME
OPEN DB2 CPU TIME
FET DB2 ELAPSED TIME
FET DB2 CPU TIME
ABC7LOTS JOB01482 PRGM3 C1 1082 45361268 41923 00:00.1 00:00.1 58:43.2 1:00:28ABC7LOTS JOB01482 PRGM3 C2 1082 45361268 41923 00:00.1 00:00.1 59:42.8 1:01:35ABC7LOTS JOB01482 PRGM3 C3 1082 45361268 41923 00:00.1 00:00.1 1:01:36 1:03:34ABC7LOTS JOB01473 PRGM1 C1 166 6426450 38713 00:00.0 00:00.0 06:39.0 06:28.8ABC7LOTS JOB01473 PRGM1 C2 165 6376351 38644 00:00.0 00:00.0 06:40.7 06:30.4ABC7LOTS JOB01473 PRGM1 C3 165 6376351 38644 00:00.0 00:00.0 06:51.2 06:39.4ABC7RUN JOB08479 PRGM2 GET_JOBS 1 3 3 00:00.3 00:00.3 00:00.0 00:00.0ABC7RUN JOB08480 PRGM2 GET_PROG 4 10 2 00:00.0 00:00.0 00:00.0 00:00.0ABC7RUN JOB08481 PRGM2 PACKSTMT 6 12 2 00:00.7 00:00.6 00:00.0 00:00.0
JOB NAMEJOB
NUMBERPROGRAM
NAMECURSOR NAME
NUMBER OPENS
NUMBER FETCHES
AVERAGE FET/OPEN
OPEN DB2 ELAPSED TIME
OPEN DB2 CPU TIME
FET DB2 ELAPSED TIME
FET DB2 CPU TIME
ABC7LOTS JOB01482 PRGM3 C1 1082 45361268 41923 00:00.1 00:00.1 58:43.2 1:00:28ABC7LOTS JOB01482 PRGM3 C2 1082 45361268 41923 00:00.1 00:00.1 59:42.8 1:01:35ABC7LOTS JOB01482 PRGM3 C3 1082 45361268 41923 00:00.1 00:00.1 1:01:36 1:03:34ABC7LOTS JOB01473 PRGM1 C1 166 6426450 38713 00:00.0 00:00.0 06:39.0 06:28.8ABC7LOTS JOB01473 PRGM1 C2 165 6376351 38644 00:00.0 00:00.0 06:40.7 06:30.4ABC7LOTS JOB01473 PRGM1 C3 165 6376351 38644 00:00.0 00:00.0 06:51.2 06:39.4ABC7RUN JOB08479 PRGM2 GET_JOBS 1 3 3 00:00.3 00:00.3 00:00.0 00:00.0ABC7RUN JOB08480 PRGM2 GET_PROG 4 10 2 00:00.0 00:00.0 00:00.0 00:00.0ABC7RUN JOB08481 PRGM2 PACKSTMT 6 12 2 00:00.7 00:00.6 00:00.0 00:00.0
•© 2012 Mullins Consulting, Inc. •53
SoftBase Batch Analyzer
Drill down reporting lets you quickly find:
•Worst Jobs
•Worst Job Steps
•Worst SQL Statements
•Individual SQL Statement Text
•Hot key opens DB/IQ and explains the SQL problem!
•© 2012 Mullins Consulting, Inc. •54
DB/IQ and Batch Analyzer
Improve SQL Quality and Development Efficiency; Reduce Costs
DB/IQ – Quality Assurance
Enables DBAs to automatically enforce SQL standards, resulting in improved SQL quality and reduced CPU consumption
Reduces development costs by enabling faster, better coding
Batch Analyzer
Enables programmers to quickly find and fix poorly performing SQL
Reduces time spent troubleshooting and, ultimately, mainframe usage expenses
•© 2012 Mullins Consulting, Inc. •55
Summary
• Consider cost reduction along with performance improvement by taking peak R4H into account
• Find the big resource consumers in your peak R4H window
• Look for ways to minimize resource consumption
• Find areas where MRF can improve DB2 performance
• Consider a proactive approach with SoftBase tools:
• Attach Facility
• Batch Analyzer
• DB/IQ
•© 2012 Mullins Consulting, Inc. •56
Contact Information
Craig S. MullinsMullins Consulting, Inc.15 Coventry CourtSugar Land, TX 77479
http://www.craigsmullins.com
•http://www.craigsmullins.com/cm-book.htm
•http://www.craigsmullins.com/dba_book.htm
•Phone: (281) 494-6153
6th edition now available…covering up thru DB2 V10!
•© 2012 Mullins Consulting, Inc. •57
SoftBase Contact Information
•http://www.softbase.com
•SoftBase•20 Fall Pippin Lane, Suite 202Asheville, NC USA [email protected]@softbase.com828-670-9900
•SoftBase is a division of Candescent SoftBase, LLC.