Study OracleIMU and RedoPrivateStrands In the undo Series

Source: Internet
Author: User
In the traditional undo management mode, oracle treats undo and datablock equally. There are roughly three drawbacks: 1) at the beginning of the transaction, the segment header that stores the transaction table is not in the memory.

In the traditional undo management mode, oracle treats undo and data block equally. There are roughly three drawbacks: 1) at the beginning of the transaction, the segment header that stores the transaction table is not in the memory.

In the traditional undo management mode, Oracle treats undo and data block equally. There are three drawbacks:

1) at the beginning of the transaction, the segment header for storing the transaction table is not in memory, and the server process needs to import this I/o

2) rollback blocks that store old values are not in memory

3) During rollback or CR reading, the required rollback blocks are written to the disk by DBWn. oracle also needs to write this I/o, which may generate a large number of consistent gets and physical reads.

As a result, we know that undo will generate redo and write undo segment, which may generate a large amount of I/O. Undo is also expensive.

New 10g feature: IMU Mechanism

IMU allocates an IMU pool in the shared pool to cache rollback blocks. Each new transaction is allocated an IMU buffer (private). A buffer contains many nodes, and a node is equivalent to a block (rollback block ). There are roughly two advantages:

1) Improve CR read Speed

2) reduce I/O

You can use v $ sysstat to check whether IMU is enabled in oracle:

We can also use v $ sgastat to query the current allocated IMU memory:

If IMU commits and IMU Flushes keep growing, it indicates that oracle is using IMU.

The traditional undo Management diagram is as follows:

In IMU mode, undo information is still protected by redo, because instance recovery requires undo information to roll back uncommitted transactions, so that the database is in a consistent state. If redo does not protect undo, the database may be inconsistent once the instance crash occurs.

At the beginning of the transaction, the ITL will still be allocated in the data block header, and it will still point to the transaction table of the undo segment header, but the rollback block information does not need to be written immediately. At this time, the undo data is recorded in the IMU buffer, and this behavior is not protected by redo. In the following two cases, undo data is written to rollback blocks:

1) When IMU buffer space is insufficient, IMU flush will occur, and undo flush will be carried to the rollback block in database_buffer_cache.

2) When LGWR writes redo to redo log file, IMU commit will occur. It writes private redo strands to redo log file and writes IMU buffer to rollback block.

When the IMU buffer is flushed to the rollback block, oracle will merge the data to reduce the consumption of the rollback block and redo generation.

At the beginning of 10 Gb, a private redo buffer will be allocated in the shared pool, and the redo generated by each transaction will be placed here

With the private redo strands mechanism, logs generated for the IMU buffer are directly recorded in the shared pool.

Note: In RAC and streams, IMU defaults to false!

IMU and Redo Private Strands are simulated based on the relationship between redo log buffer and database_buffer_cache. His biggest concern lies in the processing of rollback blocks.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.