Reading Statspack Report
Reading Statspack Report
PURPOSE
This article is a reference to understand the output generated by the STATSPACK utility. Since
performance tuning is a very broad area this document only provide tuning advice in very specific
areas.
Introduction
StatsPack was created in response to a need for more relevant and more extensive statistical
reporting beyond what was available via UTLBSTAT/UTLESTAT reports. Further, this information
can be stored permanently in the database instance itself so that historical data is always available
for comparison and diagnosis.
Statspack has been available since version 816, but can be installed on 806 and above. Snapshots
created using older versions of statspack can usually be read using newer versions of Statspack
although the newer features will not be available.
Timed_statistics must be set to true prior to the creation of a snapshot. If it is not, the data within
statspack will not be relevant. You can tell if timed_statistics was not set by looking at the total
times columns in the report. If these are zero then timed_statistics was not set.
Snapshots during which the instance was recycled will not contain accurate information and should
not be included in a statspack report.
In general, we suggest that snapshots intervals be 15 minutes in length. This allows fine-grained
reporting when hangs are suspected/detected. The snapshots can also be combined into hourly
reports for general performance tuning.
When a value is too large for the statspack field it will be represented by a series of pound signs
such as #######. Should this occur and you need to see the value in the field you will need to
decrease the number of snapshots in the report until the field can be read. Should there only be
one snapshot in the report, then you will need to decrease the snapshot interval.
Profiles created using statspack information are quite helpful in determining long-term trends such
as load increases, usage trends, resource consumption, latch activity, etc. It is especially
important that a DBA know these things and be able to demonstrate changes in them that
necessitate hardware improvements and load balancing policies. This document will describe the
main sections of an statspack report, which will help to understand what information is available to
diagnose and resolve performance tuning problems. Some of the sections of the statspack report
may contain different information based on the Statspack release that was used to generate the
report. This document will also indicate these changes for the different sections.
Summary Information
The summary information begins with the identification of the database on which the statspack
report was run along with the time interval of the statspack report. Here is the 8i instance
information:
The database name, id, instance name, instance number if OPS is being utilized, Oracle binary
release information, host name and snapshot information are provided.
Note that here the number of sessions during the snapshot was too large for the sessions field and
so the overflow symbol is displayed.
Snap Length
Start Id End Id Start Time End Time (Minutes)
-------- -------- -------------------- -------------------- -----------
454 455 07-Jan-03 05:28:20 07-Jan-03 06:07:53 39.55
Here is the 9i instance information. Note that the OPS column is now entitled 'Cluster' to
accommodate the newer Real Applications Cluster (RAC) terminology and that the Cursors/Session
and Comment columns have been added.
Every statspack report start with a section that describes the instance's workload profile and
instance metrics that may help to determine the instance efficiency.
- Instance cache information:
In the 8i report the buffer cache size can be determined by multiplying the db_block_buffers by the
db_block_size.
Cache Sizes
~~~~~~~~~~~
db_block_buffers: 6400 log_buffer: 104857600
db_block_size: 32768 shared_pool_size: 150000000
In 9i this has been done for you. Std Block size indicates the primary block size of the instance.
Cache Sizes (end)
~~~~~~~~~~~~~~~~~
Buffer Cache: 704M Std Block Size: 8K
Shared Pool Size: 256M Log Buffer: 1,024K
Note that the buffer cache size is that of the standard buffer cache. If you have multiple buffer
caches, you will need to calculate the others separately.
The load profile information is next; the load profile is measuring in bytes. It is identical in both 8i
and 9i.
Load Profile
~~~~~~~~~~~~ Per Second Per Transaction
--------------- ---------------
Redo size: 351,530.67 7,007.37
Logical reads: 5,449.81 108.64
Block changes: 1,042.0 8 20.77
Physical reads: 37.71 0.75
Physical writes: 134.68 2.68
User calls: 1,254.72 25.01
Parses: 4.92 0.10
Hard parses: 0.02 0.00
Sorts: 15.73 0.31
Logons: -0.01 0.00
Executes: 473.73 9.44
Transactions: 50.17
. Redo size: This is the amount of redo generated during this report.
. Logical Reads: This is calculated as Consistent Gets + DB Block Gets = Logical Reads
. Block changes: The number of blocks modified during the sample interval
. Physical Reads: The number of requests for a block that caused a physical I/O.
. Physical Writes: The number of physical writes issued.
. Hard Parses: Those parses requiring a completely new parse of the SQL statement. These
consume both latches and shared pool area.
. Soft Parses: Not listed but derived by subtracting the hard parses from parses. A soft parse
reuses a previous hard parse and hence consumes far fewer resources.
Hit ratios are calculations that may provide information regarding different structures and
operations in the Oracle instance. Database tuning never must be driven by hit ratios. They
only provide additional information to understand how the instance is operating. For
example, in a DSS systems a low cache hit ratio may be acceptable due the amount of recycling
needed due the large volume of data accesed. So if you increase the size of the buffer cache based
on this number, the corrective action may not take affect and you may be wasting memory
resources.
It is possible for both the 'buffer hit ratio' and the 'execute to parse' ratios to be negative. In the
case of the buffer hit ration, the buffer cache is too small and the data in is being aged out before it
can be used so it must be retrieved again. This is a form of thrashing which degrades performance
immensely.
The execute to parse ratio can be negative when the number of parses is larger than the number of
executions. The Execute to Parse ratio is determined by the following formula:
Another cause for a negative execute to parse ratio is if the shared pool is too small and queries
are aging out of the shared pool and need to be reparsed. This is another form of thrashing which
also degrades performance tremendously.
This section shows the Top 5 timed events that must be considered to focus the tuning efforts.
Before Oracle 9.2 this section was called "Top 5 Wait Events". It was renamed in Oracle 9.2 to "Top
5 Timed Events" to include the "CPU Time" based on the 'CPU used by this session'. This
information will allow you to determine SQL tuning problems.
For further see the Statspack readme file called $ORACLE_HOME/rdbms/admin/spdoc.txt. These
events are particularly useful in determining which sections to view next. For instance if there are
fairly high waits on latch free or one of the other latches you might want to examine the latch
sections first. On the other hand, if the db file read waits events seem abnormally high, you might
want to look at the file io section first.
Notice that in Oracle 9.2 references are made "Elapsed Time" rather than to "Wait Time". Also the
"CPU Time" is included as part of the Top events section.
Top 5 Timed Events
~~~~~~~~~~~~~~~~~~ % Total
Event Waits Time (s) Ela Time
-------------------------------------------- ------------ ----------- --------
log file sync 3,223,927 32,481 64.05
CPU time 7,121 14.04
global cache open x 517,153 3,130 6.17
log file parallel write 985,732 2,613 5.15
KJC: Wait for msg sends to complete 568,061 1,794 3.54
-------------------------------------------------------------
Note that db file scattered and sequential read are generally the top wait events when the instance
is tuned well and not OPS/RAC. Wait Events
Cluster Statistics
In Oracle 9i with the introduction of real Application Clusters, several sections were added to the
statspack report to show information related to cluster database environment. The following
sections are now available in statspack to monitor RAC environments and are only displayed when
a cluster is detected.
For further reference on tuning RAC clustered instances please refer to the documentation manual
called Oracle9i Real Application Clusters Deployment and Performance
The following section will describe in detail most of the sections provided in a statspack report.
- Foreground Wait Events:
Foreground wait events are those associated with a session or client process waiting for a resource.
The 8i version looks like this:
Wait Events for DB: PHS2 Instance: phs2 Snaps: 100 -104
-> cs - centisecond - 100th of a second
-> ms - millisecond - 1000th of a second
-> ordered by wait time desc, waits desc (idle events last)
Avg
Total Wait wait Waits
Event Waits Timeouts Time (cs) (ms) /txn
---------------------------- ------------ ---------- ----------- ------ ------
PX Deq: Execution Msg 15,287 6,927 1,457,570 953 694.9
enqueue 30,367 28,591 737,906 243 ######
direct path read 45,484 0 352,127 77 ######
PX Deq: Table Q Normal 7,185 811 241,532 336 326.6
PX Deq: Execute Reply 13,925 712 194,202 139 633.0
....
The 9.2 version is much the same but has different time intervals in the header.
Wait Events for DB: FUSION Instance: ecfsc2 Snaps: 161 -162
-> s - second
-> cs - centisecond - 100th of a second
-> ms - millisecond - 1000th of a second
-> us - microsecond - 1000000th of a second
-> ordered by wait time desc, waits desc (idle events last)
Avg
Total Wait wait Waits
Event Waits Timeouts Time (s) (ms) /txn
---------------------------- ------------ ---------- ---------- ------ --------
log file sync 3,223,927 1 32,481 10 1.0
global cache open x 517,153 777 3,130 6 0.2
log file parallel write 985,732 0 2,613 3 0.3
KJC: Wait for msg sends to c 568,061 34,529 1,794 3 0.2
Background wait events are those not associated with a client process. They indicate waits
encountered by system and non-system processes. The output is the same for all the Oracle
releases.
Background Wait Events for DB: PHS2 Instance: phs2 Snaps: 100 -104
-> ordered by wait time desc, waits desc (idle events last)
Avg
Total Wait wait Waits
Event Waits Timeouts Time (cs) (ms) /txn
---------------------------- ------------ ---------- ----------- ------ ------
latch free 88,578 32,522 18,341 2 ######
enqueue 319 230 5,932 186 14.5
row cache lock 4,941 0 2,307 5 224.6
control file parallel write 1,172 0 332 3 53.3
db file parallel write 176 0 67 4 8.0
log file parallel write 315 0 65 2 14.3
db file scattered read 137 0 62 5 6.2
LGWR wait for redo copy 66 10 47 7 3.0
Examples of background system processes are LGWR and DBWR. An example of a non-system
background process would be a parallel query slave.
Note that it is possible for a wait event to appear in both the foreground and background wait
events statistics. Examples of this are the enqueue and latch free events.
The idle wait events appear at the bottom of both sections and can generally safely be ignored.
Typically these type of events keep record of the time while the clien is connected to the database
but not requests are being made to the server.
- The idle wait events associated with pipes are often a major source of concern for some DBAs.
Pipe gets and waits are entirely application dependent. To tune these events you must tune the
application generating them. High pipe gets and waits can affect the library cache latch
performance. Rule out all other possible causes of library cache contention prior to focusing on
pipe waits as it is very expensive for the client to tune their application.A list of most wait events
used by the RDBMS kernel can be found in Appendix A of the Oracle Reference manual for the
version being used.
SQL Information
The SQL that is stored in the shared pool SQL area (Library cache) is reported to the user via three
different formats in 8i. Each has their own usefulness.
. SQL ordered by Buffer Gets
. SQL ordered by Physical Reads
. SQL ordered by Executions
SQL ordered by Gets for DB: PHS2 Instance: phs2 Snaps: 100 -104
-> End Buffer Gets Threshold: 10000
-> Note that resources reported for PL/SQL includes the resources used by
all SQL statements called within the PL/SQL code. As individual SQL
statements are also reported, it is possible and valid for the summed
total % to exceed 100
This section reports the contents of the SQL area ordered by the number of buffer gets and can be
used to identify CPU Heavy SQL.
- Many DBAs feel that if the data is already contained within the buffer cache the query should be
efficient. This could not be further from the truth. Retrieving more data than needed, even from
the buffer cache, requires CPU cycles and interprocess IO. Generally speaking, the cost of physical
IO is not 10,000 times more expensive. It actually is in the neighborhood of 67 times and actually
almost zero if the data is stored in the UNIX buffer cache.
- The statements of interest are those with a large number of gets per execution especially if the
number of executions is high.
SQL ordered by Reads for DB: PHS2 Instance: phs2 Snaps: 100 -104
-> End Disk Reads Threshold: 1000
Physical Reads Executions Reads per Exec % Total Hash Value
--------------- ------------ -------------- ------- ------------
98,401 16 6,150.1 14.2 3004232054
SELECT C0 C0 FROM (SELECT C0 C0 FROM (SELECT /*+ NO_EXPAND ROWID
(A1) */ A1."PID" C0 FROM "PHASE"."P0201F00_PLAT_MCOP_TB" PX_GRAN
ULE(0, BLOCK_RANGE, DYNAMIC) A1) UNION ALL SELECT C0 C0 FROM (S
ELECT /*+ NO_EXPAND ROWID(A2) */ A2."PID" C0 FROM "PHASE"."P0201
F00_UCS_MCOP_TB" PX_GRANULE(1, BLOCK_RANGE, DYNAMIC) A2) UNION
This section reports the contents of the SQL area ordered by the number of reads from the data
files and can be used to identify SQL causing IO bottlenecks which consume the following
resources.
- CPU time needed to fetch unnecessary data.
- Additional CPU time to process the query once the data is retrieved into the buffer.
SQL ordered by Executions for DB: PHS2 Instance: phs2 Snaps: 100 -104
-> End Executions Threshold: 100
This section reports the contents of the SQL area ordered by the number of query executions. It is
primarily useful in identifying the most frequently used SQL within the database so that they can
be monitored for efficiency. Generally speaking, a small performance increase on a frequently used
query provides greater gains than a moderate performance increase on an infrequently used query
SQL ordered by Parse Calls for DB: S901 Instance: S901 Snaps: 2 -3
-> End Parse Calls Threshold: 1000
% Total
Parse Calls Executions Parses Hash Value
------------ ------------ -------- ----------
295 295 0.48 1705880752
select file# from file$ where ts#=:1
60 60 0.10 3759542639
BEGIN DBMS_APPLICATION_INFO.SET_MODULE(:1,NULL); END;
....
This section shows the number of times a statement was parsed as compared to the number of
times it was executed. One to one parse/executions may indicate that:
- On RDBMS version 8172 and higher the init.ora parameter session_cached_cursors was not set in
the init.ora (100 is usually the suggested starting value). See enhancement bug 1589185 for an
explanation of the change that shifts some of the load from the library cache to the user session
cache.
- The shared pool may be too small and the parse is not being retained long enough for multiple
executions.
- cursor_sharing is set to exact (this should NOT be changed without considerable testing on the
part of the client).
Statistics
The statistics section shows the overall database statistics. These are the statistics that the
summary information is derived from. A list of the statistics maintained by the RDBMS kernel can
be found in Appendix C of the Oracle Reference manual for the version being utilized. The format
is identical from 8i to 9i.
Instance Activity Stats for DB: PHS2 Instance: phs2 Snaps: 100 -104
- CPU USED BY THIS SESSION, PARSE TIME CPU or RECURSIVE CPU USAGE: These numbers are
useful to diagnose CPU saturation on the system (usually a query tuning issue). The formula to
calculate the CPU usage breakdown is:
Service (CPU) Time = other CPU + parse time CPU
Other CPU = "CPU used by this session" - parse time CPU
Some releases do not correctly store this data and can show huge numbers. The rule to decide if
you can use these metrics is:
Trustworthy if :
(db version>= 8.1.7.2 and 9.0.1)
OR ((db version >= 9.0.1.1) = 8.0.6.0 AND not using job_queue_processes AND
CPU_PER_CALL = default)
- DBWR BUFFERS SCANNED: the number of buffers looked at when scanning the lru portion of the
buffer cache for dirty buffers to make clean. Divide by "dbwr lru scans" to find the average number
of buffers scanned. This count includes both dirty and clean buffers. The average buffers scanned
may be different from the average scan depth due to write batches filling up before a scan is
complete. Note that this includes scans for reasons other than make free buffer requests.
- DBWR CHECKPOINTS: the number of checkpoints messages that were sent to DBWR and not
necessarily the total number of actual checkpoints that took place. During a checkpoint there is a
slight decrease in performance since data blocks are being written to disk and that causes I/O. If
the number of checkpoints is reduced, the performance of normal database operations improve but
recovery after instance failure is slower.
- DBWR TIMEOUTS: the number of timeouts when DBWR had been idle since the last timeout.
These are the times that DBWR looked for buffers to idle write.
- DIRTY BUFFERS INSPECTED: the number of times a foreground encountered a dirty buffer which
had aged out through the lru queue, when foreground is looking for a buffer to reuse. This should
be zero if DBWR is keeping up with foregrounds.
- FREE BUFFER INSPECTED: the number of buffers skipped over from the end of the LRU queue in
order to find a free buffer. The difference between this and "dirty buffers inspected" is the number
of buffers that could not be used because they were busy or needed to be written after rapid aging
out. They may have a user, a waiter, or being read/written.
- RECURSIVE CALLS: Recursive calls occur because of cache misses and segment extension. In
general if recursive calls is greater than 30 per process, the data dictionary cache should be
optimized and segments should be rebuilt with storage clauses that have few large extents.
Segments include tables, indexes, rollback segment, and temporary segments.
NOTE: PL/SQL can generate extra recursive calls which may be unavoidable.
- REDO BUFFER ALLOCATION RETRIES: total number of retries necessary to allocate space in the
redo buffer. Retries are needed because either the redo writer has gotten behind, or because an
event (such as log switch) is occurring
- REDO LOG SPACE REQUESTS: indicates how many times a user process waited for space in the
redo log buffer. Try increasing the init.ora parameter LOG_BUFFER so that zero Redo Log Space
Requests are made.
- REDO WASTAGE: Number of bytes "wasted" because redo blocks needed to be written before
they are completely full. Early writing may be needed to commit transactions, to be able to write
a database buffer, or to switch logs
- SUMMED DIRTY QUEUE LENGTH: the sum of the lruw queue length after every write request
completes. (divide by write requests to get average queue length after write completion)
- TABLE FETCH BY ROWID: the number of rows that were accessed by a rowid. This includes rows
that were accessed using an index and rows that were accessed using the statement where rowid
= 'xxxxxxxx.xxxx.xxxx'.
- TABLE FETCH BY CONTINUED ROW: indicates the number of rows that are chained to another
block. In some cases (i.e. tables with long columns) this is unavoidable, but the ANALYZE table
command should be used to further investigate the chaining, and where possible, should be
eliminated by rebuilding the table.
- Table Scans (long tables) is the total number of full table scans performed on tables with more
than 5 database blocks. If the number of full table scans is high the application should be tuned to
effectively use Oracle indexes. Indexes, if they exist, should be used on long tables if less than 10-
20% (depending on parameter settings and CPU count) of the rows from the table are returned. If
this is not the case, check the db_file_multiblock_read_count parameter setting. It may be too
high. You may also need to tweak optimizer_index_caching and optimizer_index_cost_adj.
- Table Scans (short tables) is the number of full table scans performed on tables with less than 5
database blocks. It is optimal to perform full table scans on short tables rather than using indexes.
IO Activity
IO ActivityInput/Output (IO) statistics for the instance are listed in the following sections/formats:
- Tablespace IO Stats for DB: Ordered by total IO per tablespace.
- File IO Stats for DB: Ordered alphabetically by tablespace, filename.
- Tablespace IO Stats
Tablespace IO Stats for DB: PHS2 Instance: phs2 Snaps: 100 -104
->ordered by IOs (Reads + Writes) desc
Tablespace
------------------------------
Av Av Av Av Buffer Av Buf
Reads Reads/s Rd(ms) Blks/Rd Writes Writes/s Waits Wt(ms)
-------------- ------- ------ ------- ------------ -------- ---------- ------
PHASE_WORK_TS
138,361 38 0.0 3.9 6,859 2 0 0.0
OFFER_HISTORY_TS
24,714 7 0.0 4.0 0 0 0 0.0
ATTR1_TS
7,823 2 0.0 4.0 0 0 0 0.0
TEMP
886 0 0.0 20.1 1,147 0 0 0.0
SYSTEM
184 0 3.9 2.8 56 0 18 3.3
- File IO Stats
File IO Stats for DB: PHS2 Instance: phs2 Snaps: 100 -104
->ordered by Tablespace, File
Tablespace Filename
------------------------ ----------------------------------------------------
Av Av Av Av Buffer Av Buf
Reads Reads/s Rd(ms) Blks/Rd Writes Writes/s Waits Wt(ms)
-------------- ------- ------ ------- ------------ -------- ---------- ------
ATTR1_TS /oradata/phs2/hsz16/attr1_01.dbf
398 0 0.0 3.9 0 0 0
/oradata/phs2/hsz17/attr1_02.dbf
400 0 0.0 4.0 0 0 0
/oradata/phs2/hsz18/attr1_03.dbf
398 0 0.0 4.0 0 0 0
/oradata/phs2/hsz19/attr1_04.dbf
480 0 0.0 4.0 0 0 0
....
Note that Oracle considers average read times of greater than 20 ms unacceptable. If a datafile
consistently has average read times of 20 ms or greater then:
- The queries against the contents of the owning tablespace should be examined and tuned so that
less data is retrieved.
- If the tablespace contains indexes, another option is to compress the indexes so that they require
less space and hence, less IO.
- The contents of that datafile should be redistributed across several disks/logical volumes to more
easily accommodate the load.
- If the disk layout seems optimal, check the disk controller layout. It may be that the datafiles
need to be distributed across more disk sets.
This section can have multiple entries if multiple buffer pools are allocated. This section is in both 8i
and 9i and is identical in both.
Buffer Pool Statistics for DB: PHS2 Instance: phs2 Snaps: 100 -104
-> Pools D: default pool, K: keep pool, R: recycle pool
A baseline of the database's buffer pool statistics should be available to compare with the current
statspack buffer pool statistics. A change in that pattern unaccounted for by a change in workload
should be a cause for concern.
This section shows a breakdown of each type of object waited for. This section follows the Instance
Recovery Stats for DB in 9i and is identical to that in 8i.
Buffer wait Statistics for DB: PHS2 Instance: phs2 Snaps: 100 -104
-> ordered by wait time desc, waits desc
The above shows no real contention. Typically, when there is buffer contention, it is due to data
block contention with large average wait times, like the example below:
Buffer wait Statistics for DB: GLOVP Instance: glovp Snaps: 454 - 455
This section was added in 9i and is useful for monitoring the recovery and redo information.
This section was added in 9i and which helps when using the new model to allocate PGA in Oracle9i
using PGA_AGGREGATE_TARGET.
PGA Memory Stats for DB: S901 Instance: S901 Snaps: 2 -3
-> WorkArea (W/A) memory is used for: sort, bitmap merge, and hash join ops
This section is particularly useful when monitoring session memory usage on Windows servers.
Enqueue Activity
An enqueue is simply a locking mechanism. This section is very useful and must be used when the
wait event "enqueue" is listed in the "Top 5 timed events".
Enqueue activity for DB: PHS2 Instance: phs2 Snaps: 100 -104
-> ordered by waits desc, gets desc
Avg Wt Wait
Eq Requests Succ Gets Failed Gets Waits Time (ms) Time (s)
-- ------------ ------------ ----------- ----------- ----------- ------------
HW 656 656 0 139 2.04 0
The action to take depends on the lock type that is causing the most problems. The most common
lock waits are generally for:
- ST - Space management enqueue: Usually caused by too much space management occurring. For
example: create table as select on large tables on busy instances, small extent sizes, lots of
sorting, etc.
Undo (Rollback) information is provided in two sections. They are identical in both 8i and 9i and
are self explanatory.
In 9i the following two sections are added to provide similar information on the System Managed
Undo (SMU) tablespace. Both are self explanatory.
The examples below show typical performance problem related to Undo (rollback) segments:
Rollback Segment Stats for DB: PHS2 Instance: phs2 Snaps: 100 -104
->A high value for "Pct Waits" suggests more rollback segments may be required
Rollback Segment Storage for DB: PHS2 Instance: phs2 Snaps: 100 -104
->Optimal Size should be larger than Avg Active
In this instance optimal is set and we can see an overflow for average active for RBS 1 and
that RBS 9 was also larger than optimal. If this is a consistent problem it may be that the
optimal value should be raised.
Use of UNDO_RETENTION can potentially increase the size of the undo segment for a given
period of time, so the retention period should not be arbitrarily set too high. The UNDO
tablespace still must be sized appropriately. The following calculation can be used to
determine how much space a given undo segment will consume given a set value of
UNDO_RETENTION.
Undo Segment Space Required = (300 seconds * 50 blocks/ seconds * 8K/block) = 120 M
The retention information (transaction commit time) is stored in every transaction table
block and each extent map block. When the retention period has expired, SMON will be
signaled to perform undo reclaims, done by scanning each transaction table for undo
timestamps and deleting the information from the undo segment extent map. Only during
extreme space constraint issues will retention period not be obeyed.
Latch Information
. Latch Activity
. Latch Sleep breakdown
. Latch Miss Sources
This information should be checked whenever the "latch free" wait event or other latch wait events
experience long waits.
- Latch Activity
Latch Activity for DB: PHS2 Instance: phs2 Snaps: 100 -104
->"Get Requests", "Pct Get Miss" and "Avg Slps/Miss" are statistics for
willing-to-wait latch get requests
->"NoWait Requests", "Pct NoWait Miss" are for no-wait latch get requests
->"Pct Misses" for both should be very close to 0.0
Latch contention is indicated by a Pct Miss of greater than 1.0% or a relatively high value in Avg
Sleeps/Miss.
While each latch can indicate contention on some resource, the more common latches to watch
are:
- cache buffer chains: Contention on this latch confirms a hot block issue. See Note 62172.1
'Understanding and Tuning Buffer Cache and DBWR in Oracle7, Oracle8, and Oracle8i' for a
discussion of this phenomenon.
- shared pool: Contention on this latch in conjunction with reloads in the SQL Area of the library
cache section indicates that the shared pool is too small. Contention on this latch indicates that
one of the following is happening:
. The library cache, and hence, the shared pool is too small.
. Literal SQL is being used. See Note 62143.1 'Understanding and Tuning the Shared Pool for an
excellent discussion of this topic.
. On versions 8.1.7.2 and higher, session_cached_cursors might need to be set. See enhancement
bug 1589185 for details.
See Note 62143.1 Understanding and Tuning the Shared Pool in Oracle7, Oracle8, and Oracle8i for
a good discussion on literal SQL and its impact on the shared pool and library cache.
Latch Sleep breakdown for DB: PHS2 Instance: phs2 Snaps: 100 -104
-> ordered by misses desc
This section provides additional supporting information to the previous section. It is identical in 8i
and 9i.
Latch Miss Sources for DB: PHS2 Instance: phs2 Snaps: 100 -104
-> only latches with sleeps are shown
-> ordered by name, sleeps desc
NoWait Waiter
Latch Name Where Misses Sleeps Sleeps
------------------------ -------------------------- ------- ---------- -------
batching SCNs kcsl01 0 1 1
cache buffers chains kcbgtcr: kslbegin 0 114 39
cache buffers chains kcbgcur: kslbegin 0 62 62
cache buffers chains kcbrls: kslbegin 0 29 104
cache buffers chains kcbchg: kslbegin: bufs not 0 1 1
dlm group lock table lat kjgalk: move a lock from p 0 1 0
dlm lock table freelist kjlalc: lock allocation 0 10 6
dlm lock table freelist kjgdlk: move lock to paren 0 1 2
dlm lock table freelist kjlfr: remove lock from pa 0 1 3
dlm resource hash list kjucvl: open cr lock reque 0 36,732 562
dlm resource hash list kjxcvr: handle convert req 0 29,189 39,519
dlm resource hash list kjskchcv: convert on shado 0 3,907 25
dlm resource hash list kjrrmas1: lookup master no 0 1,603 18
dlm resource hash list kjcvscn: remove from scan 0 383 0
dlm resource hash list kjrlck: lock resource 0 26 1,965
This section provides a detailed breakdown of which latches are missing and sleeping. It is
particularly useful in identifying library cache bugs as it provides latch child information not
available in the previous two sections.
Search on the latch child name experiencing high misses or sleeps and you can often find the bug
responsible.
It is identical in 8i and 9i.
This is an interesting section to monitor but about which you can do very little as the only way to
change the size of the dictionary cache is to change the shared pool size as the dictionary cache is
a percentage of the shared pool. It is identical in 8i and 9i.
Dictionary Cache Stats for DB: PHS2 Instance: phs2 Snaps: 100 -104
->"Pct Misses" should be very low (< 2% in most cases)
->"Cache Usage" is the number of cache entries being used
->"Pct SGA" is the ratio of usage to allocated size for that cache
This section of the report shows information about the different sub-areas activity in the library
cache.
Library Cache Activity for DB: PHS2 Instance: phs2 Snaps: 100 -104
->"Pct Misses" should be very low
Values in Pct Misses or Reloads in the SQL Area, Tables/Procedures or Trigger rows indicate that
the shared pool may be too small. To confirm this, consistent values (not sporadic) in Pct Misses or
Reloads in the Index row indicate that the buffer cache is too small. (No longer available in 9i.)
Values in Invalidations in the SQL Area indicate that a table definition changed while a query was
being run against it or a PL/SQL package being used was recompiled.
This section provides a breakdown of how the SGA memory is used at the time of the report. It is
useful to be able to track this over time. This section is identical in 8i and 9i.
This section shows a detailed breakdown of memory usage by the SGA at the beginning and ending
of the reporting period. It allows the DBA to track memory usage throughout the business cycle.
It is identical in 8i and 9i.
SGA breakdown difference for DB: PHS2 Instance: phs2 Snaps: 100 -104
The final section shows the current init.ora parameter settings. It displays those that are more
commonly used including some hidden. It is identical in 8i and 9i.
init.ora Parameters for DB: PHS2 Instance: phs2 Snaps: 100 -104
End value
Parameter Name Begin value (if different)
----------------------------- --------------------------------- --------------
_PX_use_large_pool TRUE
always_anti_join HASH
audit_trail TRUE
background_dump_dest /u01/app/oracle/admin/phs2/bdump
bitmap_merge_area_size 10485760
compatible 8.1.7
control_files /oradata/phs2/hsz16/control_01.db
core_dump_dest /u01/app/oracle/admin/phs2/cdump
cursor_space_for_time TRUE
....