Tuesday, July 14, 2009

Oracle Initialization Parameters and Performance Impact

Necessary Oracle Initialization Parameters Without Performance Impact

Parameter

Description

DB_NAME

Name of the database. This should match the ORACLE_SID environment variable.

DB_DOMAIN

Location of the database in Internet dot notation.

OPEN_CURSORS

Limit on the maximum number of cursors (active SQL statements) for each session. The setting is application-dependent; 500 is recommended.

CONTROL_FILES

Set to contain at least two files on different disk drives to prevent failures from control file loss.

DB_FILES

Set to the maximum number of files that can assigned to the database.

Important Initialization Parameters With Performance Impact

Parameter

Description

COMPATIBLE

Specifies the release with which the Oracle server must maintain compatibility. It lets you take advantage of the maintenance improvements of a new release immediately in your production systems without testing the new functionality in your environment. If your application was designed for a specific release of Oracle, and you are actually installing a later release, then you might want to set this parameter to the version of the previous release.

DB_BLOCK_SIZE

Sets the size of the Oracle database blocks stored in the database files and cached in the SGA. The range of values depends on the operating system, but it is typically 8192 for transaction processing systems and higher values for database warehouse systems.

SGA_TARGET

Specifies the total size of all SGA components. If SGA_TARGET is specified, then the buffer cache (DB_CACHE_SIZE), Java pool (JAVA_POOL_SIZE), large pool (LARGE_POOL_SIZE), and shared pool (SHARED_POOL_SIZE) memory pools are automatically sized.

PGA_AGGREGATE_TARGET

Specifies the target aggregate PGA memory available to all server processes attached to the instance.

PROCESSES

Sets the maximum number of processes that can be started by that instance. This is the most important primary parameter to set, because many other parameter values are deduced from this.

SESSIONS

This is set by default from the value of processes. However, if you are using the shared server, then the deduced value is likely to be insufficient.

UNDO_MANAGEMENT

Specifies the undo space management mode used by Oracle Database. The default value is AUTO. If unspecified, AUTO will be used.

UNDO_TABLESPACE

Specifies the undo tablespace to be used when an instance starts up.

Oracle initializatoin parameters

V$INSTANCE_RECOVERY

V$INSTANCE_RECOVERY monitors the mechanisms available to users to limit recovery I/O. Those mechanisms are:

  • Set the LOG_CHECKPOINT_TIMEOUT initialization parameter
  • Set the LOG_CHECKPOINT_INTERVAL initialization parameter
  • Set the FAST_START_MTTR_TARGET initialization parameter
  • Set the size of the smallest redo log

Column

Datatype

Description

RECOVERY_ESTIMATED_IOS

NUMBER

Number of dirty buffers in the buffer cache. In the Standard Edition, this column is always null.

ACTUAL_REDO_BLKS

NUMBER

Current actual number of redo blocks required for recovery

TARGET_REDO_BLKS

NUMBER

Current target number of redo blocks that must be processed for recovery. This value is the minimum value of the following 3 columns, and identifies which of the 3 user-defined limits determines checkpointing.

LOG_FILE_SIZE_REDO_BLKS

NUMBER

Maximum number of redo blocks required to guarantee that a log switch does not occur before the checkpoint completes.

LOG_CHKPT_TIMEOUT_REDO_BLKS

NUMBER

Number of redo blocks that need to be processed during recovery to satisfy the LOG_CHECKPOINT_TIMEOUT parameter. The value displayed is not meaningful unless that parameter has been set.

LOG_CHKPT_INTERVAL_REDO_BLKS

NUMBER

Number of redo blocks that need to be processed during recovery to satisfy the LOG_CHECKPOINT_INTERVAL parameter. The value displayed is not meaningful unless that parameter has been set.

FAST_START_IO_TARGET_REDO_BLKS

NUMBER

This column is obsolete and maintained for backward compatibility. The value of this column is always null.

TARGET_MTTR

NUMBER

Effective MTTR (mean time to recover) target value in seconds. The TARGET_MTTR value is calculated based on the value of the FAST_START_MTTR_TARGET parameter (the TARGET_MTTR value is used internally), and is usually an approximation of the parameter's value. However, if the FAST_START_MTTR_TARGET parameter value is very small (for example, one second), or very large (for example, 3600 seconds), the calculation will produce a target value dictated by system limitations. In such cases, the TARGET_MTTR value will be the shortest calculated time, or the longest calculated time that recovery is expected to take.

If FAST_START_MTTR_TARGET is not specified, the value of this field is the current estimated MTTR.

ESTIMATED_MTTR

NUMBER

Current estimated mean time to recover (MTTR) based on the number of dirty buffers and log blocks (0 if FAST_START_MTTR_TARGET is not specified). Basically, this value tells you how long you could expect recovery to take based on the work your system is doing right now.

CKPT_BLOCK_WRITES

NUMBER

Number of blocks written by checkpoint writes

OPTIMAL_LOGFILE_SIZE

NUMBER

Redo log file size (in megabytes) that is considered optimal based on the current setting of FAST_START_MTTR_TARGET. It is recommended that the user configure all online redo logs to be at least this value. Note that redo log files must be at least 4 megabytes in size; otherwise an error is generated.

ESTD_CLUSTER_AVAILABLE_TIME

NUMBER

Estimated time (in seconds) that the cluster would become partially available should this instance fail. This column is only meaningful in a Real Application Clusters (RAC) environment. In a non-RAC environment, the value of this column is null.

WRITES_MTTR

NUMBER

Number of writes driven by the FAST_START_MTTR_TARGET initialization parameter

WRITES_LOGFILE_SIZE

NUMBER

Number of writes driven by the smallest redo log file size

WRITES_LOG_CHECKPOINT_SETTINGS

NUMBER

Number of writes driven by the LOG_CHECKPOINT_INTERVAL or LOG_CHECKPOINT_TIMEOUT initialization parameter

WRITES_OTHER_SETTINGS

NUMBER

Number of writes driven by other reasons (such as the deprecated FAST_START_IO_TARGET initialization parameter)

WRITES_AUTOTUNE

NUMBER

Number of writes due to auto-tune checkpointing

WRITES_FULL_THREAD_CKPT

NUMBER

Number of writes due to full thread checkpoints

Note:

1. The optimal size of redo log files can be obtained by querying OPTIMAL_LOGFILE_SIZE.

Oracle dynamic performance views

Oracle data dictionary views