Explain IMU in Oracle

Source: Internet
Author: User
1. Overview of new features of Oracle10gInMemoryUndo, the pre-created image will be created in the Buffer, and the corresponding Redo will be recorded. Then the Undo data will also be written to the UNDOSEGMENT. When consistent reading or rollback is performed,

1. Overview of new features of Oracle 10g InMemory Undo, the pre-created image will be created in the Buffer, and the corresponding Redo will be recorded. Then the Undo data will also be written to the undo segment. When consistent reading or rollback is performed,

1. Overview


New Features of Oracle 10g InMemory Undo:

From the previous introduction, we can know that the Undo management method is the same as the conventional data management method. when data is modified, a pre-created image is created in the Buffer, at the same time, the corresponding Redo will be recorded, and the Undo data will also be written to the undo segment. When performing consistent read or rollback, a large number of consistentgets and physical reads may be generated. Note that Undo will generate Redo information, write undo segment, and possibly generate a large number of read I/O operations, which are resource-intensive operations. If you can reduce the Redo and Undo writes of Undo in these processes, it can obviously greatly improve database performance and reduce resource consumption and usage.

Oracle introduced the In Memory Undo (IMU) technology In the database starting from Oracle10g. With this technology, the database will be In the Shared Memory (Shared Pool) the independent memory area is used to store Undo information, so that the read and write operations of Undo information in the Buffer Cache can be avoided, and the Redo generation can be further reduced, in addition, the previous undo segment operations can be greatly reduced. Data in IMU can also be written into rollback segments after being saved, sorted, and shrunk. Such writing improves the performance of sequential and batch writing.

The IMU mechanism is closely related to the PVRS mentioned in the preceding log, because the size of each IMU Buffer is 64 ~ About kb, so only specific small transactions can be used. Each transaction will be bound to an independent idle IMU Buffer, and related Redo information will be written to PVRS, similarly, each IMU Buffer is protected by an independent In Memory Undo Latch. When IMU Buffer or PVRS is fully written, the database needs to write information In IMU.

A new implicit parameter can control whether this feature is enabled. this parameter is _ in_memory_undo, in Oracle 10 Gb, the default value of this parameter is TRUE (the initial setting of parameters may be different for different versions and platforms ):

Sys @ TQGZS> @ GetHidPar. SQL
Enter value for par: _ in_memory_undo
Old 4: AND x. ksppinm LIKE '% & par %'
New 4: AND x. ksppinm LIKE '% _ in_memory_undo %'
NAME VALUE DESCRIB
--------------------------------------------------------------------------------------------------------------
_ In_memory_undo TRUE Make in memory undo for top level transactions

IMU memory is allocated in the Shared Pool. Let's look back at the memory usage and functions of the Redo Log Buffer. In fact, IMU technology also references the Log Buffer mechanism to some extent, you can use the following query to obtain the currently allocated IMU memory:

Sys @ TQGZS> select * from v $ sgastat where name = 'kti-UNDO ';
POOL NAME BYTES
----------------------------------------------------
Shared pool KTI-UNDO 1235304

By default, three In Memory Undo pools are allocated to provide better concurrency:

Sys @ TQGZS> @ GetHidPar. SQL
Enter value for par: _ imu_pool
Old 4: AND x. ksppinm LIKE '% & par %'
New 4: AND x. ksppinm LIKE '% _ imu_pool %'
NAME VALUE DESCRIB
--------------------------------------------------------------------------------------------------------------
_ Imu_pools 3 in memory undo pools

IMU usage information, such as the number of submissions, can be queried through the V $ SYSSTAT View:

Sys @ TQGZS> select name, value from v $ sysstat where name like '% commits ';
NAME VALUE
-------------------------------------------
Usercommits 2877
IMUcommits 1549

The new Memory Buffer is protected by In Memory Undo Latch:

Sys @ TQGZS> select name, gets, misses, immediate_gets, sleeps
2 from v $ latch_children where name like '% undo latch ';
Name gets misses IMMEDIATE_GETS SLEEPS
--------------------------------------------------------------------------
In memory undolatch 0 0 0 0
In memory undolatch 0 0 0 0
In memory undolatch 0 0 0 0
In memory undolatch 0 0 0 0
In memory undolatch 0 0 0 0
In memory undo latch 0 0 0 0
In memory undolatch 0 0 0 0
In memory undolatch 0 0 0 0
In memory undolatch 0 0 0 0
In memory undolatch 0 0 0 0
In memory undolatch 0 0 0 0
In memory undolatch 0 0 0 0
In memory undolatch 0 0 0 0
In memory undolatch 4 0 2 0
In memory undolatch 214 0 25 0
In memory undolatch 6118 0 3064 0
In memory undolatch 4230 0 1084 0
In memory undolatch 39583 0 2842 0
18 rows selected.

In addition to the above mentioned, there are several implicit parameters related to IMU:
· _ Recursive_imu_transactions: controls whether recursive transactions use IMU. The default value of this parameter is False;

Sys @ TQGZS> @ GetHidPar. SQL
Enter value for par: _ recursive_imu_transactions
Old 4: AND x. ksppinm LIKE '% & par %'
New 4: AND x. ksppinm LIKE '% _ recursive_imu_transactions %'
NAME VALUE DESCRIB
--------------------------------------------------------------------------------------------------------------
_ Recursive_imu_transactions FALSE recursive transactions may be IMU

· _ Db_writer_flush_imu: determines whether to allow DBWR to downgrade an IMU transaction to a regular transaction and execute the undo segment write operation. The default value is TRUE.

Sys @ TQGZS> @ GetHidPar. SQL
Enter value for par: _ db_writer_flush_imu
Old 4: AND x. ksppinm LIKE '% & par %'
New 4: AND x. ksppinm LIKE '% _ db_writer_flush_imu %'
NAME VALUE DESCRIB
--------------------------------------------------------------------------------------------------------------
_ Db_writer_flush_imu TRUE If FALSE, DBWR will not downgrade IMU txns for AGING

In addition, IMU is not supported in the RAC environment.

With the continuous evolution of Oracle technology in different versions, the memory management of Oracle is already quite different from the previous ones. Currently, the Buffer Cache, Shared Pool, and Log Buffer contents are constantly being exchanged and penetrated, redo and Undo data can be partially stored in the Shared Pool, and the Oracle 11g Result Cache is also recorded in the Shared Pool.

-The End-

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.