XE_DISPATCHER_WAIT Wait Type in SQL Server

⏳Part of the SQL Server Wait Types Library, every wait type explained.Related deep dive: ASYNC_NETWORK_IO Wait TypeRelated pillar: Performance & Troubleshooting

Is It a Problem?

No. XE_DISPATCHER_WAIT is the idle time of the Extended Events dispatcher threads, and it belongs on the benign filter list next to XE_TIMER_EVENT. A large total means the dispatchers spent most of their time with nothing to deliver, which is the healthy state. Get Wait Statistics filters it out by default.


What It Means

Microsoft describes it as a background thread used for Extended Events sessions waiting for event buffers to process.

XE_DISPATCHER_WAIT is recorded by the background dispatcher threads that serve Extended Events asynchronous targets, while they wait for filled event buffers to process. Events accumulate in session buffers; when a buffer is ready (full, or past its dispatch latency), a dispatcher picks it up and delivers it to the target. Between deliveries, the dispatchers sit in this wait.

Every instance runs the system_health session, so every instance has dispatchers and accumulates this wait, whether or not you created a session yourself.


When It Does Matter

The wait itself never needs fixing. The signal to watch is in the sessions: when a session produces events faster than its buffers drain, it loses them, and sys.dm_xe_sessions counts the loss:

SELECT name, dropped_event_count, dropped_buffer_count, total_buffer_size, buffer_policy_desc
FROM sys.dm_xe_sessions
ORDER BY dropped_event_count DESC;

The baseline to monitor is dropped_event_count staying at 0. A session that drops events needs tighter predicates or fewer events; Get Active XE Sessions lists what each session collects. A session set to NO_EVENT_LOSS does not drop events: when its buffers are full, it records XE_BUFFERMGR_FREEBUF_EVENT instead, and that is the XE wait worth chasing. Leave the dispatchers themselves alone; they size and pace themselves.


The XE Family

These are the Extended Events background waits, and nearly all of them are commonly filtered as benign. If one is near the top of your waits, start from the waits that usually matter instead.

  • XE_DISPATCHER_WAITDispatcher idle. Background threads waiting for event buffers to deliver.Usually noise. This page.
  • XE_TIMER_EVENTDispatch timer. Counting down to the next dispatch, MAX_DISPATCH_LATENCY being 30 seconds by default.Usually noise
  • XE_BUFFERMGR_ALLPROCESSED_EVENTBuffer flush. Session buffers being flushed to their targets on a background thread.Usually noise
  • XE_FILE_TARGET_TVFFile target read. A query reading an event file with sys.fn_xe_file_target_read_file.Usually noise
  • XE_LIVE_TARGET_TVFLive data stream. Streaming a live target, most often Watch Live Data in SSMS.Usually noise
  • XE_TIMER_MUTEXTimer list. Brief access to the structure holding the XE timers.Usually noise

Where To Go Next

XE_DISPATCHER_WAIT is background noise on a healthy instance. 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 *