Four Conditions for Oracle to trigger redo writing

Source: Internet
Author: User

When lgwr is idle, it depends on the rdbms rpc message wait event and is in sleep state until three seconds. If lgwr finds that redo information needs to be written, then lgwr will execute the write operation, and the log file parallel write wait event will appear.

Summarize the trigger conditions for redo writing:

  1, Timeout every three seconds(Timeout):

When lgwr is idle, it depends on the rdbms rpc message wait event and is in sleep state until three seconds. If lgwr finds that redo information needs to be written, then lgwr will execute the write operation, and the log file parallel write wait event will appear.

 

  2.Threshold reached:

Redo log buffer is 1/3 full;

Redo log buffer has 1 MB of dirty data;

It is very important to set the parameter _ log_io_size, which is generally 1/3 of the size of log_buffer.

 

  3.User submission:

When a transaction is submitted, a commit flag is recorded in the redo stream. Before these redo logs are written to the disk, the transaction cannot be restored. Therefore, before the success mark is returned for transaction, the lgwr write must be completed. The process notifies lgwr to write and starts to sleep with the log file sync event. The timeout value is 1 second.

 

  4.InDbwnBefore writing:

If the High RBA of the data to be written by dbwr exceeds the on-disk RBA of lgwr, dbwr notifies lgwr to perform the write operation. Before Oracle8i, dbwr will wait for the log file sync event. Starting from Oracle8i, dbwr puts these blocks (the High RBA of the block to be written exceeds the on-disk RBA of lgwr) into the defer queue and notifies lgwr to execute redo writing.

Note: The log buffer space wait event indicates that the log buffer space is insufficient.

Related Article

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.