Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Re: Report.Txt - Suggestions Welcome
From: "andrew_webby at hotmail" <spam_at_no.thanks.com>
Mick
Any chance of posting this as a .txt attachment as the formatting is
all to
pot. Also, when doing this, stick "CRIT: whatever" in the subject
line to
help those who aren't interested to skip it...
"Mick Rice" <mickrice_at_techie.com> wrote in message
news:645b6e08.0107120047.6a2141ed_at_posting.google.com...
> A few posters have provided a sample of their utlbstat/utlestat
output
> for review and observations. I've done the same below and would
> welcome comments. I've been trying to tune this database for a
while
> and it seems to run fairly well but would welcome any suggestions
as
> to where I copuld improve performance,
>
> Thanks In Advance,
>
> Mick.
>
> SVRMGR> set charwidth 12
> Charwidth 12
> SVRMGR> set numwidth 10
> Numwidth 10
> SVRMGR>
> SVRMGR> select (1 - (sum(decode(name, 'physical reads', value, 0))
/
> 2> (sum(decode(name, 'db block gets', value, 0)) +
> 3> sum(decode(name, 'consistent gets', value, 0))))) *
> 100 "Data Hit Ratio"
> 4> from v$sysstat;
> Data Hit R
> ----------
> 97.1780017
> 1 row selected.
> SVRMGR>
> SVRMGR> Rem Select Library cache statistics. The pin hit rate
shoule
> be high.
> SVRMGR> select namespace library,
> 2> gets,
> 3>
round(decode(gethits,0,1,gethits)/decode(gets,0,1,gets),3)
> 4> gethitratio,
> 5> pins,
> 6>
round(decode(pinhits,0,1,pinhits)/decode(pins,0,1,pins),3)
> 7> pinhitratio,
> 8> reloads, invalidations
> 9> from stats$lib;
> LIBRARY GETS GETHITRATI PINS PINHITRATI RELOADS
> INVALIDATI
> ------------ ---------- ---------- ---------- ---------- ----------
> ----------
> BODY 535 1 535 1 0
> 0
> CLUSTER 0 1 0 1 0
> 0
> INDEX 0 1 0 1 0
> 0
> OBJECT 0 1 0 1 0
> 0
> PIPE 0 1 0 1 0
> 0
> SQL AREA 798585 .897 2578962 .935 2126
> 299
> TABLE/PROCED 603441 .961 1763784 .994 3199
> 0
> TRIGGER 28016 1 28016 1 0
> 0
> 8 rows selected.
> SVRMGR>
> SVRMGR> set charwidth 27;
> Charwidth 27
> SVRMGR> set numwidth 12;
> Numwidth 12
> SVRMGR> Rem The total is the total value of the statistic between
the
> time
> SVRMGR> Rem bstat was run and the time estat was run. Note that
the
> estat
> SVRMGR> Rem script logs on as "internal" so the per_logon
statistics
> will
> SVRMGR> Rem always be based on at least one logon.
> SVRMGR> select n1.name "Statistic",
> 2> n1.change "Total",
> 3> round(n1.change/trans.change,2) "Per Transaction",
> 4> round(n1.change/logs.change,2) "Per Logon",
> 5> round(n1.change/(to_number(to_char(end_time,
> 'J'))*60*60*24 -
> 6> to_number(to_char(start_time,
> 'J'))*60*60*24 +
> 7> to_number(to_char(end_time,
> 'SSSSS')) -
> 8> to_number(to_char(start_time,
> 'SSSSS')))
> 9> , 2) "Per Second"
> 10> from stats$stats n1, stats$stats trans, stats$stats
logs,
> stats$dates
> 11> where trans.name='user commits'
> 12> and logs.name='logons cumulative'
> 13> and n1.change != 0
> 14> order by n1.name;
> Statistic Total Per Transact Per Logon
Per
> Second
> --------------------------- ------------ ------------ ------------
> ------------
> CPU used by this session 1732569 37.36 1522.47
> 43.76
> CPU used when call started 1732584 37.37 1522.48
> 43.76
> CR blocks created 1439 .03 1.26
> .04
> DBWR buffers scanned 3284166 70.83 2885.91
> 82.94
> DBWR checkpoints 85533 1.84 75.16
> 2.16
> DBWR free buffers found 1173778 25.31 1031.44
> 29.64
> DBWR lru scans 14573 .31 12.81
> .37
> DBWR make free requests 8157 .18 7.17
> .21
> DBWR summed scan depth 4463549 96.26 3922.28
> 112.72
> DBWR timeouts 9444 .2 8.3
> .24
> SQL*Net roundtrips to/from 866177 18.68 761.14
> 21.87
> background checkpoints comp 48 0 .04
> 0
> background checkpoints star 48 0 .04
> 0
> background timeouts 38545 .83 33.87
> .97
> bytes received via SQL*Net 400852814 8644.84 352243.25
> 10123.31
> bytes sent via SQL*Net to c 272527521 5877.36 239479.37
> 6882.53
> calls to get snapshot scn: 883001 19.04 775.92
> 22.3
> calls to kcmgas 49958 1.08 43.9
> 1.26
> calls to kcmgcs 3762 .08 3.31
> .1
> calls to kcmgrs 1166153 25.15 1024.74
> 29.45
> change write time 1053 .02 .93
> .03
> cleanouts and rollbacks - c 313 .01 .28
> .01
> cleanouts only - consistent 700 .02 .62
> .02
> cluster key scan block gets 92950 2 81.68
> 2.35
> cluster key scans 42819 .92 37.63
> 1.08
> commit cleanout failures: b 4 0 0
> 0
> commit cleanout number succ 413446 8.92 363.31
> 10.44
> consistent changes 1619 .03 1.42
> .04
> consistent gets 235448312 5077.71 206896.58
> 5946.11
> cursor authentications 781404 16.85 686.65
> 19.73
> data blocks consistent read 1617 .03 1.42
> .04
> db block changes 1145794 24.71 1006.85
> 28.94
> db block gets 8201187 176.87 7206.67
> 207.12
> deferred (CURRENT) block cl 71569 1.54 62.89
> 1.81
> enqueue releases 375389 8.1 329.87
> 9.48
> enqueue requests 375554 8.1 330.01
> 9.48
> enqueue timeouts 171 0 .15
> 0
> enqueue waits 20415 .44 17.94
> .52
> execute count 873493 18.84 767.57
> 22.06
> free buffer inspected 262884 5.67 231.01
> 6.64
> free buffer requested 8807008 189.93 7739.02
> 222.42
> immediate (CR) block cleano 1013 .02 .89
> .03
> immediate (CURRENT) block c 137639 2.97 120.95
> 3.48
> logons cumulative 1138 .02 1
> .03
> logons current -9 0 -.01
> 0
> messages received 148202 3.2 130.23
> 3.74
> messages sent 148202 3.2 130.23
> 3.74
> no work - consistent read g 230489653 4970.77 202539.24
> 5820.89
> opened cursors cumulative 133274 2.87 117.11
> 3.37
> opened cursors current -27 0 -.02
> 0
> parse count 869429 18.75 764
> 21.96
> parse time cpu 65116 1.4 57.22
> 1.64
> parse time elapsed 69990 1.51 61.5
> 1.77
> physical reads 6237461 134.52 5481.07
> 157.52
> physical writes 468462 10.1 411.65
> 11.83
> process last non-idle time 409586845227 8833204.19 359918141.68
> 10343885.78
> recursive calls 1289703 27.81 1133.31
> 32.57
> recursive cpu usage 28555 .62 25.09
> .72
> redo blocks written 311853 6.73 274.04
> 7.88
> redo buffer allocation retr 8 0 .01
> 0
> redo entries 641061 13.83 563.32
> 16.19
> redo log space requests 12 0 .01
> 0
> redo log space wait time 354 .01 .31
> .01
> redo size 140429465 3028.52 123400.23
> 3546.47
> redo small copies 193391 4.17 169.94
> 4.88
> redo synch time 109026 2.35 95.8
> 2.75
> redo synch writes 48787 1.05 42.87
> 1.23
> redo wastage 13784697 297.28 12113.09
> 348.12
> redo write time 92147 1.99 80.97
> 2.33
> redo writer latching time 40 0 .04
> 0
> redo writes 49190 1.06 43.22
> 1.24
> rollback changes - undo rec 258 .01 .23
> .01
> rollbacks only - consistent 1123 .02 .99
> .03
> session connect time 409586845227 8833204.19 359918141.68
> 10343885.78
> session logical reads 241889847 5216.63 212556.98
> 6108.79
> session pga memory 420348336 9065.29 369374.64
> 10615.66
> session pga memory max 543493572 11721.05 477586.62
> 13725.62
> session uga memory 3689620 79.57 3242.2
> 93.18
> session uga memory max 141370108 3048.81 124226.81
> 3570.22
> sorts (disk) 1709 .04 1.5
> .04
> sorts (memory) 40083 .86 35.22
> 1.01
> sorts (rows) 535322217 11544.83 470406.17
> 13519.26
> summed dirty queue length 312200 6.73 274.34
> 7.88
> table fetch by rowid 214148680 4618.36 188179.86
> 5408.2
> table fetch continued row 107114 2.31 94.12
> 2.71
> table scan blocks gotten 14595982 314.78 12825.99
> 368.61
> table scan rows gotten 1027277337 22154.4 902704.16
> 25943.31
> table scans (long tables) 2736 .06 2.4
> .07
> table scans (short tables) 162619 3.51 142.9
> 4.11
> total number commit cleanou 414298 8.93 364.06
> 10.46
> transaction rollbacks 14 0 .01
> 0
> user calls 843465 18.19 741.18
> 21.3
> user commits 46369 1 40.75
> 1.17
> user rollbacks 20 0 .02
> 0
> write requests 19655 .42 17.27
> .5
> 95 rows selected.
> SVRMGR>
> SVRMGR>
> SVRMGR> set numwidth 27
> Numwidth 27
> SVRMGR> Rem Average length of the dirty buffer write queue. If
this
> is larger
> SVRMGR> Rem than the value of:
> SVRMGR> Rem 1. (db_files * db_file_simultaneous_writes)/2
> SVRMGR> Rem or
> SVRMGR> Rem 2. 1/4 of db_block_buffers
> SVRMGR> Rem which ever is smaller and also there is a platform
> specific limit
> SVRMGR> Rem on the write batch size (normally 1024 or 2048
buffers).
> If the average
> SVRMGR> Rem length of the dirty buffer write queue is larger than
the
> value
> SVRMGR> Rem calculated before, increase db_file_simultaneous_writes
or
> db_files.
> SVRMGR> Rem Also check for disks that are doing many more IOs than
> other disks.
> SVRMGR> select queue.change/writes.change "Average Write Queue
Length"
> 2> from stats$stats queue, stats$stats writes
> 3> where queue.name = 'summed dirty queue length'
> 4> and writes.name = 'write requests';
> Average Write Queue Length
> ---------------------------
> 15.883998982447214449249555
> 1 row selected.
> SVRMGR>
> SVRMGR>
> SVRMGR> set charwidth 32;
> Charwidth 32
> SVRMGR> set numwidth 13;
> Numwidth 13
> SVRMGR> Rem System wide wait events for non-background processes
> (PMON,
> SVRMGR> Rem SMON, etc). Times are in hundreths of seconds. Each
one
> of
> SVRMGR> Rem these is a context switch which costs CPU time. By
> looking at
> SVRMGR> Rem the Total Time you can often determine what is the
> bottleneck
> SVRMGR> Rem that processes are waiting for. This shows the total
time
> spent
> SVRMGR> Rem waiting for a specific event and the average time per
wait
> on
> SVRMGR> Rem that event.
> SVRMGR> select n1.event "Event Name",
> 2> n1.event_count "Count",
> 3> n1.time_waited "Total Time",
> 4> round(n1.time_waited/n1.event_count, 2) "Avg Time"
> 5> from stats$event n1
> 6> where n1.event_count > 0
> 7> order by n1.time_waited desc;
> Event Name Count Total Time Avg
Time
> -------------------------------- ------------- -------------
> -------------
> SQL*Net message from client 869550 625909468
> 719.81
> rdbms ipc reply 85490 599101
> 7.01
> enqueue 20423 240059
> 11.75
> free buffer waits 21546 190568
> 8.84
> log file sync 49065 108988
> 2.22
> db file sequential read 908831 43825
> .05
> SQL*Net more data from client 21351 40465
> 1.9
> db file scattered read 1216719 28796
> .02
> latch free 16444 5525
> .34
> write complete waits 57 644
> 11.3
> SQL*Net more data to client 58096 546
> .01
> SQL*Net message to client 869541 473
> 0
> log file switch completion 12 353
> 29.42
> buffer busy waits 42 318
> 7.57
> direct access I/O 22 44
> 2
> SQL*Net break/reset to client 40 15
> .38
> control file sequential read 975 8
> .01
> 17 rows selected.
> SVRMGR>
> SVRMGR>
> SVRMGR> Rem System wide wait events for background processes (PMON,
> SMON, etc)
> SVRMGR> select n1.event "Event Name",
> 2> n1.event_count "Count",
> 3> n1.time_waited "Total Time",
> 4> round(n1.time_waited/n1.event_count, 2) "Avg Time"
> 5> from stats$bck_event n1
> 6> where n1.event_count > 0
> 7> order by n1.time_waited desc;
> Event Name Count Total Time Avg
Time
> -------------------------------- ------------- -------------
> -------------
> rdbms ipc message 166568 14889820
> 89.39
> smon timer 243 3962153
> 16305.16
> pmon timer 13161 3959843
> 300.88
> db file parallel write 19655 366604
> 18.65
> log file parallel write 49190 92124
> 1.87
> timer in sksawat 2135 4282
> 2.01
> control file parallel write 1579 1647
> 1.04
> db file single write 1056 1009
> .96
> latch free 223 511
> 2.29
> db file sequential read 1135 402
> .35
> log file sync 39 219
> 5.62
> free buffer waits 7 145
> 20.71
> control file sequential read 1094 79
> .07
> log file single write 24 39
> 1.63
> rdbms ipc reply 6 33
> 5.5
> db file scattered read 66 27
> .41
> buffer busy waits 16 18
> 1.13
> log file sequential read 12 10
> .83
> 18 rows selected.
> SVRMGR>
> SVRMGR>
> SVRMGR> set charwidth 18;
> Charwidth 18
> SVRMGR> set numwidth 11;
> Numwidth 11
> SVRMGR> Rem Latch statistics. Latch contention will show up as a
large
> value for
> SVRMGR> Rem the 'latch free' event in the wait events above.
> SVRMGR> Rem Sleeps should be low. The hit_ratio should be high.
> SVRMGR> select name latch_name, gets, misses,
> 2> round((gets-misses)/decode(gets,0,1,gets),3)
> 3> hit_ratio,
> 4> sleeps,
> 5> round(sleeps/decode(misses,0,1,misses),3) "SLEEPS/MISS"
> 6> from stats$latches
> 7> where gets != 0
> 8> order by name;
> LATCH_NAME GETS MISSES HIT_RATIO SLEEPS
> SLEEPS/MISS
> ------------------ ----------- ----------- ----------- -----------
> -----------
> archive control 6 0 1 0
> 0
> cache buffer handl 974 0 1 0
> 0
> cache buffers chai 1882904849 8118 1 177
> .022
> cache buffers lru 2278790 2679 .999 154
> .057
> dml lock allocatio 252975 1 1 0
> 0
> enqueue hash chain 771404 646 .999 6
> .009
> enqueues 988110 28 1 0
> 0
> ktm global data 585 0 1 0
> 0
> latch wait list 28270 10 1 0
> 0
> library cache 22496393 16349 .999 1360
> .083
> library cache load 19398 0 1 0
> 0
> list of block allo 111387 0 1 0
> 0
> messages 833327 6739 .992 17
> .003
> modify parameter v 1138 0 1 0
> 0
> multiblock read ob 4014630 401 1 2
> .005
> process allocation 1057 0 1 0
> 0
> redo allocation 863642 390 1 7
> .018
> redo copy 2 2 0 1
> .5
> row cache objects 20894740 14959 .999 2156
> .144
> sequence cache 145247 4 1 0
> 0
> session allocation 108129 3 1 0
> 0
> session idle bit 1738615 5 1 0
> 0
> session switching 632 0 1 0
> 0
> shared pool 3194243 14049 .996 12787
> .91
> sort extent pool 92568 0 1 0
> 0
> system commit numb 2695683 150 1 0
> 0
> transaction alloca 150388 1 1 0
> 0
> undo global data 166721 5 1 0
> 0
> user lock 4242 0 1 0
> 0
> 29 rows selected.
> SVRMGR>
> SVRMGR> set numwidth 16
> Numwidth 16
> SVRMGR> Rem Statistics on no_wait gets of latches. A no_wait get
does
> not
> SVRMGR> Rem wait for the latch to become free, it immediately times
> out.
> SVRMGR> select name latch_name,
> 2> immed_gets nowait_gets,
> 3> immed_miss nowait_misses,
> 4> round((immed_gets/immed_gets+immed_miss), 3)
> 5> nowait_hit_ratio
> 6> from stats$latches
> 7> where immed_gets + immed_miss != 0
> 8> order by name;
> LATCH_NAME NOWAIT_GETS NOWAIT_MISSES
NOWAIT_HIT_RATIO
> ------------------ ---------------- ----------------