Beruflich Dokumente
Kultur Dokumente
FAST_START_MTTR_TARGET
LOG_CHECKPOINT_INTERVAL
LOG_CHECKPOINT_TIMEOUT
LOG_CHECKPOINTS_TO_ALERT
It also explains how to interpret and handle checkpoint errors: 'Checkpoint not Complete' and
'Cannot Allocate New Log' reported in the ALERT<sid>.LOG file.
Contents:
1. What is a Checkpoint?
2. Checkpoints and Performance
3. Parameters related to incremental checkpointing
4. Redo logs and Checkpoint
5. Understanding Checkpoint Error messages ("Cannot allocate new log" and "Checkpoint not
complete")
6. Oracle Release Information
7. Using Statspack to determine Checkpointing Problems
FAST_START_MTTR_TARGET
LOG_CHECKPOINT_INTERVAL
LOG_CHECKPOINT_TIMEOUT
LOG_CHECKPOINTS_TO_ALERT
FAST_START_MTTR_TARGET
Since Oracle 9i FAST_START_MTTR_TARGET parameter is the preferred method
of tuning incremental checkpoint target. FAST_START_MTTR_TARGET enables you
to specify the number of seconds the database takes to perform crash recovery
of a single instance. Based on internal statistics, incremental checkpoint
automatically adjusts the checkpoint target to meet the requirement of
FAST_START_MTTR_TARGET.
V$INSTANCE_RECOVERY.ESTIMATED_MTTR shows the current estimated mean
time to
recover (MTTR) in seconds. This value is shown even if
FAST_START_MTTR_TARGET
is not specified.
V$INSTANCE_RECOVERY.TARGET_MTTR shows the effective MTTR target in
seconds
enforced by the system.
V$MTTR_TARGET_ADVICE shows the number of I/Os resulted by the current
workload
under the current MTTR setting and the estimated number of I/Os that would be
resulted by the current workload under other MTTR settings. This view helps
the user to assess the trade-off between runtime performance and setting
FAST_START_MTTR_TARGET to achieve better recovery time.
LOG_CHECKPOINT_INTERVAL
LOG_CHECKPOINT_INTERVAL parameter specifies the maximum number of redo
blocks
the incremental checkpoint target should lag the current log tail.
If FAST_START_MTTR_TARGET is specified, LOG_CHECKPOINT_INTERVAL
should not
be set or set to 0.
On most Unix systems the operating system block size is 512 bytes.
This means that setting LOG_CHECKPOINT_INTERVAL to a value of 10,000 would
mean the incremental checkpoint target should not lag the current log tail
by more than 5,120,000 (5M) bytes. . If the size of your redo log is 20M, you are taking
4
checkpoints for each log.
LOG_CHECKPOINT_INTERVAL influences when a checkpoint occurs, which means
careful attention should be given to the setting of this parameter, keeping it
updated as the size of the redo log files is changed. The checkpoint
frequency is one of the factors which impacts the time required for the
database to recover from an unexpected failure. Longer intervals between
checkpoints mean that if the system crashes, more time will be needed for the
database to recover. Shorter checkpoint intervals mean that the database will
recover more quickly, at the expense of increased resource utilization during
the checkpoint operation.
This parameter also impacts the time required to complete a database recovery
operation during the roll forward phase of recovery. The actual recovery time
is dependent upon this time, and other factors, such as the type of failure
(instance or system crash, media failure, etc.), and the number of archived
redo logs which need to be applied.
LOG_CHECKPOINT_TIMEOUT
The LOG_CHECKPOINT_TIMEOUT parameter specifies the maximum number of
seconds
the incremental checkpoint target should lag the current log tail.
In another word, it specifies how long a dirty buffer in buffer cache can
remain dirty.
Checkpoint frequency impacts the time required for the
database to recover from an unexpected failure. Longer intervals between
checkpoints mean that more time will be required during database recovery.
LOG_CHECKPOINTS_TO_ALERT
LOG_CHECKPOINTS_TO_ALERT lets you log your checkpoints to the alert file.
Doing so is useful for determining whether checkpoints are occurring at
the desired frequency.
Prior to Oracle9i this parameter was STATIC.
Oracle generally advises this be set to TRUE as the overhead is
negligible but the information in the alert log may be useful.
See Note:76713.1 to have more detail on How those instance parameters can influence
the checkpoint.
Having your log files too small can increase checkpoint activity and reduce performance.
Oracle recommends the user to set all online log files to be the same size,
and have at least two log groups per thread. The alert log is a valuabletool for
monitoring the rate that log switches occur, and subsequently, checkpoints
occur.
The following is an example of quick log switches
from the alert log:
Fri May 16 17:15:43 1997
Thread 1 advanced to log sequence 1272
Current log# 3 seq# 1272 mem# 0: /prod1/oradata/logs/redologs03.log
Thread 1 advanced to log sequence 1273
Current log# 1 seq# 1273 mem# 0: /prod1/oradata/logs/redologs01.log
Fri May 16 17:17:25 1997
Thread 1 advanced to log sequence 1274
Current log# 2 seq# 1274 mem# 0: /prod1/oradata/logs/redologs02.log
Thread 1 advanced to log sequence 1275
Current log# 3 seq# 1275 mem# 0: /prod1/oradata/logs/redologs03.log
Fri May 16 17:20:51 1997
Thread 1 advanced to log sequence 1276
Current log# 1 seq# 1276 mem# 0: /prod1/oradata/logs/redologs01.log
If redo logs switch every 3 minutes, you will see performance degradation.
This indicates the redo logs are not sized large enough to efficiently handle
the transaction load.
See Note:1038851.6 for further detail on how to estimate an adequate size of the redolog files.
See Note:1035935.6 Example of How To Resize the Online Redo Logfiles
5. Understanding Checkpoint Error messages (Cannot allocate new log and
Checkpoint not complete)
Sometimes, you can see in your alert.log file, the following corresponding
messages:
Thread 1 advanced to log sequence 248
Current log# 2 seq# 248 mem# 0: /prod1/oradata/logs/redologs02.log
Thread 1 cannot allocate new log, sequence 249
Checkpoint not complete
This message indicates that Oracle wants to reuse a redo log file, but
the current checkpoint position is still in that log. In this case, Oracle must
wait until the checkpoint position passes that log. Because the
incremental checkpoint target never lags the current log tail by more than 90%
of the smallest log file size, this situation may be encountered if DBWR writes
too slowly, or if a log switch happens before the log is completely full,
or if log file sizes are too small.
When the database waits on checkpoints,redo generation is stopped until the
log switch is done.