Database & Technology 1 _ Craig Shallahamer _ Unit of work time based performance analytics.pdf
1. Unit of Work
Time Based
Analysis
Craig A. Shallahamer
Founder - OraPub, Inc.
craig@orapub.com
SQL
Elapsed
Time
Analysis
2. OraPub is about Oracle performance.
• OraPub is all about Oracle performance Resources
management; systematic and quantitative
firefighting and predictive analysis.
•
Training
• Web site started in 1995 and the company was
founded in 1998 by Craig Shallahamer. •
Unique
Blog
• OraPub has always been about disseminating •
Free
Tools
Oracle database centric technical information.
• Consulting, training, books, papers, and •
Free
Papers
products are now being offered.
•
Books
• We have been on-site in 24 countries and our
resources have been received in probably •
Products
every country where there are DBAs.
•
Consul8ng
SQL
Elapsed
Time
Analysis
3. 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
4. My two books...
OraPub
discount
code:
IS11
SQL
Elapsed
Time
Analysis
5. 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
6. Situation, over a time interval(s).
Other
Non-Idle
Time related to all the Wait Time IO
work occurred for a
specific period of time.
Srvr Prc
CPU Time
Perhaps 1.8M PIOs occurred BG Prc
during this interval.
Source: Confio Software’s Igniter product.
SQL
Elapsed
Time
Analysis
7. 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
8. Contrasting RT based approaches
Non-‐Idle
Wait
Time
Total
1500s
Response
Time
CPU
3500s
Time
2000s
Focus:
Focus:
“This
is
what
occurred.”
“This
is
what
we
can
expect
this
“This
is
what
we
should
soluLon
to
do.”
do.”
“This
is
the
elapsed
Lme
change.”
SQL
Elapsed
Time
Analysis
9. Poor
Performing
System
Classic
Fully
Key
Parameter
Performance
QuanLfied
DerivaLon
MathemaLcs
ORTA
Proposed
Performance
SoluLons
Model
ObjecLve
SoluLon
Analysis
SQL
Elapsed
Time
Analysis
10. First, plot a performance situation.
SQL
Elapsed
Time
Analysis
11. Second combine respected disciplines.
St
Rt:cpu =
⎛ St λ ⎞
M
1− ⎜
⎝ M⎟ ⎠
SQL
Elapsed
Time
Analysis
13. 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
14. 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
15. 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
16. Creating the RT graph using M-Solver.
http://filezone.orapub.com/cgi-bin/msolve.cgi!
SQL
Elapsed
Time
Analysis
17. All the key
parameters
are now
available to
create a
clean RT
graph, plus
the M-Solver
details.
SQL
Elapsed
Time
Analysis
23. 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
24. Let’s Do
It!
http://filebank.orapub.com/perf_stats/SP_PDXPROD.txt!
SQL
Elapsed
Time
Analysis
25. 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
Melbourne
– Oracle Performance Firefighting (I)
&
Perth
in
– Adv Oracle Performance Analysis (II) Q2
2012
• Books
– Oracle Performance Firefighting (C. Shallahamer)
• Chapter 9 is FREE to download
SQL
Elapsed
Time
Analysis