Here's
a simplified version of what's going on:
- Your
session does "commit"
- It
is now waiting on "log file sync"
- Now
LGWR must flush the redo buffer to disk
- The
I/O time for this will be "log file parallel write"
- Now
LGWR is done, your session is notified
- Your
session is back running again
1)
committing takes too long
Check
'log file parallel write'. If that's a large percentage of the 'log file sync'
time, then you might have an I/O performance issue. Redo writes should be expected
to be 1ms or less on modern hardware.
2)
committing too frequently
(Roughly
speaking) when one person commits, "everyone" else wanting to commit
waits on 'log file sync'. If your application commits excessively, this delay
can mount up. But also note - this can mean that 'log file sync' is high on
your list of waits, but not necessarily a problem that needs to be fixed.
3)
resource pressure
If the
server is overloaded (in particular on CPU), the lgwr process can struggle for
resources, which slows it down...which slows all commits down.
No comments:
Post a Comment