View
1.596
Download
1
Category
Preview:
DESCRIPTION
Citation preview
SQL Elapsed Time Analysis
Unit of Work Time Based
Analysis
Craig A. Shallahamer Founder - OraPub, Inc.
craig@orapub.com
SQL Elapsed Time Analysis
OraPub is about Oracle performance.
• OraPub is all about Oracle performance management; systematic and quantitative firefighting and predictive analysis.
• Web site started in 1995 and the company was founded in 1998 by Craig Shallahamer.
• OraPub has always been about disseminating Oracle database centric technical information.
• Consulting, training, books, papers, and products are now being offered.
• We have been on-site in 24 countries and our resources have been received in probably every country where there are DBAs.
• Training • Unique Blog • Free Tools
• Free Papers • Books
• Products • Consul8ng
Resources
SQL Elapsed Time Analysis
Short resume...kind of... • Studies economics, mathematics, and computer science at
university in California, US. • Started working with Oracle technology in 1989 as a Forms 2.3
developer on Oracle version 5. • Soon after started performance firefighting...daily! • Co-found both Oracle’s Core Technology and System
Performance Groups. • Left Oracle to start OraPub, Inc. in 1998. • Authored 24 technical papers and worked in 24 countries. • Authors and teaches his classes Oracle Performance
Firefighting, Adv Oracle Performance Analysis, and Oracle Forecasting & Predictive Analysis.
• Authored the books, Forecasting Oracle Performance and Oracle Performance Firefighting.
• Oracle ACE Director. • Frequent blog contributor: A Wider View
SQL Elapsed Time Analysis
My two books...
OraPub discount code: IS11
SQL Elapsed Time Analysis
Performance analysis philosophies. • Ratio Analysis is the traditional method relying on simple
calculations leading one to the problem area. “When the ratios are right, then so is performance.”...not always!
• Wait Event Analysis (WEA) listens to where Oracle says it’s not consuming CPU resources. “When I bring down the top wait event, users are happier.” ...not always!
• Time Based Analysis (TBA) is centred on interval time, elapsed time, and quantifying the users’ experience, at least in part. TBA is relative to ones perspective and should include CPU time. “When total time is decreases, performance increases.”...not always!
• Unit of Work Time Based Analysis unites Oracle TBA with Operations Research by creatively using the time it takes to process a single unit of work. The benefits are a deep understanding of cause and effect, solution comparison and evaluation, anticipating performance, complete analysis quantification, and enhanced visuals. “When LIO RT decreases, LIO dependent elapsed times also decrease until the workload increases too much.”
SQL Elapsed Time Analysis
Situation, over a time interval(s).
Non-Idle Wait Time
CPU Time
Other
IO
Srvr Prc
BG Prc
Time related to all the work occurred for a
specific period of time.
Source: Confio Software’s Igniter product.
Perhaps 1.8M PIOs occurred during this interval.
SQL Elapsed Time Analysis
Representing time associated with a single unit of work.
If 1.8M PIOs occurred during a one hour interval and there was 3500 seconds of associated CPU and non-‐idle wait Lme,
then on average, each PIO took 1.94 ms to complete.
SQL Elapsed Time Analysis
Contrasting RT based approaches
Non-‐Idle Wait Time 1500s Total
Response Time 3500s
CPU Time 2000s
Focus: “This is what occurred.” “This is what we should
do.”
Focus: “This is what we can expect this
soluLon to do.” “This is the elapsed Lme change.”
SQL Elapsed Time Analysis
Classic Performance MathemaLcs
Fully QuanLfied
ORTA
Key Parameter DerivaLon
Proposed SoluLons
Performance Model
ObjecLve SoluLon Analysis
Poor Performing System
SQL Elapsed Time Analysis
First, plot a performance situation.
SQL Elapsed Time Analysis
Second combine respected disciplines.
Rt:cpu =St
1− StλM
⎛⎝⎜
⎞⎠⎟M
SQL Elapsed Time Analysis
Third, objectively evaluate.
SQL Elapsed Time Analysis
Keep it as simple as possible. Detail how to move from
red to blue…
Provide just enough informaLon to get your point across and saLsfy your audience.
SQL Elapsed Time Analysis
Situation, time per work unit.
Time related to compleLng a single unit of work.
Graph created using OraPub’s RT Graph
Template.
SQL Elapsed Time Analysis
Moving: interval time to RT analysis. • Notice the focus change: From total interval time, to time per unit of
work. • Situation. Over a 30 minute interval, 5000 PIOs occurred, 250
seconds of CPU was consumed, and sessions waited for 2000 seconds. Key performance areas degraded as PIOs increased.
• Unit of work. We must choose an appropriate unit of work. (e.g., physical IO read requests)
• Service Time. How much CPU is consumed per unit of work. (e.g., 250 sec / 5000 pio = 0.050 sec/pio)
• Queue Time. How much non-idle wait time per unit of work. (e.g., 2000 sec / 5000 pio = 0.400 sec/pio)
• Arrival Rate. How much work arrives per unit of time. (e.g., 5000 pio / 1800 sec = 2.778 pio/sec)
• Response Time. Simply, service time plus queue time. (e.g., 0.050 sec/pio + 0.40 sec/pio = 0.45 sec/pio)
SQL Elapsed Time Analysis
Creating the RT graph using M-Solver.
http://filezone.orapub.com/cgi-bin/msolve.cgi!
SQL Elapsed Time Analysis
All the key parameters
are now available to
create a clean RT
graph, plus the M-Solver
details.
SQL Elapsed Time Analysis
Got the
graph!
SQL Elapsed Time Analysis
Reality Check: A clear RT curve.
SQL Elapsed Time Analysis
Reality Check: A clear RT curve.
SQL Elapsed Time Analysis
Reality Check: Production system.
source: http://aberdave.blogspot.com/2011/03/response-time-analysis-based-on-awr.html!
SQL Elapsed Time Analysis
Reality Check: Altering insert batch size
Batch size 1
Batch size 2
28%!
More? http://shallahamer-orapub.blogspot.com/2010/05/insert-batch-size-performance-effects.html!
work: insert!time: ms!
SQL Elapsed Time Analysis
In summary…step by step. • Perform an Oracle response time analysis (ORTA). • Pick a good workload metric. • Gather the total workload. • Calculate the key and classic performance
parameters. • Plot single point. • Create response time curve by combining
performance situation with classic performance mathematics.
• Objectively and scientifically compare alternative solutions!
SQL Elapsed Time Analysis
Let’s Do It!
http://filebank.orapub.com/perf_stats/SP_PDXPROD.txt!
SQL Elapsed Time Analysis
Want to dig deeper? • Craig’s Blog – A W i d e r V i e w • Paper: Evaluating Alternative Performance Solutions
• Training from OraPub
– Oracle Performance Firefighting (I)
– Adv Oracle Performance Analysis (II)
• Books
– Oracle Performance Firefighting (C. Shallahamer)
• Chapter 9 is FREE to download
Melbourne & Perth in Q2 2012
SQL Elapsed Time Analysis
Thank You!
Recommended