Understanding the IMU problem of Redo (10)

Source: Internet
Author: User

First look at a phenomenon:

 
19:33:31 HR @ orcl (^ ω ^) Select name, value19: 33: 59 2 from V $ mystat A, V $ statname B19: 33: 59 3 where. statistic # = B. statistic #19:33:59 4 and B. name = 'redo size' 19: 33: 59 5/name value ---------- redo size 108419: 34: 01 HR @ orcl (^ ω ^) insert into T1 values (112, 'aoqinqin'); 1 line has been created. 19:36:54 HR @ orcl (^ ω ^) Select name, value19: 37: 08 2 from V $ mystat A, V $ statname B19: 37: 08 3 where. statistic # = B. statistic #19:37:08 4 and B. name = 'redo size' 19: 37: 08 5/name value ---------- redo size 108419: 37: 12 Hr @ orcl (^ ω ^) commit; the submission is complete. 19:37:53 HR @ orcl (^ ω ^) Select name, value19: 38: 13 2 from V $ mystat A, V $ statname B19: 38: 13 3 where. statistic # = B. statistic #19:38:13 4 and B. name = 'redo size' 19: 38: 14 5/name value ---------- -------- redo size 1632

The above phenomenon, only when commit or flush IMU, the redo size will be immediate.

 

This is a new feature of oracle after 10 GB: IMU. Redo is first placed in the Shared Pool. When commit is used, the log buffer is passed in. The redo statistics of Oracle will only increase when logs are transferred into the log buffer. This aims to reduce the number of data transfers to the log buffer and reduce the competition for latch related to the log buffer.

 

The private redo strand function is imported to store the redo created by the process in the private strand area of the Shared Pool, instead of the PGA, the redo logs stored in the private strand region can be directly recorded to the log file without going through the redo log buffer. The PGA region does not need to redo the replication process of the log buffer, this function is called "zero copy redo ". Set the hidden parameter _ log_private_parallelism to true.
The private strand function is activated. This parameter should be used to control the zero-copy redo feature, and is used to control the number of private strands used for zero-copy redo. It facilitates latch contention and undo management. For transactions that use private strand, you do not need to apply for redo copy latch or the redo allocation latch of shared Strand. Instead, the transactions are written to the disk in batches when flush or commit is used, therefore, the redo copy latch and redo allocation are reduced.
Latch application/release times, also reduces latch wait times, thus reducing the CPU load.

 

Zero-copy redo is a feature based on private strand. This feature must be enabled without enabling private strand and IMU. once the zero-copy redo feature is enabled, the log format in the memory will be recorded in the same format as the disk log, without the need to use additional resources to convert it, therefore, these log records can be directly written to the disk by the service process.

 

_ Log_private_parallelism is false by default. That is to say, Oracle does not use zero copy redo by default. That is to say, the format of redo record stored in private strand is the same as that in log buffer, at the same time, the server process cannot write the redo log file. (Server process can write private strand into redo only when zero-copy redo is enabled.
Log File, the redo record format is the same as the log file format on the disk ):

1) When commit/rollback is used, use re-designating to convert private space to non-private space, then, lgwr writes the redo record to the redo log file.
2) when the log file is switched, dbwn writes the redo record in the private strand to the log buffer, then, lgwr writes all redo records to the redo log file.

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.