Start a Conversation

Unsolved

This post is more than 5 years old

2213

January 15th, 2012 19:00

Does LGWR use synchronous IO or Asynchronous IO?

Does LGWR use AIO after AIO enabled on instance? If so I believe performance is expected, but how about data consistency when failure happened?

Thanks,

Eddy

161 Posts

January 15th, 2012 19:00

Not much experience on LGWR for me. Have you ever tried Internal Oracle DL to trigger answeres?

63 Posts

January 16th, 2012 03:00

Eddy

lgwr can use async io once disk_async_io/filesystem_io parameters are set .

log writer async  can be disabled by a hidden parameter.

Here is an older but still relevant explanation.

http://kevinclosson.wordpress.com/2007/07/21/manly-men-only-use-solid-state-disk-for-redo-logging-lgwr-io-is-simple-but-not-lgwr-processing/

RE: data consistency - the database writer (dbwr) only writes the data blocks  after lgwr writes.This is known as "write ahead logging"

In the event of a database crash, the committed changes written to the redo logs, but not yet committed to the datafiles, are applied to bring the database to a consistent state.

I would suggest that you start with the Oracle Concepts or "2 Day DBA" manuals to familiarise your with the database.

https://community.emc.com/docs/DOC-13648

Allan

225 Posts

January 28th, 2012 23:00

Allan, thanks for your information.

The following is my finding, appreciated your comments.

The hidden parameter, lgwrasync_io, is discontinued on 11R2, therefor AIO of lgwr is only decided with disk_asynch_io and filesystemio_options, so a database is enabled with AIO, the lgwr is AIO too.

I think in this situation, a database crash might happen between a transaction commitment and ack of lgwr AIO, that might cause data lose.

Eddy

63 Posts

January 30th, 2012 01:00

Eddy

You should pass your finding on to Oracle immediately. They may have overlooked this fundamental in their 30 odd years of rdbms developement. Be sure to include trace files and an explanation of how this occurred.

That is not to say that there are no lgwr/redo bugs or issues and I would suggest that you get an understanding of Oracle databases before you jump in at the deep end.

Allan

5 Practitioner

 • 

274.2K Posts

January 30th, 2012 15:00

If LGWR has less to write than the maximum transferable (set by the port) then it makes no sense for LGWR to issue async I/O. LGWR has nothing to do while waiting for redo log I/O. Async comes into play when the amount to flush (in the log buffer) is greater than the port-defined max for a single LGWR I/O (most ports 128KB). In this case LGWR will break up the payload and issue max-sized writes (and perhaps a small remainder I/O) then poll for completions.

No Events found!

Top