(Republishing, or using this info in a commercial product/website, is prohibited without permission. All other uses are permitted. If in doubt, please ask.)

LAZYWRITER_SLEEP

(Back to main page…)

Description:

This wait type is when a lazywriter thread is sleeping between checking whether there is pressure on the buffer pool free list requiring buffer being freed (i.e. work for the lazywriter to do). There will generally be a 1 second wait for this type every 1 seconds for each lazywriter thread.

(Books Online description: “Occurs when lazywriter tasks are suspended. This is a measure of the time spent by background tasks that are waiting. Do not consider this state when you are looking for user stalls.”)

Questions/comments on this wait type? Click here to send Paul an email, especially if you have any information to add to this topic.

Added in SQL Server version:

Pre-2005/2005

Removed in SQL Server version:

N/A

Extended Events wait_type value:

Maps to the LZW_SLEEP map_value in sys.dm_xe_map_values (thanks to Jonathan’s post here).

The map_key value in sys.dm_xe_map_values is 96 in all versions through 2014 RTM. After 2014 RTM, you must check the DMV to get the latest value as some map_key values have changed in later builds.

Other information:

I have not seen this wait type be a noticeable contention point.

This wait type is one that I usually filter out as a benign wait when doing wait statistics analysis.

Known occurrences in SQL Server (list number matches call stack list):

  1. Sleeping waiting for lazywriter work to do

Abbreviated call stacks (list number matches known occurrences list):

  1. SOS_Task::PostWait+9e
    EventInternal<SuspendQueueSLock>::Wait+1fb
    BPool::LazyWriter+6b6
    lazywriter+2ae
    SOS_Task::Param::Execute+21e
    SOS_Scheduler::RunTask+ab