Professional Documents
Culture Documents
Healthcheck Detect Diagnose Resolve
Healthcheck Detect Diagnose Resolve
Healthcheck Detect Diagnose Resolve
Table of Contents
Table of Contents
Section One: About Quest Software
Quest Software, the leader in application management, gives you confidence in your critical
application infrastructures. This confidence is delivered in the form of reliable software
products that help you develop, deploy, manage and maintain enterprise applications
without expensive downtime or business interruption. We equip IT professionals with
software tools that are easy to use and embedded with the knowledge of our world-
renowned technical experts to automate daily tasks and simplify complex ones. As a result,
your IT organization will be able to proactively prevent performance problems and
downtime, as well as react quickly to the unforeseen—making them more productive,
capable and confident. The bottom line is a lower total cost of ownership for your application
infrastructure.
Quest Software will help you reduce costly planned and unplanned downtime, get better
performance from existing infrastructures (without throwing money at expensive hardware
upgrades), and equip your staff to do more with less. No other software provider offers a
more comprehensive approach to application management.
Oracle Health Check
Tuning Methodology: Detect, Diagnose, Resolve
Detect
Foglight provides 24x7 unattended monitoring for complex Oracle database environments.
With Foglight, administrators can proactively identify potential database bottlenecks before
they affect database and application performance, ensuring optimal performance and
availability for users. Foglight is designed to provide proactive notifications of impending or
actual problems and historical information. The true power behind a monitoring solution is
to provide you with notifications of impending problems or performance issues along with
notification of current issues.
Foglight also allows administrators to investigate deeper into the database. With the Oracle
Instance Overview screen, you can quickly see the percentage of CPU, cache hits and I/Os
as well as the number of Oracle sessions (user logons) for the database instance over the
specified period of time. You can investigate:
• Wait Statistics
• Tablespace Usage
• Ensure connectivity to Oracle
• Lock Contention
• Extent Failure
• Alert Logs
• Redo Logs
Diagnose
Foglight’s powerful integrated diagnostic capabilities allow administrators to drill down using
Quest Central’s Performance Diagnostics Solution, Spotlight®, in near-real time. With this
combination, you can quickly identify the performance issue and provide expert advice to
resolve it.
Resolve
Quest Central’s Database Administration, SQL Tuning and Space Management components
provide deep functionality for resolving issues that Foglight and Spotlight detect and
diagnose. Covering virtually every issue DBAs face, these modules will increase your
productivity while improving system performance.
Oracle Health Check
Foglight Overview
Foglight Overview
Foglight is a unique solution that monitors every component affecting application
performance—end user, Web server, application, operating system, database, disk and
network—alerting system administrators to quickly identify actual or potential application
problems and correct these performance issues before end users are affected.
In order to effectively manage your application infrastructure, you need to collect vital
application information and correlate it across the complex IT infrastructure. Unlike
traditional monitoring solutions, Foglight is designed to be rapidly deployed to provide you
with maximum return on investment. Foglight is the only solution designed to empower you
with all the information you need to monitor your application architecture in one easy-to-
use product.
Event Notification
The true power and value behind a monitoring solution is the ability to be notified of
impending problems before they affect your business and your end users. Foglight provides
proactive alerts with pre-configured best practice notifications to aid in deployment. It also
provides you with the ability to define your own rules without learning complex proprietary
languages—allowing you to set performance thresholds and maintain service levels.
Foglight also has the power to do cross-host event correlation, allowing you to define
specific events related to your business processes. For example, an administrator can define
the CPU utilization of three Web servers as a single event. If all three servers are utilized by
more than 80%, Foglight will send a single notification. Events can also be defined based on
your specific business applications.
Powerful Reporting
Foglight has hundreds of pre-defined, built-in reports based on all the graphical views.
Foglight’s integrated reporting wizard will allow the user to create custom reports from any
metric that is collected and stored in the data repository.
With Foglight, users can generate reports showing utilization or service levels based on
system, database, Web, network and application metrics over user-specified time ranges.
Its versatile report schedule allows users to easily define and schedule simple and complex
reports for viewing and distribution through e-mail or the Web-based interface.
For more information about Foglight, contact your Quest Sales Representative today.
Oracle Health Check
Overview of Quest Central for Oracle
Long known as the leader in Oracle database management tools, Quest Software has
brought its industry-leading solutions into a single, comprehensive solution: Quest Central
for Oracle. Popular products such as Spotlight on Oracle, SQLab Vision™, and Space
Manager™ have been integrated with powerful new capabilities including database
administration and database analysis to create the tool that DBAs can use all day. This
product has been designed with the DBA in mind by addressing your most pressing
requirements.
Quest Central enables you to centralize everything you need to do on a daily basis—across
all your databases—to become more effective, improve your system’s performance, and
increase availability.
Oracle Health Check
Components of Quest Central for Oracle
Spotlight on Oracle, the industry’s best-known graphical diagnostics tool, improves staff
efficiency for troubleshooting, speeds time to resolution, and reduces end-user downtime by
proactively discovering performance issues in real time. Spotlight on Oracle:
With Quest Central’s Database Analysis feature, it’s easy to analyze a variety of metrics
within your Oracle instance for an accurate picture of overall database health. Quest
Central’s performance analysis displays recommendations and provides advice to solve your
tuning issues. Database analysis:
• Analyzes the database and provides explicit tuning advice
• Provides historical reports, both online and in HTML, showing detailed user activity
and more
• Continues the workflow from diagnosis to resolution with embedded integration to
other components within Quest Central including SQL Tuning, Database
Administration and Space Management
The database analysis function of Quest Central is like an in-house Oracle tuning expert.
Whenever there is doubt about the performance of your Oracle database, ask your tuning
expert—Quest Central—to evaluate what to tune and how to tune it for the biggest
improvement.
Oracle Health Check
Components of Quest Central for Oracle
Quest Central's SQL Tuning solution features Quest’s renowned non-intrusive, agent based
collection technology to collect SQL statements and performance indicators from Oracle
databases and host operating systems at sub-second intervals. This solution collects data
non-intrusively, with no added overhead on the target database and minimal overhead on
the host system. StealthCollect runs 24x7, enabling you to identify and resolve problems in
the past and collect performance information automatically, requiring no management time
or active maintenance. The SQL Tuning Component:
Quest Central for Oracle integrates Quest Software’s industry-leading Oracle tools that have
been successfully used for years. SQLab Vision is now fully integrated into this revolutionary
suite, simplifying the DBA’s daily tasks.
Oracle Health Check
Components of Quest Central for Oracle
• Provides fast reorganizations and restructuring both inside the database and via the
file system using an intuitive GUI
• Predicts out of space conditions and offers detailed “reorg need”
• Calculates the optimum reorganization strategy
• Reorganizes multiple objects simultaneously
• Offers comprehensive capacity planning and thorough object sizing
• Supports LONG and LONG RAW data types for packaged apps
• Contains cutting-edge, patent-pending technology
Using easy-to-read tablespace maps and GUIs, Quest Central tells you exactly which objects
will most benefit from reorganization. Detailed descriptions of exactly what is causing
problems and the anticipated benefit of the reorganization lets you maximize your efforts.
To help manage your growing database, Quest Central’s Space Management maintains a
repository of object growth statistics. This repository is automatically populated via the
periodic collection of new Oracle ANALYZE statistics.
Dear Customer:
Thank you for your interest in Quest Software’s Oracle Health Check. This binder shows you
a real-world example of the comprehensive analysis you will receive after installing Quest
Central™ for Oracle on your production system for just five days.
This large communications provider runs a complex 24x7 environment with over 50
production databases. The DBA team and their consultants were seeking a way to easily
test and rate their trial database tools, and eventually to justify their purchase. In addition,
the Company was merging with another provider, and the team hoped for tools to ease the
integration of the two IT environments.
Through Quest Software’s Oracle Health Check program, Quest’s system consultants worked
with the Company’s DBA team for one day to install Quest Central for Oracle. Allowing
Quest Central to collect data non-intrusively for five days yielded a detailed analysis that
satisfied everyone involved: the Database Administration team received a complete
diagnosis and advice for resolution of database performance issues, and upper management
received an easy-to-read report that clarified the value of Quest Central in their
environment.
Thanks again,
Quest Software
Database Performance Health Check
The health check is a short, no-charge consulting engagement for companies who are interested in significantly improving Oracle
database performance. By non-intrusively collecting your database metrics for five days, Quest Software is able to gather dozens of
statistics and summarize them into a readable format.
Customers that have participated in Quest Software’s Oracle Health Check have realized thousands of dollars in hard savings by elimi-
nating the need for Oracle tuning consultants, and have improved database application performance and availability exponentially.
The health check process is simple, and includes the following phases:
Quest Central™ for Oracle brings your organization incredible value. We’re so confident of the quality, return on investment and overall
value of our tools that we’re willing to offer you this unprecedented level of service.
Quest Software appreciates the opportunity to demonstrate the value that Quest Central for
Oracle could bring to the Company. We are so confident of the value of Quest Central that
we have installed the product in your production environment and collected key
performance metrics from your Oracle instances. This document summarizes the findings
and includes details to back up our recommendations.
Quest Central for Oracle is a comprehensive solution for managing Oracle database
environments. By providing performance diagnostics, database analysis, SQL tuning, space
management and database administration together in one integrated console, Quest Central
offers everything a DBA needs to accomplish their daily tasks.
The Database Analysis component of Quest Central for Oracle allows you to proactively
analyze the core components of your environment. Critical areas include: I/O efficiency,
data file structure, application SQL efficiency, latch and lock contention, job processes, and
tuning parameters that affect memory and processing efficiency, among others.
Following are a few of the graphs included in our health check report that support our five
recommendations for increasing performance in your production environment.
Graph 2
Instance: TELECOM.WORLD
Date Analyzed: Thursday, September 05, 2002 2:22:58 PM
Report Created: Thursday, September 05, 2002 2:47:29 PM
Recommendations:
Goals:
Graphs:
Activity Summary
File I/O
Latch Summary
Misc reports
Wait events
Lock Contention
There is a high proportion of enqueue waits. This can indicate contention for the
following:
Lock Contention
Common causes of excessive enqueue waits include the following:
• Contention for a specific row in the database. The application design may
require that many processes update or lock the same row in the database. For
example, when primary keys are generated using a sequence table.
• Table locks caused by un-indexed foreign keys. When an un-indexed foreign
key is updated, the parent table will be subjected to a table lock until the
transaction is complete.
• "Old-style" temporary tablespaces. When the tablespace nominated as the
temporary tablespace has not been created using the TEMPORARY clause
(introduced in Oracle 7.3) , the sessions may contend for the "space
transaction" lock.
• The space reserved for transactions within a data block is too small. When the
table or index is created, the default number of transaction slots for tables (1
slot) and indexes (2 slots) are allocated. The number of transaction slots is
determined by the INITRANS clause in the CREATE TABLE or INDEX
statement. When additional transaction slots are needed Oracle creates more
(providing there is free space in the block). However, when all of the
transaction slots are in use and there is no free space in the block, a session
requesting to lock a row in the block will encounter an enqueue wait. An
enqueue wait is encountered even when the row is not actually locked by
another process. This occurs when both PCTFREE and INITRANS are set too
low.
• Contention for a specific row in the database. The application design may
require that many processes update or lock the same row in the database. For
example, when primary keys are generated using a sequence table.
• Table locks caused by non-indexed foreign keys. When a non-indexed foreign
key is updated, the parent table will be subjected to a table lock until the
transaction is complete.
The following table shows the list of USERS who do not have dedicated “True”
temporary tablespaces:
• Sort segments take the storage parameters from the DEFAULT STORAGE
(NEXT) clause of the temporary tablespace in which they are created. The
assignment of a dedicated temporary tablespace allows for easy modification
of default storage allocation parameters to make sure that long-running jobs
never fail when they cannot allocate enough temporary segments.
• It allows for I/O management by spreading tablespaces across different
physical disks.
It is also very important to make sure that SYSTEM tablespace is never used as a
user temporary tablespace. System tablespace is used by Oracle internally to
maintain Data Dictionary objects. Using SYSTEM tablespace can significantly degrade
the performance of your system.
“True” temporary tablespaces have been created using the CREATE TABLESPACE
command, or have been marked as temporary by an ALTER TABLESPACE
command. These tablespaces cannot hold permanent objects and are optimized for
temporary segment activity.
When temporary tablespace is not defined as “true” temporary, the effect is as follows:
Note: The DEFAULT STORAGE clause defines the size of the sort extents created
within a tablespace. It is highly recommended that this should be always a multiple of
the SORT_AREA_SIZE specified in the INIT.ORA file for your instance. The
SORT_AREA_SIZE is currently defined as 2097152 for your instance.
The create sequence command also includes an ORDER clause which, if used,
guarantees that sequence numbers are generated in sequential order. This option is
intended for use with the ORACLE Parallel Server (OPS) option only. In a nonOPS
system, sequence numbers are always generated in sequential order.
Specifying order in the create sequence command disables the sequence cache
mechanism, thus negatively affecting sequence performance. You should not specify
the ORDER clause unless you are in a Parallel Server environment, and even then,
only when you absolutely require that sequence numbers be generated in sequential
order.
Since this database is not running in an OPS environment, there is no valid reason for
specifing the ORDER clause
The following sequences have the ORDER clause specified and appear to be active:
Sequence Name
SA.SEQ_MESSAGE
SA.SEQ_CONDITION
SA.SEQ_CONTACT
SA.SEQ_CONTACT_ROLE
SA.SEQ_TIME_BOMB
SA.SEQ_SITE
SA.SEQ_ACT_ENTRY
SA.SEQ_ADDRESS
SA.SEQ_INV_ROLE
SA.SEQ_DEMAND_DTL
SA.SEQ_DEMAND_HDR
SA.BASE36TBN
SA.BASE36TCL
SA.BASE36ACL
SA.BASE36ACN
SA.BASE36ACT
SA.SEQ_BUS_SITE_ROLE
When you are not in an Oracle Parallel Server (OPS) environment, change from
ORDER to NOORDER. When you are in an Oracle Parallel Server environment, you
should only use the ORDER clause when it is absolutely essential that sequence
numbers always be generated in order as generating sequence numbers in order in
an OPS environment negatively affects your system performance.
See also:
Altering Sequences
SQL script used to alter nominated sequences storage definitions.
You can use the following SQL script to alter the nominated sequences storage
definitions. You should run this script while connected as a user with the ALTER ANY
SEQUENCE privilege.
WARNING: You should test this script in a test environment. You should also back up
your database before executing any scripts generated by Database Analysis. Although
Quest Software makes every effort to ensure that these scripts are reliable,
differences in your operating environment may cause these scripts to fail. You should
also consider using Schema Manager to perform mission critical changes.
One of the reasons Oracle sequence number generators are efficient is that the
numbers are cached in the Oracle shared memory area (the SGA). By default, 20
sequence numbers are cached. Once the 20 numbers are allocated, Oracle must
retrieve another 20 from the database. When sequence numbers are allocated at a
high rate, you can improve the performance by increasing the cache size when you
create the sequence. Database Analysis records the rate at which sequence numbers
are allocated and recommends an increase in the cache rate when the cache will be
exhausted in a few minutes.
Database Analysis has determined that the following sequences have a less than
optimal cache size:
Current Optimal
Sequence Name Probability
cache_size cache size
SA.SEQ_TIME_BOMB 100 185 92.4
SA.SEQ_ACT_ENTRY 100 185 92.4
Increasing the cache size does not consume memory in the SGA. However, it does
increase the number of sequence numbers that can be lost if the cache is flushed at
system shutdown.
See also:
Altering Sequences
SQL script used to alter nominated sequences storage definitions.
You can use the following SQL script to alter the nominated sequences storage
definitions. You should run this script while connected as a user with the ALTER ANY
SEQUENCE privilege.
WARNING: You should test this script in a test environment. You should also back up
your database before executing any scripts generated by Database Analysis. Although
Quest Software makes every effort to ensure that these scripts are reliable,
differences in your operating environment may cause these scripts to fail. You should
also consider using Schema Manager to perform mission critical changes.
Note: This recommendation was based on the current data held within your Oracle instance and not from
data collected by the snapshot processes. It might not, therefore, be totally applicable to the analysis
period you specified.
The following SQL statements consumed a significant portion of identified disk I/O, required a large
number of I/Os to retrieve rows from the database, or both. To display the Execution Plan for a specific
Database Analysis has examined your database and has determined that latch waits
account for 26% of your overall non-idle waits. Database Analysis has calculated a
95% probability that this is a significant amount of latch contention.
The total time consumed by latch waits directly corresponds to the time spent by latch
requests not granted to a requesting process. When the latch is not available, the
requesting process sleeps and then wakes later to try again to obtain the latch. The
following table lists the latches, the number gets, misses and sleeps for your
database:
When a process requires a latch and cannot obtain it on the first attempt, a latch miss
will result. The session will repeatedly attempt to obtain the latch until the value of the
configuration parameter spin_count is reached. This technique is known as acquiring
a spin lock. When the session still cannot obtain the latch, then the session will
relinquish the CPU and a latch sleep will result. A latch sleep will be recorded as a
latch free wait. When the session "wakes," it will repeat the attempt to obtain the latch.
Latch free waits occur when a session "sleeps" on a latch. Therefore, the most
effective way to reduce latch free waits is to identify and correct the latches that
caused the most sleeps. A table showing the breakdown of sleeps by latch type is
located on the Reduce latch free waits page.
Types of Latches
The latches which are used most heavily and which suffer the greatest contention are
the latches associated with the following three major areas of the SGA:
• Buffer cache latches
• Library cache latches
• Redo buffer latches
Two main latches protect data blocks in the buffer cache. The first is the cache buffer
LRU chain latch, which must be obtained to introduce a new block into the buffer
cache and to write a buffer back to disk. A cache buffer chains latch is acquired
whenever a block in the buffer cache is accessed (pinned).
When contention exists for buffer cache latches, it usually indicates a database which
has very high I/O rates. It is possible to reduce contention for the cache buffer LRU
chain latch by increasing the size of the buffer cache. This reduces the rate at which
new blocks are introduced into the buffer cache.
Reducing contention for the cache buffer chains latch usually requires you to reduce
the logical I/O rates by tuning and minimizing the I/O requirements of application SQL.
You can create additional cache buffer LRU chain latches by adjusting the
DB_BLOCK_LRU_LATCHES parameter. Contention for the cache buffer LRU chain
and cache buffer chain latches can occur when a database sustains very high physical
or logical I/O rates.
The library cache latches protect the cached SQL statements and object definitions
located in the library cache of the shared pool.
The library cache latch must be obtained before a new statement can be added to the
library cache. During a parse request, Oracle searches the library cache for a
matching statement. When it is not found, Oracle will parse the SQL statement,
acquire the library cache latch, and insert the new SQL. Contention for the library
cache latch can occur when an application generates numerous unique, unsharable
SQL (usually when literals have been used instead of bind variables). When the library
cache latch bottlenecks, try to improve the use of bind variables within your
application. Misses on this latch can also indicate that your application is parsing SQL
at a high rate and may be suffering from excessive parse CPU overhead.
The library cache pin latch must be obtained when a statement in the library cache is
re-executed. Misses on this latch occur when SQL is executed at very high rates.
There is little you can do to reduce the load on this latch, although using private rather
than public synonyms (or even direct object references such as OWNER.TABLE) can
help.
Two latches control access to the redo buffer. The first, the redo allocation latch, must
be acquired before space can be allocated within the buffer. The second, the redo
copy latch, is then acquired to copy redo entries into the buffer.
You may observe high contention for the redo copy latch. This is an artifact of the way
in which Oracle obtains this latch. Oracle requests each of the redo copy latches in
turn without waiting for the latch. Only when all of the latches are busy will Oracle spin
on the latch or enter a latch free wait state. The misses on each of the latches is still
recorded though, resulting in the appearance of a high miss rate for this latch.
The shared pool latch is used when sessions allocate or unallocate space within the
shared pool. Heavy contention for this latch indicates that the shared pool is too large.
Large shared pools can generate excessively long freelists. The longer the freelists,
the longer it takes to be scanned and the longer the latch is held.
When a session "sleeps" while trying to obtain a latch, the database response time will
be significantly degraded. You can decrease the probability of session sleeps by
increasing the value of the _LATCH_SPIN_COUNT or SPIN_COUNT configuration
parameter. This parameter controls the number of attempts the session will make to
obtain the latch before sleeping. "Spinning" on the latch consumes CPU. Increasing
the value of this parameter can increase the overall CPU utilization of your system.
When your system is near 100% CPU utilization and you are using a throughput
application rather than a response time application, you can consider decreasing the
SPIN_COUNT value to conserve CPU.
Adjusting the SPIN_COUNT parameter value is a trial and error process. In general,
only increase the value when there are enough free CPU resources available on your
system. Decrease the value only when there is no spare CPU capacity.
Activity Summary
This report provides an overview of the instance activity during the analysis period. Increases in load
can result in increased contention for resources and degraded response times or throughput.
User activity
Figure 1 shows the number of sessions connected to the database during the analysis period.
"Active" users are those that are currently executing a database call (probably a SQL request). High
values for "Active" may indicate a period of contention or extreme load.
Logical I/O
Logical I/O occurs whenever a connected session wants to access information in the database. A
Logical I/O will only become a physical I/O when the necessary information is not present in the buffer
cache (an area of shared memory in the SGA). Three types of logical I/O can occur within the buffer
cache:
• A consistent read which requires that the data block be consistent at a given point in time.
This sort of I/O usually involves queries.
• A current read accesses of the most recent version of a block. This sort of I/O is typical of
DML (Update, Delete, Insert) operations.
• Block changes that occur when a session modifies a block in shared memory.
Call rates
When a client communicates with an Oracle instance, the calls can be categorized as follows:
Call rates give a good overall indication of the amount of work being done. High parse rates (relative
to executions) or high rollback rates (relative to commits) can indicate inefficiencies in the application.
• Buffer cache - A miss occurs when a user issues a logical read request and the requested
block is not already in memory.
• Latch - A miss occurs when a user attempts to acquire a latch and none are available.
• Library cache - A miss occurs when the session cannot find a SQL statement in the shared
pool (library cache).
Datafile I/O
Physical reads by datafile
Figure 1 shows the physical read rates for the most active datafiles. High read rates can indicate
heavy database activity. However, high read rates can also be caused by poorly tuned SQL queries
that access the datafiles. Datafiles with High I/O rates should generally be spread across multiple disk
devices. You can accomplish this by either using RAID or by alternating datafiles across multiple disk
devices.
Latch Activity
Introduction
Latches are Oracle internal locking mechanisms that prevent multiple sessions from simultaneously
updating the same item within Oracle shared memory (SGA). When a session requests a latch that is
held by another session, a latch free wait occurs.
The presence of latch free waits of any significant magnitude may indicate a bottleneck within the
SGA. The degree to which database performance is impacted depends on the latch. The following
sections describe the latches and how they can impact performance.
• Latch miss rate - the percentage of latch attempts that did not succeed on the first attempt.
• Latch sleep rate - the percentage of latch attempts that did not succeed and that eventually
required the session to "go to sleep" waiting for the latch to become available.
• Latch wait pct - the percentage of time that all sessions spent waiting for latches to become
available, as a percentage of the total time spent waiting for non-idle events.
Figure 1 shows the values for these three indicators across the analysis period:
Latches are usually held for a very brief interval, and in a healthy database there should be little or no
contention for latches. Unfortunately, very busy databases often suffer considerably from latch
contention.
When a process requires a latch and cannot obtain it on the first attempt, a latch miss will result. The
session will repeatedly attempt to obtain the latch until it reaches a number of attempts specified in
the SPIN_COUNT parameter. This technique is known as acquiring a spin lock. When the session
still cannot obtain the latch, then the session will relinquish the CPU and a latch sleep will result. A
latch sleep will be recorded as a latch free wait. When the session wakes, it will again attempt to
obtain the latch.
The latches that contribute to a high proportion of misses or sleeps deserve attention. The latches
which are used most heavily and which therefore typically suffer the most contention are the latches
associated with the three major areas of the SGA. These are the buffer cache latches, the library
cache latches, and the redo buffer latches.
• The cache buffer LRU chain latch must be obtained before introducing a new block into the
buffer cache and also when writing a buffer back to disk.
• The cache buffer chains latch is acquired whenever a block in the buffer cache is accessed
(pinned).
Contention for these latches usually indicates that a database has very high I/O rates. It may be
possible to reduce contention for the cache buffer LRU chain latch by increasing the size of the buffer
cache. This will reduce the rate at which new blocks are introduced into the buffer cache.
Reducing contention for the cache buffer chains latch usually requires the logical I/O rates to be
reduced. This is accomplished by tuning and minimizing the I/O requirements of application SQL.
You can create additional cache buffer LRU chain latches by adjusting the configuration parameter
DB_BLOCK_LRU_LATCHES.
The library cache latch must be obtained before a new statement can be added to the library cache.
During a parse request, Oracle searches the library cache for a matching statement. When one is not
found, Oracle will parse the SQL statement, acquire the library cache latch, and insert the new SQL.
Contention for the library cache latch can occur when an application generates very high quantities of
unique, unsharable SQL. This usually occurs when literals have been used instead of bind variables.
When the library cache latch is a bottleneck, try to improve the use of bind variables within your
application. Misses on this latch may also be a sign that your application is parsing SQL at a high rate
causing excessive parse CPU overhead.
The library cache pin latch must be obtained when a statement in the library cache is re-executed.
Misses on this latch occur when there are very high rates of SQL execution. There is little you can do
to reduce the load on this latch, although using private rather than public synonyms (or even direct
object references such as OWNER.TABLE) can help.
Contention for library cache and library cache pin latches can occur when there is heavy parsing or
SQL execution rates. Misses on the library cache latch is usually a sign of excessive re-parsing of
non-sharable SQL.
Prior to Oracle version 8i, you can adjust the LOG_SIMULTANEOUS_COPIES parameter to control
the number of redo allocation latches. In Oracle version 8i, the LOG_SIMULTANEOUS_COPIES
parameter defaults to twice the number of CPUs on the system. This parameter should never be
changed.
You may observe seemingly high contention for the redo copy latch but this is really an artifact of the
way in which Oracle obtains this latch. Oracle attempts to obtain each of the redo copy latches in turn
without waiting for the latch. Only when all of the latches are busy will Oracle spin on the latch or
enter a latch free wait state. However, because a miss on each of the latches is still recorded, it is
common to see a high miss rate on this particular latch. High miss rates on the redo copy latch are
normal and do not usually indicate serious latch contention.
Adjusting the SPIN_COUNT parameter value is a trial and error process. In general, only increase the
SPIN_COUNT parameter value when there are enough free CPU resources available on your
system. Decrease the SPIN_COUNT parameter value only when there is no spare CPU capacity.
Note: Short term or sporadic high busy rates can severely impact response time during peak activity,
even when the average busy rate seems acceptable.
Figure 2 shows the percentage of dispatcher and server requests which had to wait. This rate should
generally be kept close to zero.
• Wrap - occurs when a rollback segment has used all of the available extents and must "wrap"
to re-use the first extent. High rates of wraps can indicate that the rollback segments are too
small. Although wraps in themselves do not consume resources, they do limit the maximum
possible duration for long running queries.
• Extend - occurs when a transaction needs more space than is available in the rollback
segment. This requires more extents to be added. High rates of extends may indicate that the
setting for OPTIMAL is too low.
• Shrink - occurs when a transaction moves into an unused extent and detects that the
rollback segment is larger than the OPTIMAL setting. The rollback segment will then "shrink"
back to the size specified by OPTIMAL. High rates of shrinks may indicate that the setting for
OPTIMAL is too low.
• Wait - occurs when a session unsuccessfully attempts to access a particular rollback
segment header. High wait rates indicate a need to create additional rollback segments.
This report was generated by Database Analysis.
Database Analysis
Graph: Wait events
Wait Activity
Summary of Wait Events
When an Oracle session must wait for a resource to become available, it records the type and
duration of the wait to the Oracle dynamic performance tables V$SYSTEM_EVENT and other related
views. Examination of these wait conditions is one of the most important performance diagnostic
measures because many performance tuning opportunities relate to reducing the number of
unnecessary waits or to reducing the average duration of necessary waits.
Figure 1 summarizes event waits during the analysis period. Some waits, for example, those that
occur during idle periods, are eliminated. Other waits are aggregated.
Wait Details
Table 1. shows a more detailed breakdown of wait events during the analysis period. This breakdown
aggregates many of the categories that are contained in V$SYSTEM_EVENT and excludes waits that
are regarded as "idle" waits.
• Data block - This is generally caused by concurrent inserts in a table with insufficient
freelists. Insufficient freelists do not cause freelist buffer busy waits, and unless you
configured multiple freelists_groups (recommended only for Oracle Parallel Server) freelist
buffer busy waits do not occur.
• Undo header or block - This generally occurs when you need to configure more rollback
segments
Db File Waits
Events such as multi-block read, single-block read, direct path read/write, and db file write all occur
when an Oracle session issues an I/O request against an Oracle datafile.
Database file writes are performed only by the database writer. Therefore, "db file" write waits are not
experienced by user sessions. User sessions do, however, read data from database files directly and
will almost always wait for datafile read events.
Unless your entire database is cached in the SGA, waiting for database file I/O is inevitable and the
presence of "db file" waits does not indicate a problem with database performance. In most
databases, "db file" waits account for approximately 80 to 90% of all nonidle wait times.
The average wait times for db file events is an indication of the speed and efficiency of your disk I/O
subsystem. High speed disks should allow for average waits of between 1 and 2 hundredths of a
second. Higher values can indicate that you should review your disk configuration.
Both of these wait events are inevitable and account for between10 and 20% of total nonidle wait
times in a database. The average wait time for a log file parallel write is an important measure. It
indicates how quickly the log writer process can flush the redo buffer and is a good indicator of the
efficiency of the redo log device. Values under 1 hundredths of a second are good, and values of up
to 5 hundredths of a second are not unusual. Values above this range may indicate issues with the
redo log device.
• Log Buffer Space. Waiting for free space in the redo log buffer. You can reduce this wait by
increasing the size of the log buffer (LOG_BUFFER parameter) or by optimizing the
performance of the logwriter.
• Log File Switch (checkpoint incomplete). The next redo log cannot be used because a
checkpoint that commenced when the log was last switched has not completed.
• Log File Switch (archiving needed). A redo log cannot be used because an archive
operation that commenced when it was last switched has not completed.
These waits suggest that either your redo logs are on slow devices, your log_buffer setting is too low,
or you have too few or too small redo logs. When you continue to see the "log file switch (archiving
needed)" event, you should alternate your redo logs across multiple devices to reduce any issues
between the LogWriter and Archiver processes.
Buffer Busy Waits
This event occurs when a session cannot access a block in the SGA because the block is in use by
another session. The two most common causes of this event are insufficient free lists for a table and
too few rollback segments.
You can use the V$WAITSTAT table to distinguish between these two causes. If the majority of the
waits are for "data block" or "free list" events, it is likely that you need to create multiple FREELISTS
(using the FREELIST clause of the CREATE TABLE statement) for tables that are subject to very
heavy concurrent inserts. When the majority of the waits are for either "undo header" or "undo block"
events, you may need to create additional rollback segments.
"Write complete waits" occur when a session attempts to modify a block that is currently being written
to disk by the database writer process. This occurs occasionally, particularly during checkpoints.
However, when it is causing a large number of waits, it may indicate inefficiencies in the database
writer.
"Free buffer waits" occur when a session attempts to read a data block from a database file on disk to
the buffer cache. When there are no unmodified (clean) blocks in the buffer cache, the session must
wait for the Database Writer process to write modified (dirty) blocks to disk so that free buffers can be
available. However, the database writer is constantly writing dirty buffers to disk, therefore, this event
should occur only rarely.
When either of these events make up the majority of total waits, you may need to improve the
performance of the Database Writer process (DBWR). You can perform the following to complete this
task:
• Contention for a specific row in the database. The application design may require that many
processes update or lock the same row in the database. One common example of this is
when primary keys are generated using a sequence table.
• Table locks caused by unindexed foreign keys. When an unindexed foreign key is updated,
the parent table is locked until the transaction is complete.
• "Old-style" temporary tablespaces. When a temporary tablespace has not been created with
the TEMPORARY clause (introduced in ORACLE 7.3), sessions may contend for the "space
transaction" lock.
• The space reserved for transactions in a data block is too small. By default, only one
transaction slot for tables and two for indexes is allocated when the table or index is created.
The number of transaction slots is determined by the INITRANS clause in the CREATE
TABLE or INDEX statement. When additional transaction slots are required, and there is free
space in the block, they are created. However, when all transaction slots are in use and there
is no free space in the block, a session that wants to lock a row in the block encounters an
enqueue wait, even when the row is not actually locked by another process. This can occur
when both PCTFREE and INITRANS are set too low.
A large number of latch free waits may indicate a bottleneck in the SGA. Since latches are such a
significant performance diagnostic, a complete rule pack and report page is dedicated to latch
analysis (for further information, see the "reduce latch contention" goal and the "Latch analysis"
report).
SQL*Net Waits
The Oracle server often records that it is waiting for the completion of a SQL*NET operation. These
waits all begin with "SQL*NET". It can be difficult to isolate the waits that are the result of network
overhead from those that signify that the client process is busy performing other tasks. You should
ignore the "SQL*Net message from client" event, which occurs when the server process is idle and is
waiting for further instructions from the client process. When other SQL*NET waits occur frequently,
you should investigate your network overhead. However, these waits can occur when bottlenecks are
present in the client program or in a remote server (as indicated by "db link" waits).