SLEEP_BPOOL_STEAL

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

(Back to main page…)

Description:

This wait type is when a free list stall occurs in the buffer pool. This means that a new page needs to be created but there isn’t any free memory in the buffer pool, so the thread sleeps for a very short period of time (in SQL Server 2005 in was 10ms), assuming that while it is asleep something (e.g. the lazywriter) will free up some memory. When this wait occurs, you will see a blip in the Buffer Manager:Free list stalls/sec perfmon counter.

(Books Online description: N/A)

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:

2019

Removed in SQL Server version:

N/A

Extended Events wait_type value:

The map_key value in sys.dm_xe_map_values is 1396 in 2019 CU12. After 2019 CU12, 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, but if they start to increase on your system, that’s a sign that the buffer pool is under memory pressure, which may indicate other problems on the instance.

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

  1. Free list stall (in this case, as part of allocating a page for the version store in tempdb)
  2. Free list stall (in this case, as part of performing readahead during an index scan)

And other similar call stacks.

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

  1. SOS_Task::PostWait+0x6f
    SOS_Task::Sleep+0x140
    BPool::Steal+0x894
    BPool::NewPage+0x78f
    PageRef::FormatInternal+0x83
    AppendOnlyStorageUnit::SetupPageHeaderPreAllocation+0xb9
    AllocationReq::AllocateExtent+0x375
    AllocationReq::AllocatePages+0x151c
    AllocationReq::Allocate+0x144
    AppendOnlyStorageUnit::AllocateNewExtent+0x336
    AppendOnlyVerStoreMgr::AddRecord+0x1464
    VersionMgr::AddRecordToVersionStore+0x79
    VersionMgr::GenerateVersion+0x298b
    IndexPageRef::Modify+0x2522
    BTreeRow::UpdateRecord+0x27c0
    IndexDataSetSession::SetDataInternal+0x72cf
    DatasetSession::SetData+0x2b9
    RowsetNewSS::SetData+0x6a
    CValRow::SetDataX+0x61
    sqlTsEs.dll!CEsExec::GeneralEval4+0xe7
    CQScanSimpleUpdateNew::GetRow+0x16b
    CQScanLightProfileNew::GetRow+0x19
  2. SOS_Task::PostWait+0x6f
    SOS_Task::Sleep+0x140
    BPool::Steal+0x894
    BPool::GetFromDisk+0x516
    BPool::ReadAhead+0x119
    IssueReadAheadHelper+0x1fd
    PageReadAhead::ReadAhead+0x3d
    PageReadAhead::Notify+0x145
    KeyRangeGenerator::ReadAhead+0x18b
    KeyRangeGenerator::GetNextRange+0x3c5
    IndexDataSetSession::GetNextRangeForChildScan+0x1cb
    IndexDataSetSession::SetupNextChildSubScan+0x2c4
    IndexDataSetSession::GetBatchInternal+0x5df0
    DatasetSession::GetBatch+0x136
    RowsetNewSS::GetBatch+0x5a
    CBpQScanRowStoreScan::BpFetchNextBatch+0xb7
    CBpQScan::GetNextBatch+0x6f
    CBpChildIteratorScanner::BpGetNextBatch+0x12
    CBpQScanHashAggNew::ProcessInput+0x8b
    CBpQScanHashAggNew::PbsGetForOriginalInputs+0x21
    CBpSpillProcessor::Main+0x113
    CBpQScanHashAggNew::BpGetNextBatch+0x52