wait events_ _log file sync and log file parallel write_ - oracle community

7
Search Sign Up Sign In Oracle Community The social network for Oracle people Main My Page Members Events Forum Blogs Groups Photos Videos More... All Blog Posts My Blog Add Wait Events: "Log File Sync and Log File Parallel Write" Posted by Victor Armbrust on December 16, 2012 at 4:30am View Blog In OLTP environments, one of the biggest performance problems is the excessive wait events for recordings Online Redo Log Files. Every time that Oracle Database waits for recordings in these files can observe events "Log File Sync 'and' Log File Parallel Write". What is the expected event 'log file sync'? Ads by Google ► Oracle ► Oracle SQL Tuning ► Oracle 10G OEM ► Oracle Trace Tool Wait Events: "Log File Sync and Log File Parallel Write" - Oracle Com... http://www.oraclecommunity.net/profiles/blogs/wait-events-log-file-sync... 1 of 7 4/3/2013 5:15 AM Print to PDF without this message by purchasing novaPDF (http://www.novapdf.com/)

Upload: alokmishra4533

Post on 22-Oct-2015

24 views

Category:

Documents


0 download

DESCRIPTION

oracle wait events

TRANSCRIPT

Page 1: Wait Events_ _Log File Sync and Log File Parallel Write_ - Oracle Community

Search

Sign UpSign In

Oracle Community

The social network for Oracle people

MainMy PageMembersEventsForumBlogsGroupsPhotosVideosMore...

All Blog PostsMy BlogAdd

Wait Events: "Log File Sync and Log File ParallelWrite"

Posted by Victor Armbrust on December 16, 2012 at 4:30amView Blog

In OLTP environments, one of the biggest performance problems is the excessive wait events for recordingsOnline Redo Log Files. Every time that Oracle Database waits for recordings in these files can observe events"Log File Sync 'and' Log File Parallel Write".

What is the expected event 'log file sync'?

Ads by Google ► Oracle ► Oracle SQL Tuning ► Oracle 10G OEM ► Oracle Trace Tool

Wait Events: "Log File Sync and Log File Parallel Write" - Oracle Com... http://www.oraclecommunity.net/profiles/blogs/wait-events-log-file-sync...

1 of 7 4/3/2013 5:15 AMPrint to PDF without this message by purchasing novaPDF (http://www.novapdf.com/)

Page 2: Wait Events_ _Log File Sync and Log File Parallel Write_ - Oracle Community

When a session of a user or application executes a COMMIT, the information stored in memory Redo(LOG_BUFFER) are discharged in the Online Redo Log Files to make permanent changes made in thedatabase. This process is executed by LOG WRITER (LGWR). When the LGWR process ends this recording, awarning is sent to the session stating that the COMMIT process is 100% complete.The time between the user session / application LGWR request the recording of redos Memory(LOG_BUFFER) for Online Redo Log Files and LGWR inform the meeting that the process was completed iswhere the event occurs 'log filesync'.

How to identify the event 'log file sync'?

To analyze and identify the event 'log file sync' can use the information to:- Reports of a period AWR timely collection.- Trace files of LGWR. These files can show many events waiting on 'log file parallel wait'

Events which occur Waiting 'log file sync'?

Events waiting to 'log file sync' can happen at any stage between the user session / application LGWR requestthe recording of redos Memory (LOG_BUFFER) for Online Redo Log Files and LGWR inform the session thatthe process was completed.

Performance of LGWR

The main question is "Is there any problem for Recording Performance in Online Redo Logs"?The steps below can help you find performance problems in the Log Writer (LGWR).

1 - Comparing the average waiting time for 'log file sync' with the average waiting time for 'log fileparallel write'

The event hopes to 'log file parallel write' occurs while LGWR is writing redo information on Online Redo LogFiles. The Total time of this event is the total recording time in disk files.Analyzing this event together with the event 'log file sync' can identify the total time consumption and I / Ocompletion of a cycle COMMIT.

Analyzing the information in an AWR report:

Wait Events: "Log File Sync and Log File Parallel Write" - Oracle Com... http://www.oraclecommunity.net/profiles/blogs/wait-events-log-file-sync...

2 of 7 4/3/2013 5:15 AMPrint to PDF without this message by purchasing novaPDF (http://www.novapdf.com/)

Page 3: Wait Events_ _Log File Sync and Log File Parallel Write_ - Oracle Community

In the above example, we can identify a very time-consuming and I / O (ms) for both events 'log file sync' and'log file parallel write'.The proportion of time between 'log file sync' and 'log file parallel write' suggests a problem of I / O (Waitingrecording redo from memory to disk).

If the time spent in waiting event 'log file parallel write' exceeds 20ms, the likelihood of a problem of I / O isgreat.

Recommendations- Check the filesystems where are the Redo Logs, and check possbilidade to optimize the performance of I / Othrough OS- Do not use RAID 5 for filesystems / disks where are the Redo Logs.- Ensure that there are other processes that can be recording information on the same disks where are the RedoLogs. Make sure that the disk has enough throughput for competition of these processes, or change the RedoLogs Filesystem.- Check if the parameter is not too large LOG_BUFFER. The higher the LOG_BUFFER the longer it takes forthe LGWR to write redo the changes to disk.

2 - Check the Traces of the Log Writer (LGWR)

Even if the average waiting time of the event 'log file parallel write' is normal, there may be peaks where thewriting of the redo logs is high in influence and then the event 'log file sync'.From version 10.2.0.4 are generated alert messages in the LGWR trace file when a process LGWR writing takeslonger than 500ms. This is a high threshold, but it is a way of identifying problems I / O. Messages are othersimilar to:

Recommendations

Wait Events: "Log File Sync and Log File Parallel Write" - Oracle Com... http://www.oraclecommunity.net/profiles/blogs/wait-events-log-file-sync...

3 of 7 4/3/2013 5:15 AMPrint to PDF without this message by purchasing novaPDF (http://www.novapdf.com/)

Page 4: Wait Events_ _Log File Sync and Log File Parallel Write_ - Oracle Community

- Check what else is running at the moment to identify gaps recording LGWR.

3 - Check if the size of Redo logs is EnoughAn operation 'log file sync' is run every time there is a switch of logfiles to ensure that all information in redoswere recorded before the next log starts. As a standard recommendation is that a log switch occurs every 15 or20 minutes. If the log switches occur in a shorter time, more often, then more wait events 'log file sync' willoccur, which means a longer waiting time between sessions.

- You can check the alert.log to check the switch logfile:

In the above switches can be checked every 2 to 4 minutes, which is 5x more frequently than desirable.- Another option is to check the average Log Switchs through AWR report:

In the example above 29.98 log switches occur every hour, which means about 2 log switches per minute. This isa value much higher than recommended (15 to 20 switches per minute).Recommendations- Increasing the size of Redo Log files.

4 - Excessive number of commits by Application

In this case the question is what to do: "The application is performing many commits?"If so, there may be performance issues, since the redo information are unloaded from memory (LOG_BUFFER)redo logs to disk.A simple way to identify this scenario is when the average wait for the event 'log file sync' is much larger thanaverage wait event "log file parallel write ', this shows that the longer the waiting is not for recording Disco redologs. The high CPU time can also show restraint caused by excessive commits.Another scenario is still where the average wait event "log file sync 'is low but the number of waits is high.One can compare the average 'User commits' with 'User calls':

Wait Events: "Log File Sync and Log File Parallel Write" - Oracle Com... http://www.oraclecommunity.net/profiles/blogs/wait-events-log-file-sync...

4 of 7 4/3/2013 5:15 AMPrint to PDF without this message by purchasing novaPDF (http://www.novapdf.com/)

Page 5: Wait Events_ _Log File Sync and Log File Parallel Write_ - Oracle Community

The above example could identify 5.76 'user calls' commit by what is considered 5x greater than recommended(1).

Recommendations:- If multiple commits in the application in a short time interval, or small call commits, it is recommended toexecute a block of larger changes before executing a commit. Ateração This should be done through theapplication.- Enabling Asynchronous Commit. (To learn how to enable this option, see the article:Changing behavior withtransactions in Oracle Database Asynchronous... )

Sources:

How to Minimise Waits for 'Log File Sync'? [MOS ID 857576.1]Troubleshooting: log file sync 'Waits [MOS ID 1376916.1]

Victor

Views: 274

Share Twitter Facebook

< Previous PostNext Post >

Comment

You need to be a member of Oracle Community to add comments!

Join Oracle Community

Welcome toOracle Community

Sign Upor Sign In

Or sign in with:

Wait Events: "Log File Sync and Log File Parallel Write" - Oracle Com... http://www.oraclecommunity.net/profiles/blogs/wait-events-log-file-sync...

5 of 7 4/3/2013 5:15 AMPrint to PDF without this message by purchasing novaPDF (http://www.novapdf.com/)

Page 6: Wait Events_ _Log File Sync and Log File Parallel Write_ - Oracle Community

Oracle Community On

TwitterFacebookLinkedInGoogle+Reddit

Oracle Blogosphere

Token Configurations in Oracle SOA Suite PS6 ( 11.1.1.7.0)

OPN Offers Free Test Fest at Collaborate 13

Service Bus PS6 (11.1.1.7) available for download

Oracle SQL Developer: What’s Next?

Get 100% ForexBonus Nowwww.hotforex.comIncrease Your TradingVolume by 100%. Openan Account for Free!

Google BusinessWebsitewww.indiagetonline.inEasily Create A WebsiteIn 15 Mins. Free FromGoogle To YourBusiness!

Planning To TaxSaving?avivaindia.com/Aviva-iGet Aviva i-Life TermPlan @ Low PremiumJust Rs.22*/day,ApplyNow!

Matrix SIM- FreeIncomingMatrix.in/InternationalUp To 85% Savings onInternational RoamingCharges. Know More!

Class VI - XOnlinewww.LearnNext.com/FAhead Of theCompetition. AnimatedLessons. Try Us ForBetter Grades!

Wait Events: "Log File Sync and Log File Parallel Write" - Oracle Com... http://www.oraclecommunity.net/profiles/blogs/wait-events-log-file-sync...

6 of 7 4/3/2013 5:15 AMPrint to PDF without this message by purchasing novaPDF (http://www.novapdf.com/)

Page 7: Wait Events_ _Log File Sync and Log File Parallel Write_ - Oracle Community

Don't Miss This! Top 5 Preparation Tips for Your Database Certification Exam, with Joel Goodman

Oracle R12 Webcast – Requisition Imported from other Modules (WIP, OM, …) – April 23, 2013

Oracle R12 WEBCAST: Budgetary Control in Purchasing – April 9, 2013

Ignoring hints

InFact Group closes a Fusion CRM deal at a German Beverage Trade company

New York Coherence SIG on April 10th

Fixing ORA-19384 from DBMS_SQLTUNE.PACK_STGTAB_SQLSET on SQLT

COLLABORATE 13 à la Pythian …

OTN has links to two of my blog posts

European Safety Requirement Software on the NetBeans Platform

ADF Mobile - integrating with device features

Badge

Get Badge

© 2013 Created by Eddie Awad.

Badges | Report an Issue | Terms of Service

Wait Events: "Log File Sync and Log File Parallel Write" - Oracle Com... http://www.oraclecommunity.net/profiles/blogs/wait-events-log-file-sync...

7 of 7 4/3/2013 5:15 AMPrint to PDF without this message by purchasing novaPDF (http://www.novapdf.com/)