Vous êtes sur la page 1sur 9

Oracle AWR report Analysis

Table of contents
ORACLE AWR REPORT ANALYSISTABLE OF CONTENTS-------------------------------------1
TABLE OF CONTENTS---------------------------------------------------------------------------------------------2
1. INTRODUCTION-------------------------------------------------------------------------------------------------3
2. AWR REPORT PARTS-----------------------------------------------------------------------------------------3
2.1 THE SNAPSHOT DETAILS----------------------------------------------------------------------------------------3
2.2 LOAD PROILE---------------------------------------------------------------------------------------------------3
2.! TOP " TI#ED ORE$RO%ND E&ENTS----------------------------------------------------------------------4
2.' THE TI#E #ODEL STATISTI(S--------------------------------------------------------------------------------5
Time Model Statistics-----------------------------------------------------------------------------------------5
2." S)L SE(TION---------------------------------------------------------------------------------------------------6
2.5.1 Total Elapsed Time-----------------------------------------------------------------------------------7
2.5.2 Total CPU Time-----------------------------------------------------------------------------------------7
2.5.3 Total Buffer Gets--------------------------------------------------------------------------------------7
2.5.4 Total Dis !eads---------------------------------------------------------------------------------------7
2.5.5 Total E"ecutio#s---------------------------------------------------------------------------------------8
2.5.$ Parse Calls------------------------------------------------------------------------------------------------8
2.5.% S&ara'le Memor(-------------------------------------------------------------------------------------8
2.5.) *ersio# Cou#t-------------------------------------------------------------------------------------------9
1. Intro*+ction
T,is *oc+-ent .ill intro*+ce an* e/plain t,e -ain parts of an Oracle AWR report.
2. AWR report parts
2.1 T&e s#aps&ot details
T,is is nor-ally s,o.n at t,e be0innin0 of t,e report.
Snap Id Snap Time Sessions Cusos!Session
1e0in Snap2 3""4 156Oct612
2127727"
2'3 '1.5
En* Snap2 3""8 156Oct612
2!27721'
2'5 '1.4
Elapse*2 127.1' 9-ins:
D1 Ti-e2 2!5.!8 9-ins:
Elapse* 9ti-e: is t,e inter;al of ti-e bet.een t,e start an* en* snaps,ots. Anot,er
i-portant <+antity is *atabase D1 Ti-e .,ic, is t,e s+- of .or=in0 sessions> ti-e.
D1 Ti-e ? s+- of *atabase (P% ti-e @ .aits. In syste-s .it, -+ltiple conc+rrent
acti;e sessions D1 Ti-e can be lar0er t,an t,e elapse* ti-e. T,is is beca+se D1
Ti-e is a s+- of o;er all acti;e sessions t,at are +sin0 (P%9s: or .aitin0 for an
e;ent. Note t,at 1ac=0ro+n* processes are not incl+*e* in t,at.
2.2 +oad Profile
Pe Se"ond Pe Tansa"#ion Pe E$e" Pe Ca%%
D1 Ti-e9s:2 2.7 7.7 7.71 7.71
D1 (P%9s:2 1.! 7.7 7.71 7.77
Re*o siAe2 !1B731.8 '2!."
Lo0ical rea*s2 1B722B233.2 1!B5!!.'
1loc= c,an0es2 13'.! 2.'
P,ysical rea*s2 '5!.5 4.3
P,ysical .rites2 17.2 7.1
%ser calls2 !71.1 '.1
Parses2 22.4 7.!
Har* parses2 7.3 7.7
WCA #1 processe*2 12.8 7.2
Lo0ons2 7.2 7.7
E/ec+tes2 147.4 2.2
Rollbac=s2 44.5 7.5
Transactions2 3!.'
T,e Loa* Profile is one of t,e -ost i-portant parts in t,e AWR report. Of partic+lar
si0nificance are t,e p,ysical ICO rates an* ,ar* parses
1
. A ,i0, ,ar* parse rate
+s+ally is a res+lt of not +sin0 bin* ;ariables
2
. If yo+ see a ,i0, ,ar* parse rate per
secon* for lo0onsB it +s+ally -eans t,at yo+r applications aren>t +sin0 persistent
connections. A ,i0, n+-ber of lo0ons or an +n+s+ally ,i0, n+-ber of transactions
tells yo+ so-et,in0 +n+s+al is ,appenin0 in yo+r D1. Ho.e;erB t,e only .ay yo+ .ill
=no. t,e n+-bers are +n+s+al is if yo+ re0+larly c,ec= t,e AWR reports in a
properly f+nctionin0 D1.
2.3 Top 5 Timed ,ore-rou#d E.e#ts
T,is is probably one of t,e -ost i-portant sections of AWR report.
T,is section is .,ere yo+ can +s+ally spot t,e proble-B by s,o.in0 yo+ .,y t,e
sessions are D.aitin0>. T,e top " e;ents infor-ation s,o.s t,e total .aits for all
sessions. %s+ally one or t.o sessions are responsible for -ost of t,e .aits.
In a ni"e%& pe'omin( DB) &ou s*ou%d see CPU and I!O as #*e #op +ai#
e,en#s.
1
Har* parse E Oracle ,as to *o a ,ar* parse .,en a session e/ec+tes an S)L state-ent t,at *oes not
e/ist in t,e s,are* pool. AS oppose* to Soft parse t,at ,appens .,en a session e/ec+tes an S)L
state-ent t,at e/ists in t,e s,are* pool an* t,ere is a ;ersion of t,e state-ent t,at can be +se*.
2
1in* ;ariables is a place6,ol*er ;ariable in a S)L state-ent t,at -+st be replace* .it, a ;ali* ;al+e 9or
a**ress of a ;al+e: before t,e state-ent can s+ccessf+lly e/ec+te.
I' an& +ai# e,en#s 'om #*e "on"uen# +ai# "%ass su"* as %a#"*es
!
s*o+ up
in #*e #op +ai# e,en#s) in,es#i(a#e #*ese e,en#s 'u#*e.
E,en# Wai#s Time-s. A,( +ai# -ms. / DB #ime Wai# C%ass
*b file se<+ential rea* 2B813B434 817 7 42.7 %ser ICO
D1 (P% 1!7 5.5
free b+ffer .aits "B"7" 37 1! ".!(onfi0+rat
lo0 file sync 1'2 '4 !2' !."(o--it
lo0 b+ffer space !31 !4 53 2.3(onfi0+rat
In abo;e 42F of *atabase ti-e .as spent .aitin0 for *b file se<+ential rea*.
Ho.e;erB t,e a;era0e .ait ti-e .as Aero. Anot,er 5.5F of t,e ti-e .as spent
.aitin0 for or +sin0 (P% ti-e. A tent, of *atabase ti-e +se* by D1 (P% e;ent is not
ba* at all.
In 0eneral Hi0, (P% +sa0e is often a sy-pto- of poorly t+ne* S)L.
2.4 T&e time model statistics
Time 0ode% S#a#is#i"s
To#a% #ime in da#a1ase use2"a%%s -DB Time.3 14565s
S#a#is#i"s in"%udin( #*e +od 71a"8(ound7 measue 1a"8(ound po"ess #ime) and so
do no# "on#i1u#e #o #*e DB #ime s#a#is#i"
Odeed 1& / o DB #ime des") S#a#is#i" name
S#a#is#i" Name Time -s. / o' DB Time
s<l e/ec+te elapse* ti-e 12B'14.1' 84.'"
D1 (P% 5B22!.37 4'.22
parse ti-e elapse* 5!".41 4."1
,ar* parse elapse* ti-e 88'.3! 4.14
faile* parse elapse* ti-e 821.!5 ".32
PLCS)L e/ec+tion elapse* ti-e 1"!."1 1.73
,ar* parse 9s,arin0 criteria: elapse* ti-e 2".54 7.18
connection -ana0e-ent call elapse* ti-e 1'.77 7.17
,ar* parse 9bin* -is-atc,: elapse* ti-e '.3' 7.7!
3
Latch - fastB ine/pensi;e an* non6sop,isticate* loc=. T,e latc, is +se* .,en yo+ nee* to serialiAe access
to operationsB f+nctions an* *ata str+ct+res in Oracle. T,ey are -eant to be ,el* for a ;ery s,ort ti-e.
PLCS)L co-pilation elapse* ti-e 1.27 7.71
repeate* bin* elapse* ti-e 7.22 7.77
se<+ence loa* elapse* ti-e 7.11 7.77
D1 ti-e 1'B!42.54
bac=0ro+n* elapse* ti-e 3!1.77
bac=0ro+n* cp+ ti-e 32.77
Ti-e -o*el statistics 0i;e yo+ an i*ea abo+t ,o. t,e D1 ,as spent its ti-eB
incl+*in0 t,e ti-e it spent on e/ec+tin0 S)L state-ents as a0ainst parsin0
state-ents. If parsin0 ti-e is ;ery ,i0,B or if ,ar* parsin0 is si0nificantB yo+ -+st
in;esti0ate it f+rt,er.
In t,e abo;e e/a-pleB 5B22!.37 secon*s (P% ti-e .as +se* for all +ser sessions.
T,is .as G+st +n*er 4"F of *atabase reso+rces. In total t,ere .as 1'!4! secon*s
*atabase ti-e +se*. T,e total .ait e;ent ti-e can be calc+late* as 1'!4! E 522!.37
? "1!5.! secon*s. T,e lion s,are of *atabase ti-e 984.'"F: .as spent on e/ec+tin0
s<l .,ic, is a 0oo* si0n. T,e total parse ti-e .as 5!".41 secon*s of .,ic, 88'.3!
secon*s .as ,ar* parsin0. T,e rest of statistics is tiny in t,is case
2.5 S/+ Sectio#
If any S)L state-ent appears in t,e top " state-ents in t.o or -ore areas belo.B it
is a pri-e can*i*ate for t+nin0. T,e sections are2
Total Elapse* Ti-e
Total (P% Ti-e
Total 1+ffer $ets
Total Dis= Rea*s
Total E/ec+tions
Total Parse (alls
Total S,arable #e-ory
Total &ersion (o+nt
Let +s try to see .,at t,ese -ean.
2.9.1 To#a% E%apsed Time
Total Elapse* Ti-e ? (P% Ti-e @ Wait Ti-e. If a S)L state-ent appears in t,e total
elapse* ti-e area of t,e report t,is -eans its (P% ti-e pl+s any ot,er .ait ti-es
-a*e it pop to t,e top of t,e pile. E/cessi;e Elapse* Ti-e co+l* be *+e to e/cessi;e
(P% +sa0e or e/cessi;e .ait ti-es.
2.9.2 To#a% CPU Time
W,en a state-ent appears in t,e Total (P% Ti-e area t,is in*icates it +se* e/cessi;e
(P% cycles *+rin0 its processin0. E/cessi;e (P% processin0 ti-e can be ca+se* by
sortin0B e/cessi;e f+nction +sa0e or lon0 parse ti-es. In*icators t,at yo+ s,o+l* be
loo=in0 at t,is section for S)L t+nin0 can*i*ates incl+*e ,i0, (P% percenta0es in t,e
ser;ice section for t,e ser;ice associate* .it, t,is S)L 9a ,intB if t,e S)L is
+ppercase it probably co-es fro- a +ser or applicationH if it is lo.ercase it +s+ally
co-es fro- t,e internal or bac=0ro+n* processes:. To re*+ce total (P% ti-eB re*+ce
sortin0 by +sin0 co-posite in*e/es t,at can co;er sortin0 an* +se bin* ;ariables to
re*+ce parse ti-es.
2.9.5 To#a% Bu''e :e#s
Total b+ffer 0ets -ean a S)L state-ent is rea*in0 a lot of *ata fro- t,e *b bloc=
b+ffers. $enerally spea=in0 b+ffer 0ets 9AIA lo0ical IO or LIO: are OIB e/cept .,en
t,ey beco-e e/cessi;e. To re*+ce e/cessi;e b+ffer 0etsB opti-iAe S)L to +se
appropriate in*e/es an* re*+ce f+ll table scans. Jo+ can also loo= at i-pro;in0 t,e
in*e/in0 strate0y an* consi*er *eployin0 partitionin0.
2.9.4 To#a% Dis8 Reads
Hi0, total *is= rea*s -ean a S)L state-ent is rea*in0 a lot of *ata fro- *is=s rat,er
t,an bein0 able to access t,at *ata fro- t,e *b bloc= b+ffers. Hi0, p,ysical rea*s
after a ser;er reboot are e/pecte* as t,e cac,e is col* an* *ata is fetc,e* fro- t,e
*is=. Ho.e;erB *is= rea*s 9or p,ysical rea*s: are +n*esirable in an OLTP
'
syste-B
especially .,en t,ey beco-e e/cessi;e. E/cessi;e *is= rea*s ca+se perfor-ance
iss+es.
To re*+ce e/cessi;e *is= rea*sB consi*er partitionin0B +se in*e/es an* loo= at
opti-iAin0 S)L to a;oi* e/cessi;e f+ll table scans.
2.9.9 To#a% E$e"u#ions
Hi0, total e/ec+tions nee* to be re;ie.e* to see if t,ey are 0en+ine e/ec+tions or
loops in S)L co*e. I ,a;e also seen sit+ations .,ere a+tosys Gobs fire *+plicate
co*es erroneo+sly.
If t,e *atabase ,as e/cessi;e p,ysical an* lo0ical rea*s or e/cessi;e IO .ait ti-esB
t,en loo= at t,e S)L state-ents t,at s,o. e/cessi;e e/ec+tions an* s,o. ,i0,
p,ysical an* lo0ical rea*s.
2.9.6 Pase Ca%%s
W,ene;er a state-ent is iss+e* by a +ser or processB re0ar*less of .,et,er it is in
t,e S)L pool it +n*er0oes a parse. As e/plaine* +n*er Parsin0B t,e parse can be a
,ar* parse or a soft parse. E/cessi;e parse calls +s+ally 0o .it, e/cessi;e
e/ec+tions. If t,e state-ent is +sin0 .,at are =no.n as +nsafe bin* ;ariables t,en
t,e state-ent .ill be reparse* eac, ti-e. If t,e ,ea*ers parse ratios are lo. loo=
,ere an* in t,e ;ersion co+nt areas 92.".8:.
2.9.; S*aa1%e 0emo&
S,arable #e-ory refers to S,are* Pool -e-ory area in S$AB ,enceB t,is partic+lar
section in AWR Report states abo+t t,e S)L STATE#ENT (%RSORS .,ic, cons+-e*
t,e -a/i-+- a-o+nt of t,e S,are* Pool for t,eir e/ec+tion.
4
On%ine #ansa"#ion po"essin(B or OLTPB refers to a class of syste-s t,at facilitate an* -ana0e
transaction6oriente* applicationsB typically for *ata entry an* retrie;al transaction processin0.
In 0eneralB ,i0, ;al+es for S,arable #e-ory *oesn>t necessary i-ply t,ere is an
iss+eB it si-ply -eans t,at2
1. T,ese S)L state-ents are bi0 or co-ple/ an* Oracle ,as to =eep lots of
infor-ation abo+t t,ese state-ents OR
2. bi0 n+-ber of c,il* c+rsors e/ist for t,ose parent c+rsors
3. co-bination of 1 K 2
In case of point 2B it -ay be *+e to poor co*in0 s+c, as bin* ;ariables -is-atc,B
sec+rity -is-atc, or o;erly lar0e S)L state-ents t,at Goin -any tables. %s+ally
lar0e state-ents .ill res+lt in e/cessi;e parsin0B rec+rsionB an* lar0e (P% +sa0e.
2.9.< =esion Coun#
Hi0, ;ersion co+nts are +s+ally *+e to -+ltiple i*entical6sc,e-a *atabasesB +nsafe
bin* ;ariablesB or Oracle b+0s.

Vous aimerez peut-être aussi