CONFIGURE BACKUP OPTIMIZATION ON
10G
To check if a CPU patch supports rolling upgrades, you need to use the opatch query -all command. This command provides detailed information about the patches applied to your Oracle Home.
Here's the SOP:
Standard Operating Procedure (SOP) to Check if a CPU Patch Supports Rolling Upgrade:
Log in to the Oracle Server: Connect to the server where your Oracle database software is installed, using the oracle user or an account with appropriate permissions to run opatch.
Set Oracle Environment: Ensure your ORACLE_HOME and PATH are correctly set for the Oracle Home you want to check. You can use the oraenv utility for this:
. oraenv
(Enter the ORACLE_SID associated with the ORACLE_HOME you're interested in, or set ORAENV_ASK=N and ORACLE_SID before running).
Execute opatch query -all: Run the opatch command with the -all option.
opatch query -all
Review the Output: In the output generated by opatch query -all, look for a line that explicitly states whether the patch is a rolling patch or not.
You will find a line similar to this:
Patch is a rolling patch: true
or
Patch is a rolling patch: false
true, then the CPU patch supports rolling upgrades.false, then the CPU patch does not support rolling upgrades, and a full cluster shutdown might be required for patching.This line is the definitive indicator within the opatch output for rolling patch support.
The Automatic Workload Repository (AWR) report is a powerful diagnostic tool in Oracle Database that provides a snapshot of database performance over a specified time interval. Analyzing different sections of the AWR report helps DBAs identify performance bottlenecks and trends.
This document outlines several key sections of an AWR report and what information they provide.
This is the introductory section of the AWR report.
Content: Provides fundamental information about the database and the AWR snapshot interval, including:
Database Name and ID
Instance Name (if RAC)
Platform Information
Snap Interval (the duration of the snapshot)
The Load Profile section provides a high-level summary of database activity during the snapshot interval, normalized to per-second rates.
DB time(s): The total amount of time Oracle has spent performing database user calls. This does not include background processes.
DB CPU(s): The amount of CPU time spent on user calls. Similar to DB time, it does not include background processes. The value is typically in microseconds.
Redo size: The average amount of redo data generated per second by transactions.
Logical reads: Represents Consistent Gets + DB Block Gets. This is the total number of blocks read from the buffer cache (logical I/O).
Block Changes: The number of data blocks modified during the sample interval.
Physical reads: The number of block requests that caused a physical I/O operation (i.e., had to be read from disk).
Physical writes: The number of physical writes performed to datafiles.
User calls: The number of user queries/calls generated per second.
Parses: The total number of parse operations (both hard and soft) per second.
Hard Parses: The number of parses requiring a completely new parse of the SQL statement. These consume significant resources (latches and shared pool area).
Soft Parses: (Derived by subtracting hard parses from total parses). A soft parse reuses a previously hard-parsed SQL statement, consuming significantly fewer resources.
Sorts: The number of sort operations performed per second.
Logons: The number of new user logons during the interval.
Executes: The number of SQL executions per second.
Transactions: The number of user transactions per second.
This section provides insights into the utilization and efficiency of the Shared Pool, a critical SGA component.
Begin/End Memory Usage %: Shows the percentage of the Shared Pool used at the beginning and end of the snapshot.
SQL with executions > 1 %: Percentage of SQL statements in the Shared Pool that have been executed more than once.
Memory for SQL w/exec > 1 %: Percentage of Shared Pool memory consumed by SQL statements executed more than once.
Interpretation:
Ideally, memory usage should not be excessively high (e.g., consistently beyond 90%), as this could indicate contention in the shared pool and suggest it is too small.
If the percentage is very low (e.g., around 50%), it might indicate that the shared pool is too large for the current workload, leading to wasted memory.
These percentages indicate how efficiently the database instance is operating. Values close to 100% are desirable.
Buffer Nowait %: Percentage of buffer gets that did not have to wait.
Redo NoWait %: Percentage of redo entries that did not have to wait for space in the redo buffer.
Buffer Hit %: Percentage of logical reads that found the block already in the buffer cache (avoiding physical I/O).
In-memory Sort %: Percentage of sort operations performed entirely in memory (not spilling to disk).
Library Hit %: Percentage of parse calls that found the SQL statement already in the library cache (soft parse).
Soft Parse %: Percentage of total parse calls that were soft parses.
Execute to Parse %: Percentage of executions relative to parses. A high value indicates good SQL reuse.
Latch Hit %: Percentage of latch gets that were successful on the first attempt.
Parse CPU to Parse Elapsd %: Ratio of CPU time spent parsing to total elapsed time during parsing. A low value might indicate parsing contention.
% Non-Parse CPU: Percentage of CPU time spent on actual execution rather than parsing.
This crucial section identifies the top 5 events that foreground processes spent the most time waiting for. "Time" is a very important component here, as it directly points to where the database is spending its time waiting. Analyzing these events is often the starting point for performance tuning.
This section is present in AWR reports generated for Oracle Real Application Clusters (RAC) environments. It provides metrics specific to inter-instance communication and resource management, such as Global Cache (GC) related wait events (e.g., gc current block request, gc cr block request).
This section breaks down the total DB time into various components, showing how much time was spent on different database activities (e.g., SQL execution, parsing, PL/SQL execution, Java execution). This provides a granular view of where the database time is actually being consumed.
This section provides detailed performance metrics for individual SQL statements. It typically includes sub-sections that order SQL statements by:
SQL ordered by Elapsed Time: Top SQL statements consuming the most total time (CPU + Wait).
SQL ordered by CPU Time: Top SQL statements consuming the most CPU time.
SQL ordered by Gets: Top SQL statements performing the most logical reads (buffer gets).
SQL ordered by Reads: Top SQL statements performing the most physical reads.
This section provides detailed statistics about I/O operations.
Av Rd(ms) (Average Read time in milliseconds): This metric is a key indicator of I/O latency. Ideally, this value should not cross beyond 10ms. A value consistently above this threshold is considered an I/O bottleneck, indicating that the storage subsystem is struggling to deliver data quickly.
Advisory sections provide recommendations for optimizing various SGA and PGA memory components.
Buffer Pool Advisory: Recommends optimal DB_CACHE_SIZE based on workload simulation.
PGA Aggr Summary: Summary of PGA memory usage.
PGA Aggr Target Stats: Statistics related to the PGA Aggregate Target.
PGA Aggr Target Histogram: Distribution of PGA memory usage.
PGA Memory Advisory: Recommends optimal PGA_AGGREGATE_TARGET based on workload.
Shared Pool Advisory: Recommends optimal SHARED_POOL_SIZE.
SGA Target Advisory: Recommends optimal SGA_TARGET (if using Automatic Shared Memory Management).
Streams Pool Advisory: Recommends optimal STREAMS_POOL_SIZE (if using Oracle Streams).
Java Pool Advisory: Recommends optimal JAVA_POOL_SIZE (if using Java in the database).
This section lists the values of all initialization parameters that were set at the instance level during the AWR snapshot interval. This is useful for understanding the database's configuration.
By thoroughly reviewing these sections in an AWR report, DBAs can gain a comprehensive understanding of database performance, identify bottlenecks, and make informed decisions for tuning and optimization.
=====================================================================
To understand your database's I/O performance, you'll primarily look at the "Load Profile" and potentially infer from the "I/O Stats" section.
IOPS represents the number of individual read or write operations performed per second.
Identify Key Metrics in "Load Profile":
Physical reads: This is the total number of data blocks that Oracle had to read from disk into memory during the AWR snapshot interval. Each of these counts as an I/O operation.Physical writes: This is the total number of data blocks that Oracle wrote from memory to disk during the AWR snapshot interval. Each of these also counts as an I/O operation.Find the AWR Snapshot Interval:
elapsed_seconds.
AWR Interval (seconds) = END_TIME - START_TIMECalculate IOPS:
Total IOPS = (Physical reads + Physical writes) / AWR Interval (seconds)Example: If Physical reads = 1,000,000, Physical writes = 500,000, and AWR Interval = 3600 seconds (1 hour):
Total IOPS = (1,000,000 + 500,000) / 3600 = 1,500,000 / 3600 ≈ 416.67 IOPS
Throughput represents the total volume of data (in MB/GB) transferred to or from disk per second.
Identify Key Metrics in "Load Profile":
Physical reads and Physical writes.Determine Database Block Size:
show parameter db_block_size in SQL*Plus.Find the AWR Snapshot Interval:
Calculate Throughput:
Total Throughput (Bytes/sec) = ((Physical reads + Physical writes) * Database Block Size in Bytes) / AWR Interval (seconds)(1024 * 1024).(1024 * 1024 * 1024).Example: Using the above IOPS example, with a Database Block Size = 8192 bytes:
Total Throughput (Bytes/sec) = (1,500,000 * 8192) / 3600 = 12,288,000,000 / 3600 ≈ 3,413,333 Bytes/sec
Total Throughput (MB/sec) = 3,413,333 / (1024 * 1024) ≈ 3.25 MB/sec
The "I/O Stats" section, particularly the Av Rd(ms) (Average Read time in milliseconds), is an indicator of I/O latency, not directly IOPS or throughput.
Av Rd(ms): This metric tells you how quickly your storage subsystem is responding to read requests.
| IP Address Type | Purpose | Where Registered | Pingable from Clients |
|---|---|---|---|
Virtual IP address
|
Address for client requests and to be used to fail over requests to other nodes
|
DNS (recommended), or in the
/etc/hosts file for each node in the cluster, and the /etc/hostsfile for each node that is accessing the cluster database/ |
No, before installation; yes, after installation
|
Public IP address
|
Address for service requests
|
DNS, or in the
/etc/hosts file for each node in the cluster. |
Yes
|
Private IP address
|
Address for inter-node communication only(Cache Fusion)
|
DNS, or
/etc/hosts file for each node in the cluster. Must be resolvable only by other nodes in the cluster, and should be on dedicated network hardware. |
No
|
Common Oracle AWR Wait Events Explained
This document provides an overview of frequently observed wait events in Oracle Automatic Workload Repository (AWR) reports, categorized by their primary area of impact. Understanding these wait events is crucial for diagnosing and resolving performance bottlenecks in an Oracle database.
DB FILE Type Waits – Physical I/O
These events indicate waits related to physical I/O operations from datafiles.
DB File Sequential Reads
Description: The user process is reading buffers into the SGA buffer cache and is waiting for a physical I/O call to return. Typically a single-block read.
Common Causes: Memory starvation (insufficient buffer cache), non-selective indexes, high concurrency on specific blocks.
DB File Scattered Reads
Description: Similar to
db file sequential reads, but the session is reading multiple data blocks (e.g., from a full table scan) and scattering them into different, non-contiguous buffers in the SGA.Common Causes: Full table scans, insufficient indexing, large sorting operations.
Direct Path Writes
Description: Occurs when a process is writing buffers directly from the session's Program Global Area (PGA) to datafiles, bypassing the SGA buffer cache. The process waits for the write call to complete.
Common Causes: Direct-path
INSERToperations (e.g.,INSERT /*+ APPEND */), data loads (e.g., SQL*Loader direct path), parallel DML.
Direct Path Reads
Description: An I/O operation that reads data directly into the session's PGA instead of the SGA.
Common Causes: Parallel query execution (parallel slaves retrieving data), sorting to disk, hash joins spilling to disk, temporary tablespace activity.
DB File Parallel Writes
Description: This wait event is associated with the Database Writer (DBWR) process. DBWR compiles a set of dirty blocks, hands the batch over to the OS for writing to datafiles, and waits for the I/O to complete.
Common Causes: High database activity generating many dirty blocks, backup operations, partitioned table usage (where DBWR writes blocks for multiple partitions in parallel).
DB File Parallel Reads
Description: Occurs during database recovery, where blocks that need to be changed are read in parallel. Can also happen during buffer prefetching as an optimization.
Common Causes: Instance recovery, crash recovery, certain optimization paths (e.g., multi-block reads for specific operations).
DB File Single Write
Description: Used to wait for the writing of single blocks, typically file headers.
Common Causes: File header writes (e.g., during checkpointing, file resizing), excessive number of data files.
Direct Path Read Temp
Description: Reading data directly from temporary files into the PGA.
Common Causes: Extensive temporary segment activity due to large sorts, hash joins, temporary table usage, or bitmap operations that spill to disk.
Direct Path Write Temp
Description: Writing data directly to temporary files from the PGA.
Common Causes: Similar to
Direct Path Read Temp, indicating heavy use of temporary tablespace for sorts, hashes, or temporary tables.BUFFER Type Waits – Logical I/O
These events relate to contention or issues within the SGA buffer cache.
Free Buffer Waits
Description: Occurs when a session needs a free buffer in the SGA but none are immediately available. Oracle waits for a buffer to become available.
Common Causes:
DBWR not writing dirty buffers fast enough (e.g., slow I/O, undersized
DB_WRITER_PROCESSES).A file was read-only and is now read-write, requiring invalidation of existing buffers.
Need for a buffer in CR (Consistent Read) or recovery modes.
Insufficient
DB_CACHE_SIZE.
Buffer Busy Wait
Description: A session cannot access a needed data block because it is currently being used or modified by another session.
Common Causes:
Hot blocks (frequently accessed blocks, e.g., index root blocks, segment header blocks).
Insufficient free lists for a table (pre-ASSM).
Too few rollback segments (pre-Automatic Undo Management).
High concurrency on specific data or index blocks.
Latch Free Waits
Description: Latches are internal Oracle locking mechanisms that protect SGA data structures. This wait occurs if a session needs to acquire a latch that is currently held by another session.
Common Causes: High concurrency on shared memory structures (e.g., library cache latch, shared pool latch, cache buffers chains latch), inefficient SQL (e.g., excessive parsing).
Log Type Waits
These events are related to the redo log buffer and online redo log files.
Log File Parallel Write
Description: The Log Writer (LGWR) process is writing the redo buffer to the online redo log files in parallel and waits for the I/O to complete.
Common Causes: Slow I/O subsystem for redo logs, insufficient redo log group members, large redo generation rates.
Log Buffer Space
Description: A session waits for space to become available in the log buffer because redo information is being generated faster than LGWR can write it to the redo files.
Common Causes: Log buffer is too small (
LOG_BUFFER), redo log files are on disks with I/O contention, very high transaction rates.
Log File Switch (Archiving Needed)
Description: A log switch is pending, but the next online redo log file cannot be used because it has not yet been archived.
Common Causes: Archiver processes are slow or stopped, archive destination is full or slow, insufficient archiver processes (
LOG_ARCHIVE_MAX_PROCESSES).
Log File Switch (Checkpoint Incomplete)
Description: A log switch is pending, but the checkpoint for the next log file has not completed, preventing LGWR from wrapping into it.
Common Causes: Redo log files are sized too small,
FAST_START_MTTR_TARGETis set too high, slow I/O for datafiles (impacting checkpoint completion).
Log File Switch Completion
Description: Sessions are waiting for a log switch operation to fully complete.
Common Causes: Slow I/O for redo logs, issues with archiver processes, or slow checkpoint completion.
Log File Sync
Description: When a user session commits, its redo information must be flushed to the redo logfile. The session waits for LGWR to write the log buffer to disk and then post the user session. The wait time includes both the write and the post.
Common Causes: Slow I/O to redo logs (most common), high commit rate, CPU contention affecting LGWR, network latency in RAC environments.
PX – Parallel Query
These events are related to operations performed by parallel execution processes.
Master Note Parallel Execution Wait Events (Doc ID 1097154.1): Refer to this Oracle Support document for detailed information on parallel execution wait events.
GC – Global Cache (RAC Related)
These events indicate contention or waits in Oracle Real Application Clusters (RAC) environments for accessing data blocks across instances.
gc current block request: Waiting for a current version of a data block from another instance.
gc cr block request: Waiting for a consistent read (CR) version of a data block from another instance.
gc current block 3-way: A more complex scenario for current block requests involving three instances.
gc current block busy: The requested current block is busy on the holding instance.
gc cr block grant 2-way: A simpler scenario for consistent read block requests.Undo or Rollback Segment Related
These events are associated with undo segment management and rollback operations.
Undo Related Wait Events & Known Issues (Doc ID 1575701.1): Consult this Oracle Support document for comprehensive details on undo-related wait events and common issues.
By analyzing the top wait events in AWR reports and understanding their causes, DBAs can effectively pinpoint and address performance bottlenecks in Oracle databases.