PARALLEL_REDO_WORKER_SYNC Wait Type in SQL Server

⏳Part of the SQL Server Wait Types Library, every wait type explained.Related deep dive: HADR_SYNC_COMMIT Wait TypeRelated pillar: High Availability

Is It a Problem?

No. The secondary replica redo model write-up lists it among the waits without performance impact, and Get Wait Statistics filters it out by default.


What It Means

Microsoft lists PARALLEL_REDO_WORKER_SYNC as internal use only, from SQL Server 2016. It is described two slightly different ways. The redo model write-up says it is waiting for all the parallel redo worker threads to stop, for example when they fail to start or when trace flag 3459 switches the instance to serial redo. It is also described as the main redo thread waiting for its workers to complete, and seen during the recovery step of CREATE DATABASE and RESTORE DATABASE. Both agree it is part of normal redo.


When It Does Matter

It does not. Of this family, the two waits that can slow redo are PARALLEL_REDO_FLOW_CONTROL and PARALLEL_REDO_TRAN_TURN; this one is not among them.

Redo falling behind looks different. The baseline to monitor is redo_queue_size and redo_rate for each database in sys.dm_hadr_database_replica_states: a queue that keeps growing means the secondary is falling behind, which stretches failover time and makes a readable secondary stale. When it grows, look at PARALLEL_REDO_FLOW_CONTROL and PARALLEL_REDO_TRAN_TURN, the redo waits that can slow redo down.


The PARALLEL_REDO Family

These are the parallel redo waits, recorded on Availability Group secondaries and during database recovery. They split into waits that can slow redo and idle waits with no performance impact. For AG latency, start from the main page, HADR_SYNC_COMMIT.

  • HADR_SYNC_COMMITSynchronous commit. The primary waiting for a synchronous secondary to harden the log.The main page for this family
  • PARALLEL_REDO_FLOW_CONTROLDispatch blocked. The main redo thread cannot hand out more log because the workers are not keeping up.Worth investigating
  • PARALLEL_REDO_TRAN_TURNOrdering stall. A worker waiting for a dependent log record on another worker, on a readable secondary.Worth a look when it climbs
  • PARALLEL_REDO_WORKER_WAIT_WORKIdle worker. A redo worker with nothing to do, usually because the primary is quiet.Usually noise
  • PARALLEL_REDO_DRAIN_WORKERDrain. The main redo thread waiting for all outstanding redo to finish, at a checkpoint or file size change.Usually noise
  • PARALLEL_REDO_WORKER_SYNCWorkers stopping. Waiting for the parallel redo workers to stop.Usually noise. This page.
  • PARALLEL_REDO_LOG_CACHELog cache lock. An infrequent lock on the dispatched-log cache, after flow control.Usually noise
  • PARALLEL_REDO_TRAN_LISTTransaction list lock. An infrequent lock on the list of transactions that are fully redone.Usually noise

Where To Go Next

PARALLEL_REDO_WORKER_SYNC is a normal part of parallel redo. If you are chasing a real problem, start with the waits that cost you time.

Comments

Leave a Reply

Your email address will not be published. Required fields are marked *