Log file switch and log file sync

Source: Internet
Author: User

Log file switch and log file sync 10.3.15 log file switchThere are two wait events commonly encountered: log file switch (archiving needed) log file switch (checkpoint incomplete) In both of the events, the LGWR is unable to switch into the next online redo log, and all the commit requests wait for this event.10.3.15.1 ActionsFor the log file switch (archiving needed) event, examine why the archiver is unable to archive the logs in a timely fashion. it cocould be due to the following: Archive destination is running out of free space. archiver is not able to read redo logs fast enough (contention with the LGWR ). archiver is not able to write fast enough (contention on the archive destination, or not enough ARCH processes ). if you have ruled out other possibilities (such as slow disks or a full archive destination) consider increasing the number of ARCn processes. the default is 2.If you have mandatory remote shipped archive logs, check whether this process is slowing down because of network delays or the write is not completing because of errors. depending on the nature of bottleneck, you might need to redistribute I/O or add more space to the archive destination to alleviate the problem. for the logfile switch (checkpoint incomplete) event: Check if DBWR is slow, possibly due to an overloaded or slow I/O system. check the DBWR write times, check the I/O system, and distribute I/O if necessary. see Chapter 8, "I/O Configuration and Design ". check if there are too few, or too small redo logs. if you have a few redo logs or small redo logs (for example two x 100 k logs ), and your system produces enough redo to cycle through all of the logs before DBWR has been able to complete the checkpoint, then increase the size or number of redo logs. see "Sizing Redo Log Files ". 10.3.16 log file syncWhen a user session commits (or rolls back), the session's redo information must be flushed to the redo logfile by LGWR. the server process implements Ming theCOMMIT or ROLLBACK waits under this event for the write to the redo log to complete. actionsIf this event's waits constitute a significant wait on the system or a significant amount of time waited by a user experiencing response time issues or on a system, then examine the average time waited. if the average time waited is low, but the number of waits are high, then the application might be committing after every INSERT, rather than batching COMMITs. applications can reduce the wait by committing after 50 rows, rather than every row. if the average time waited is high, then examine the session waits for the log writer and see what it is spending most of its time doing and waiting. if the waits are because of slow I/O, then try the following: Reduce other I/O activity on the disks containing the redo logs, or use dedicated disks. alternate redo logs on different disks to minimize the effect of the archiver on the log writer. move the redo logs to faster disks or a faster I/O subsystem (for example, switch from RAID 5 to RAID 1 ). consider using raw devices (or simulated raw devices provided by disk vendors) to speed up the writes. depending on the type of application, it might be possible to batch COMMITs by committing every N rows, rather than every row, so that fewer log file syncs are needed.

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.