Fast-Start On-Demand Rollback&Fast-Start Parallel Rollback

来源:互联网 发布:上海社会科学院 知乎 编辑:程序博客网 时间:2024/05/29 21:17

During the second phase of instance recovery, Oracle rolls back uncommitted transactions. Oracle uses two features, fast-start on-demand rollback and fast-start parallel rollback, to increase the efficiency of this recovery phase.


Note:

These features are part of fast-start fault recovery and are only available in the Oracle9i Enterprise Edition.


Oracle9i Database Performance Tuning Guide and Reference
Release 2 (9.2)
Part Number A96533-02

Chapter 17 Configuring Instance Recovery Performance

[@more@]

Using Fast-Start On-Demand Rollback

Using the fast-start on-demand rollback feature, Oracle automatically allows new transactions to begin as soon as the database opens, which is usually a very short time after cache recovery completes. If a user attempts to access a row that is locked by a terminated transaction, Oracle rolls back only those changes necessary to complete the transaction; in other words, it rolls them back on demand. Consequently, new transactions do not have to wait until all parts of a long transaction are rolled back.


Note:

Oracle does this automatically. You do not need to set any parameters or issue statements to use this feature.


Using Fast-Start Parallel Rollback

In fast-start parallel rollback, the background process SMON acts as a coordinator and rolls back a set of transactions in parallel using multiple server processes. Essentially, fast-start parallel rollback is to transaction recovery what parallel recovery is to cache recovery.

Fast-start parallel rollback is mainly useful when a system has transactions that run a long time before committing, especially parallel INSERT,UPDATE, and DELETE operations. SMON automatically decides when to begin parallel rollback and disperses the work among several parallel processes: process one rolls back one transaction, process two rolls back a second transaction, and so on.

One special form of fast-start parallel rollback is intra-transaction recovery. In intra-transaction recovery, a single transaction is divided among several processes. For example, assume eight transactions require recovery with one parallel process assigned to each transaction. The transactions are all similar in size except for transaction five, which is quite large. This means it takes longer for one process to roll this transaction back than for the other processes to roll back their transactions.

In this situation, Oracle automatically begins intra-transaction recovery by dispersing transaction five among the processes: process one takes one part, process two takes another part, and so on.

You control the number of processes involved in transaction recovery by setting the initialization parameter FAST_START_PARALLEL_ROLLBACK to one of three values listed in Table 17-4.

Table 17-4 FAST_START_PARALLEL_ROLLBACK Parameter Values
ValueMeaning

FALSE

Turns off fast-start parallel rollback.

LOW

Specifies that the number of recovery servers cannot exceed twice the value of the CPU_COUNT initialization parameter.

HIGH

Specifies that the number of recovery servers cannot exceed four times the value of the CPU_COUNT initialization parameter.

Parallel Rollback in an Oracle Real Application Clusters Configuration

In Oracle Real Application Clusters, you can perform fast-start parallel rollback on each instance. Within each instance, you can perform parallel rollback on transactions that are:

  • Online on a given instance
  • Offline and not being recovered on instances other than the given instance

After a rollback segment is online for a given instance, only this instance can perform parallel rollback on transactions on that segment.

Monitoring Progress of Fast-Start Parallel Rollback

Monitor the progress of fast-start parallel rollback by examining the V$FAST_START_SERVERS and V$FAST_START_TRANSACTIONS views. V$FAST_START_SERVERSprovides information about all recovery processes performing fast-start parallel rollback. V$FAST_START_TRANSACTIONS contains data about the progress of the transactions.


0 0
原创粉丝点击