This discussion is archived
2 Replies Latest reply: Jan 23, 2013 1:03 AM by Ron Assa RSS

'log file sync' and Commits

Ron Assa Newbie
Currently Being Moderated
Hi all,

There something i am trying to figure out, maybe you guys can help me with that.

When a user session commit he is waiting on 'log file sync' untill LGWR sends the message back to user session after writing log buffer content into redo log file.

As far as i understand this is serialize operation(one at a time).

So how come i have 7 ms average 'log file sync' wait time and i can still perform 200 commits per sec ?

7 ms * 200 waits = 1400ms = 1.4 sec
  • 1. Re: 'log file sync' and Commits
    Jonathan Lewis Oracle ACE Director
    Currently Being Moderated
    Ron Assa wrote:

    When a user session commit he is waiting on 'log file sync' untill LGWR sends the message back to user session after writing log buffer content into redo log file.

    As far as i understand this is serialize operation(one at a time).

    So how come i have 7 ms average 'log file sync' wait time and i can still perform 200 commits per sec ?

    7 ms * 200 waits = 1400ms = 1.4 sec
    Roughly speaking:

    If 20 sessions issue a commit simultaneously, LGWR will get (at least) one message that wakes it up to do a write. It will check the current high-water mark in the log buffer and (ignoring any details about holes and multiple log buffers) it will write as much of the log buffer as it can up to roughly that point. It may then detect that it has written all the log needed by all 20 of the waiting sessions, and signal them all that they can resume. This effect of this mechanism is know informally as the "piggyback commit".

    If you want to know more about this sort of thing, I wrote a book about it

    Regards
    Jonathan Lewis
  • 2. Re: 'log file sync' and Commits
    Ron Assa Newbie
    Currently Being Moderated
    Thanks a lot, very helpful.

Legend

  • Correct Answers - 10 points
  • Helpful Answers - 5 points