AWR(Automatic Workload Repository)
The AWR provides a set of tables into
which snapshots of system statistics are stored. Generally these snapshots are
taken on an hourly basis and include wait interface statistics, top SQL,
memory, and I/O information that is cumulative in nature up to the time of the
capture.
The AWR report process takes the
cumulative data from two snapshots and subtracts the earlier snapshot’s
cumulative data from the later snapshot and then generates a delta report
showing the statistics and information relevant for the time period requested.
AWR is a more advanced version of the old Statspack reports that has been
automated and made integral to Oracle’s automated tuning processes for the
Oracle Database.
The
main sections in an AWR report include:
Report Summary: This gives an
overall summary of the instance during the snapshot period, and it contains
important aggregate summary information.
Cache Sizes (end): This shows the size of each SGA region after AMM has
changed them. This information can be compared to the original init.ora parameters at the end of the AWR
report.
Load Profile: This important section shows important rates
expressed in units of per second and transactions per second.
Instance Efficiency
Percentages: With a target of
100%, these are high-level ratios for activity in the SGA.
Shared Pool
Statistics: This is a good
summary of changes to the shared pool during the snapshot period.
Top 5 Timed Events: This is the most important section in the AWR report.
It shows the top wait events and can quickly show the overall database
bottleneck.
Wait Events Statistics
Section: This section shows a
breakdown of the main wait events in the database including foreground and
background database wait events as well as time model, operating system,
service, and wait classes statistics.
Wait Events: This AWR report section provides more detailed wait
event information for foreground user processes which includes Top 5 wait
events and many other wait events that occurred during the snapshot interval.
Background Wait Events: This section is relevant to the background process
wait events.
Time Model Statistics: Time mode statistics report how database-processing
time is spent. This section contains detailed timing information on particular
components participating in database processing.
Operating System
Statistics: The stress on the
Oracle server is important, and this section shows the main external resources
including I/O, CPU, memory, and network usage.
Service Statistics: The service statistics section gives information
about how particular services configured in the database are operating.
SQL Section: This section displays top SQL, ordered by important
SQL execution metrics.
SQL Ordered by Elapsed
Time: Includes SQL statements
that took significant execution time during processing.
SQL Ordered by CPU
Time: Includes SQL statements
that consumed significant CPU time during its processing.
SQL Ordered by Gets: These SQLs performed a high number of logical reads
while retrieving data.
SQL Ordered by Reads: These SQLs performed a high number of physical disk
reads while retrieving data.
SQL Ordered by Parse
Calls: These SQLs experienced
a high number of reparsing operations.
SQL Ordered by
Sharable Memory: Includes SQL
statements cursors which consumed a large amount of SGA shared pool memory.
SQL Ordered by Version
Count: These SQLs have a large
number of versions in shared pool for some reason.
Instance Activity
Stats: This section contains
statistical information describing how the database operated during the snapshot
period.
Instance Activity
Stats (Absolute Values): This
section contains statistics that have absolute values not derived from end and
start snapshots.
Instance Activity
Stats (Thread Activity): This
report section reports a log switch activity statistic.
I/O Section: This section
shows the all important I/O activity for the instance and shows I/O activity by
tablespace, data file, and includes buffer pool statistics.
Tablespace IO Stats
File IO Stats
Buffer Pool Statistics
Advisory Section: This section show
details of the advisories for the buffer, shared pool, PGA and Java pool.
Buffer Pool Advisory
PGA Aggr Summary: PGA Aggr Target Stats; PGA
Aggr Target Histogram; and PGA Memory Advisory.
Shared Pool Advisory
Java Pool Advisory
Buffer Wait
Statistics: This important
section shows buffer cache waits statistics.
Enqueue Activity: This important section shows how enqueue operates in
the database. Enqueues are special internal structures which provide concurrent
access to various database resources.
Undo Segment Summary: This section gives a summary about how undo segments
are used by the database.
Undo Segment Stats: This section shows detailed history information about
undo segment activity.
Latch Activity: This section shows details about latch statistics.
Latches are a lightweight serialization mechanism that is used to single-thread
access to internal Oracle structures.
Latch Sleep Breakdown
Latch Miss Sources
Parent Latch Statistics
Child Latch Statistics
Segment Section: This report section provides details about hot
segments using the following criteria:
Segments by Logical
Reads: Includes top segments
which experienced high number of logical reads.
Segments by Physical
Reads: Includes top segments
which experienced high number of disk physical reads.
Segments by Buffer
Busy Waits: These segments
have the largest number of buffer waits caused by their data blocks.
Segments by Row Lock
Waits: Includes segments that
had a large number of row locks on their data.
Segments by ITL Waits: Includes segments that had a large contention for
Interested Transaction List (ITL). The contention for ITL can be reduced by
increasing INITRANS storage parameter of the table.
Dictionary Cache
Stats: This section exposes
details about how the data dictionary cache is operating.
Library Cache
Activity: Includes library
cache statistics describing how shared library objects are managed by Oracle.
SGA Memory Summary: This section provides summary information about
various SGA regions.
init.ora Parameters: This section
shows the original init.ora parameters for the instance during
the snapshot period.
Example AWR report:
SQL>
@$ORACLE_HOME/rdbms/admin/awrrpt.sql
Specify
the Report Type
~~~~~~~~~~~~~~~~~~~~~~~
AWR
reports can be generated in the following formats. Please enter the
name
of the format at the prompt. Default
value is 'html'.
'html' HTML format (default)
'text' Text format
'active-html' Includes Performance Hub active report
Enter
value for report_type: text
Type
Specified: text
Current
Instance
~~~~~~~~~~~~~~~~
DB
Id
DB Name Inst Num Instance Container Name
--------------
-------------- -------------- -------------- --------------
3038906043 LIVEDB 1 livedb livedb
Instances
in this Workload Repository schema
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
DB Id
Inst Num DB Name Instance Host
------------
---------- --------- ---------- ------
*
3038906043 1 LIVEDB livedb vignesh.loca
Using
3038906043 for database Id
Using
1 for instance number
Specify
the number of days of snapshots to choose from
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Entering
the number of days (n) will result in the most recent
(n)
days of snapshots being listed. Pressing
<return> without
specifying
a number lists all completed snapshots.
Enter
value for num_days: 5
Listing
the last 5 days of Completed Snapshots
Instance DB Name Snap Id Snap
Started Snap Level
------------
------------ ---------- ------------------ ----------
livedb
LIVEDB 37 17 Sep 2021 00:30 1
58 17
Sep 2021 21:30 1
59 17
Sep 2021 22:30 1
60 17
Sep 2021 23:30 1
61 18
Sep 2021 00:43 1
62 18
Sep 2021 01:30 1
83 18
Sep 2021 22:30 1
89 19
Sep 2021 04:30 1
90 19
Sep 2021 05:30 1
91 20
Sep 2021 13:02 1
99 20
Sep 2021 21:30 1
100 20 Sep 2021 22:30 1
101 20 Sep 2021 23:30 1
108 21 Sep 2021 06:30 1
109 21 Sep 2021 07:30 1
Specify
the Begin and End Snapshot Ids
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Enter
value for begin_snap: 100
Begin
Snapshot Id specified: 100
Enter
value for end_snap: 105
Specify
the Report Name
~~~~~~~~~~~~~~~~~~~~~~~
The
default report file name is awrrpt_1_100_105.txt. To use this name,
press
<return> to continue, otherwise enter an alternative.
Enter
value for report_name:
Using
the report name awrrpt_1_100_105.txt
WARNING:
Since the DB Time is less than one second, there was
minimal foreground activity in the snapshot
period.
Some of the percentage values will be invalid.
No comments:
Post a Comment