Is It a Problem?
No. HADR_TIMER_TASK is Availability Group timer bookkeeping, and most of its total is time spent waiting for the next run of a scheduled task. It is commonly filtered as benign, and Get Wait Statistics filters it out by default.
What It Means
Microsoft describes it as waiting to get the lock on the timer task object, and says it also covers the deliberate wait between runs of periodic work. Its own example is a task that runs every 10 seconds: after each run, the Availability Group waits about 10 seconds to reschedule it, and that time lands here.
So the total mostly measures scheduled idle time, and it grows on any instance hosting an Availability Group, whether the replicas are healthy or not.
When It Does Matter
On its own, it does not. A large total tells you only that Availability Groups are configured and the instance has been up for a while.
The baseline to monitor for Availability Group health is not this wait. It is the send queue and redo queue for each database in sys.dm_hadr_database_replica_states, and the commit waits such as HADR_SYNC_COMMIT and HADR_DATABASE_FLOW_CONTROL. Check Always On Availability Group Latency reads the queues for you.
The HADR Background Waits
These are the Availability Group background waits: timers, worker pools and cluster plumbing that tick over whether or not anything is wrong. For AG latency and lag, start from the main page, HADR_SYNC_COMMIT.
- HADR_SYNC_COMMITSynchronous commit. The primary waiting for a synchronous secondary to harden the log, the AG wait that costs users time.The main page for this family
- HADR_WORK_QUEUEIdle workers. AG background workers waiting for new work, the normal state of the pool.Usually noise
- HADR_WORK_POOLWork pool access. Concurrency control on the AG background work task object.Usually noise
- HADR_TIMER_TASKTimers. The lock on the AG timer object, plus the waits between runs of periodic AG tasks.Usually noise. This page.
- HADR_NOTIFICATION_DEQUEUECluster notifications. A background task waiting for the next failover cluster notification.Usually noise
- HADR_CLUSAPI_CALLCluster API calls. Switching to preemptive mode to call the Windows failover cluster APIs.Usually noise
- HADR_AG_MUTEXAG configuration. AG DDL or a cluster command waiting for exclusive access to the AG configuration.Usually noise
- HADR_FILESTREAM_IOMGR_IOCOMPLETIONFILESTREAM I/O manager. The AG FILESTREAM I/O manager waiting for I/O completion.Usually noise
- HADR_ARCONTROLLER / FILESTREAM_IOMGRInternal locks. Short waits on the AG event subscriber list and the FILESTREAM I/O manager lock.Usually noise
Where To Go Next
HADR_TIMER_TASK is background noise on an Availability Group instance. If you are chasing a real problem, start with the waits that cost you time.
- The waits that usually matter, ranked, with what each one is telling you.
- HADR_SYNC_COMMIT, the Availability Group wait that costs users time.
- Check Always On Availability Group Latency, send and redo queues for each replica.
- High Availability, the scripts and guides for Availability Groups and replicas.
Leave a Reply