DataGuard wait events have changed in 12c

DataGuard wait events have changed in 12c:



There are several new features in 12c about Data Guard: cascaded standby, far sync instance. But there are also some architecture changes: new processes and new wait events.
Here is an example of an AWR report of a LogXptMode=’SYNC’ DataGuard configuration in 11g – which means that the log_archive_dest is defined with: ‘LGWR SYNC AFFIRM’
That report comes from a period of time where the primary database was stuck because the standby server had a problem. It’s 11.2.0.2 and the foreground events show that the user sessions are waiting on LGWR:

11g Top 5 Timed Foreground Events

EVENTWAITSTIME(S)AVG WAIT (MS)% DB TIMEWAIT CLASS
log file sync17,00221,113124246.08Commit
log buffer space1,3228,583649318.73Configuration
buffer busy waits1,8694,37623429.55Concurrency
enq: TX – row lock contention9972,10521114.59Application
DB CPU1,7733.87
then we have to go to the background event section in order to see what the LGWR was waiting on:

Background Wait Events

EVENTWAITS%TIME -OUTSTOTAL WAIT TIME (S)AVG WAIT (MS)WAITS /TXN% BG TIME
LNS wait on SENDREQ17,67402,1031191.0437.50
LGWR-LNS wait on channel153,447882,094149.0337.34
log buffer space17011467230.002.04
db file parallel write52,931010523.121.87
enq: CF – contention1607848650.001.39
log file switch completion4063156400.001.12
log file sync605591020.000.9
In 11g the LNS processes  (Log Network Server) is responsible to send redo to the standby.
Because we are in SYNC we wait for remote acknowlegement.
Nothing new here. But let’s see what has changed in 12c.

12c

In 12c the name of the processes have changed. It’s not LNS anymore, but:
  • NSS ships the redo from LGWR to remote standby when we are in SYNC
  • NSA ships the redo from online redo logs to standby when we are in ASYNC
and you will see new wait events for them:
  • ‘SYNC Remote Write’ for all redo transport waits done by NSS processes
  • ‘ASYNC Remote Write’ for all redo tranport waits done by NSA processes
Note that since 11gR2 the writing to online redo logs and to standby are done in parallel. Then, if your network latency is smaller than your disk latency on primary, then you have absolutely no overhead to be in SYNC. You can be in SYNC NOAFFIRM so that the disk latency at standby site do not increase the ‘SYNC Remote Write’ wait. In 12c you can have that in a MaxAvailability configuration with Far Sync Standby.

SYNC Remote Write

So what is the 12c equivalent of the following waits that are symptomatic of SYNC latency:
  • LGWR waiting on LNS – wait event ‘LGWR-LNS wait on channel’
  • LNS waiting on standby – wait event ‘LNS wait on SENDREQ’
Here they are in picture (using Orachrome Lighty):
  • The LGWR is waiting on NSS – wait event is ‘SYNC Remote Write':
b2ap3_thumbnail_Capture002.JPG
  • NSS is waiting on redo transport:
b2ap3_thumbnail_Capture003.JPG
If you were monitoring for ‘LNS’ wait events, you have to change it.
Here is the new pattern in an AWR report:
EVENTWAITS%TIME -OUTSTOTAL WAIT TIME (S)AVG WAIT (MS)WAITS /TXN% BG TIME
log buffer space70896128023.850.0058.96
SYNC Remote Write12903002322.960.0019.72
buffer busy waits20287143596.940.0018.89
log file parallel write1160648.020.000.37
Data Guard Broker Wait510051000.260.000.33
Redo Transport MISC1100222.700.000.16
==========================================================================================

Comments

Post a Comment

Oracle DBA Information