PARALLEL_REDO_WORKER_WAIT_WORK 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 calls it an idle wait that is expected to occur regularly, and Get Wait Statistics filters it out by default. Every database on a secondary gets its own redo workers, and each idle worker adds to this wait, so on a secondary hosting many databases it can be huge in a raw wait list and still mean nothing.


What It Means

Microsoft lists PARALLEL_REDO_WORKER_WAIT_WORK as internal use only, from SQL Server 2016. The redo write-up says it is a parallel redo worker, or the redo helper thread, with nothing to do. More commonly that is because the database on the primary is quiet and is not generating much log; less often it means the main redo thread cannot hand out log as fast as the workers can apply it.


When It Does Matter

Not through this wait. Even the rarer case, the main redo thread being the bottleneck, shows up as redo lag, not as anything you act on here.

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. This page.
  • 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
  • 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_WAIT_WORK measures idle redo capacity. 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 *