Log buffer must be refreshed for persistent Storage

Source: Internet
Author: User

Log buffering must be refreshed to ensure that the committed transactions are completely persistent. If you care more about performance than persistence, you can modify the innodb_flush_log_at_trx_commit variable to control the frequency of log buffering, possible settings are as follows:

0. Write the log buffer to the log file and refresh it every second, but do not do anything when the transaction is committed.

1. Write the log buffer to the log file and refresh the transaction to persistent storage every time it is committed. This is the default (and safest) setting, this setting ensures that no committed transactions are lost unless the disk or operating system is "pseudo" refreshed.

2. When each commit is performed, the log buffer is written to the log file, but it is not refreshed. InnoDB refresh every second. If the MySQL process crashes, 2 will not lose any transactions, if the entire server is down or powered off, some transactions will still be lost.

 

It is important to write the log buffer to the log file and refresh the log to the persistent storage.

In most operating systems, writing the buffer to logs simply transfers the data from the InnoDB memory buffer to the Operating System Buffer, which is also in the memory, data is not written to persistent storage.

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.