DBMIRROR_DBM_MUTEX 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?

Rarely. It is not a known contention point. Get Wait Statistics does not filter it out, so if it ranks, you will see it. Because a mirror usually runs little else, mirroring waits can look large in its wait list simply because nothing competes with them.


What It Means

Microsoft lists it as identified for informational purposes only, not supported. It is a thread waiting for parallel threads that are replaying log records on the mirror database. It only occurs on the mirror server. Seeing it means the instance is a mirror for at least one database.


When It Does Matter

The thing to watch on a mirror is the redo queue, not this wait. A mirror that falls behind lengthens failover, because outstanding redo must finish before it can take over:

SELECT
    instance_name AS database_name,
    counter_name,
    cntr_value
FROM sys.dm_os_performance_counters
WHERE object_name LIKE N'%Database Mirroring%'
  AND counter_name IN (N'Redo Queue KB', N'Redo Bytes/sec')
ORDER BY instance_name, counter_name;

Redo Bytes/sec is cumulative here, so take two readings. The baseline to monitor is Redo Queue KB staying small and draining after bursts. If it lags, look at the mirror’s log disk latency and CPU headroom.


The DBMIRROR Family

These are the database mirroring waits. Mirroring is deprecated in favour of Availability Groups, and most of these are idle queues that tick over on any mirrored instance. The one that costs users time is DBMIRROR_SEND; for the Availability Group equivalent, see HADR_SYNC_COMMIT.

  • HADR_SYNC_COMMITThe AG equivalent. The primary waiting for a synchronous secondary, the wait mirroring migrations move to.The main page for this family
  • DBMIRROR_SENDNetwork backlog. Waiting for the network layer backlog to clear before sending mirroring messages.Worth a look when it climbs
  • DBMIRRORING_CMDLog flush. Waiting for log records to be flushed to disk; expected to be held for long periods.Usually noise
  • DBMIRROR_WORKER_QUEUEIdle workers. A mirroring worker task waiting for more work.Usually noise
  • DBMIRROR_EVENTS_QUEUEIdle events. Mirroring waiting for events to process.Usually noise
  • DBMIRROR_DBM_MUTEXMirror redo. Documented for information only; on the mirror, waiting for parallel redo threads.Usually noise. This page.

Where To Go Next

DBMIRROR_DBM_MUTEX is background noise on a mirror. 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 *