4

This is not urgent, just curiosity.

QUESTION:

I was trying to troubleshoot a slow server today, and I came across a high figure for a wait type called PREEMPTIVE_REENLIST. I'm not able to find this documented anywhere. TOADWORLD seems to at least know it exists, but doesn't have any actual info. Nothing on MSDN search or Stack Exchange search. Nothing on Google except the TOADWORLD links.

Was just wondering if anyone here had encountered it and knew what it was all about. Thanks.

PLATFORM:

Microsoft SQL Server 2008 R2 (SP1) - 10.50.2550.0 (X64) Jun 11 2012 16:41:53 Copyright (c) Microsoft Corporation Standard Edition (64-bit) on Windows NT 6.1 (Build 7601: Service Pack 1) (Hypervisor) (Windows Server 2008 R2 virtualized on VMWare)

2
  • 1
    SQLAuthority has this to say about PREEMPTIVE waits in general "Simply put, this wait means non-cooperative. While SQL Server is executing a task, the Operating System (OS) interrupts it. This leads to SQL Server to involuntarily give up the execution for other higher priority tasks." Otherwise, I'm curious now too! Commented Dec 16, 2014 at 18:59
  • Thanks for the response, John. :-) that's a lot more than I knew a few minutes ago.
    – Joe Hayes
    Commented Dec 16, 2014 at 19:03

1 Answer 1

5

This is not definitive proof but just my opinion based on what I learned from a PluralSight course Paul Randal did on wait stats.

PREMEPTIVE waits are indicative that SQL Server Operating System (SQLOS) has to change a thread to preemptive mode to handle something outside of SQL Server, at the OS level.

Now as you have already determined this types of waits are not documented much at all. There are a few you can see documented in BOL under the sys.dm_os_wait_stats DMV but it is not extensive. In most cases the calls being made to the OS are via Windows API calls. So what I ended up learning from the course is that if you take off the PREMEPTIVE portion of the PREEMPTIVE_REENLIST you end up with the name of the possible API being used: REENLIST. So if you take that and start searching around on the web you can try and deduce what it means.

So my deducing would be that I came across this MSDN article on IResrouceManager::Reenlist there are also other MSDN articles on similar named methods that all discuss a TransactionManager. It is not the content that catches my eye but the section of MSDN where this article is located: DTC Interfaces. So you don't specify this level of setup for your server but I would make a hunch that you are using distributed transactions. This can come from making remote calls to other instances/databases or if you are working on a clustered instance. If you actually read a statement from the MS DTC Service, although it is from SQL Server 2000 you might catch the key word that caught my eye:

One or more servers running SQL Server can then be instructed to enlist in the distributed transaction and coordinate the proper completion of the transaction with MS DTC

Just my opinion...

1
  • That is excellent, Shawn. Thank you very much for spending the time on this. You are right, BTW. We use distributed transactions on that server.
    – Joe Hayes
    Commented Dec 16, 2014 at 20:25

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.