PREEMPTIVE_XE Wait Types 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

The PREEMPTIVE_XE_* waits are Extended Events calling outside SQL Server’s scheduler, and this page covers the set: PREEMPTIVE_XE_SESSIONCOMMIT, TARGETINIT, TARGETFINALIZE, GETTARGETSTATE, CALLBACKEXECUTE, DISPATCHER, ENGINEINIT and TIMERRUN. Microsoft lists them all as internal use only.

SESSIONCOMMIT is committing changes to the list of event sessions, and GETTARGETSTATE is querying the state of a session target. The others follow their names: initialising and finalising targets, running callbacks, the dispatcher, engine start-up and timers.


Are They a Problem?

No. Get Wait Statistics filters all of them out, and its source has a measurement explaining why: on an idle instance, PREEMPTIVE_XE_CALLBACKEXECUTE logged about 133 million waits averaging 0.00003 ms each. They rank by call count, not by stall.


When They Do Matter

Rarely. Target initialisation and finalisation on file targets depend on the storage under the output path, like any file work, so keep event files on sensible storage. If event collection cost is the question, that is about which events and predicates a session uses, and sys.dm_xe_sessions shows dropped events:

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.


The PREEMPTIVE Family

Each of these is SQL Server calling out of its own scheduler into something else, such as COM, MSDTC or an OLE DB provider, and waiting for the answer. The time is spent outside SQL Server. If one is near the top of your waits, read it next to the waits that usually matter.

  • PREEMPTIVE_DTCDistributed transactions. Calls into MSDTC to begin, enlist in, commit or abort a distributed transaction.Worth a look when it climbs
  • PREEMPTIVE_OLEDBOPSOLE DB providers. Talking to an OLE DB provider, usually behind a linked server.Worth a look when it climbs
  • PREEMPTIVE_COMCOM calls. Calls into COM objects, usually the OLE DB providers behind linked servers.Worth a look when it climbs
  • PREEMPTIVE_XEExtended Events. Extended Events session and target calls outside SQL Server.Usually noise. This page.
  • PREEMPTIVE_SP_SERVER_DIAGNOSTICSHealth checks. The background thread running sp_server_diagnostics.Usually noise
  • PREEMPTIVE_SB_STOPENDPOINTBroker endpoint. Calling out to Windows while a Service Broker endpoint shuts down.Usually noise

Where To Go Next

The PREEMPTIVE_XE waits are background noise. 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 *