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

PAGEIOLATCH_UP

(Back to main page…)

Description:

This wait type is when a thread is waiting for the read of a non-table data file page (usually an allocation bitmap) from disk to complete, and the thread is going to modify the page structure once it is in memory (UP = UPdate mode). This wait type can also be when a thread is waiting for the synchronous write of a special page to disk. The Latches Whitepaper in the sidebar on the right has a description of all latch modes and their compatibility with other latch modes.

(Books Online description: “Occurs when a task is waiting on a latch for a buffer that is in an I/O request. The latch request is in Update mode. Long waits may indicate problems with the disk subsystem.”)

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:

The map_key value in sys.dm_xe_map_values is 67 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:

See the PAGEIOLATCH_SH wait type for more details, but bear in mind that these waits can also be for page writes, not just for page reads.

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

  1. Updating the database boot page (page 9 in file 1) at the end of a log backup
  2. Updating the transaction log’s fileheader page (page 0 in the file) at the end of a log growth
  3. Flushing a page to disk that’s just been changed while replaying log records on a mirror database (database mirroring flushes changed pages to disk immediately rather than waiting for checkpoints)
  4. Changing the state of an extent in an SGAM page to reflect that the extent may have a free single page for allocating (in this case, the single page allocation is being performed by the version store in tempdb)
  5. Changing a PFS byte in a PFS page (in this case, setting the bit that indicates the page has one or more ghost records, for a page in a system catalog while dropping an object)
  6. Change a bit in the extent map of an IAM page (in this case deallocating an extent because the only allocated page in it was deallocated, and the page was deallocated after being cleaned of all records by the background ghost cleanup task

Many more similar stacks where the boot page or file header pages are being updated, or where database mirroring is replaying log records on the mirror database (anything with LsMgr in the stack is database mirroring), or when special pages (usually allocation bitmaps) are being changed.

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

  1. SOS_Task::PostWait+9e
    EventInternal::Wait+1fb
    LatchBase::Suspend+633
    LatchBase::AcquireInternal+415
    bufwait+49
    bufwrite+35e
    GlobalFileHeader::StoreDbInfo+393
    BootPagePtr::Release+15e
    BackupOperation::FlushBootPage+8b
    BackupOperation::CommitLogBackupPoint+8ad
    BackupLogOperation::EndSyncCommitAndTruncateLog+62
    BackupEntry::BackupLog+3bc
    CStmtDumpXact::XretExecute+ef
    CMsqlExecContext::ExecuteStmts<1,1>+427
    CMsqlExecContext::FExecute+a33
    CSQLSource::Execute+86c
  2. SOS_Task::PostWait+9e
    EventInternal::Wait+1fb
    LatchBase::Suspend+633
    LatchBase::AcquireInternal+415
    bufwait+49
    bufwrite+35e
    GlobalFileHeader::SetFileProperties+1458
    FileMgr::InternalGrowFile+a1f
    SQLServerLogMgr::GrowAFile+6eb
    SQLServerLogMgr::ReserveAndAppend+292
    XdesRMReadWrite::GenerateLogRec+615
    PageRef::DeleteRows+29a9
    IndexPageRef::MarkGhost+1309
    BTreeRow::DeleteRecord+1782
    IndexDataSetSession::DeleteRow+296
    RowsetNewSS::DeleteRows+4e
    CQScanUpdateNew::ReleaseRowHelper+51
    CQScanUpdateNew::GetRow+4e
    CQueryScan::GetRow+81
    CXStmtQuery::ErsqExecuteQuery+54a
    CXStmtDML::XretDMLExecute+31c
    CXStmtDML::XretExecute+ad
  3. SOS_Task::PostWait+9e
    EventInternal::Wait+1fb
    LatchBase::Suspend+633
    LatchBase::AcquireInternal+415
    bufwait+49
    bufwrite+35e
    LsMgr::ProcessPage+79a
    LsMgr::ProcessDataStream+30a
    LsMgr::ProcessDatabasePagesResponse+6c
    LsWorkRequest::Execute+47
    LsWorker::ThreadRoutine+152
    LsWorker::ThreadRoutine+1c7
    SOS_Task::Param::Execute+21e
    SOS_Scheduler::RunTask+a8
  4. SOS_Task::PostWait+9e
    EventInternal::Wait+1fb
    LatchBase::Suspend+633
    LatchBase::AcquireInternal+415
    BUF::AcquireLatch+78
    BPool::Get+f3
    SGAMPageRef::Fix+b2
    ChangeExtStateInSGAM+135
    AllocMixedExtent+701
    AllocMixedPageInternal+800
    AllocMixedPage+185
    AllocIAMPage+273
    AllocationReq::AllocateFirst+11bf
    AllocationReq::Allocate+e9
    AppendOnlyStorageUnit::AllocateNewExtent+299
    AppendOnlyVerStoreMgr::AddRecord+e21
    VersionMgr::GenerateVersion+6b3
    IndexPageRef::Modify+1293
    BTreeRow::UpdateRecord+20ab
    IndexDataSetSession::SetDataInternal+9a03
    DatasetSession::SetData+16d
    RowsetNewSS::SetData+6a
  5. SOS_Task::PostWait+90
    EventInternal::Wait+1f9
    LatchBase::Suspend+633
    LatchBase::AcquireInternal+415
    BUF::AcquireLatch+78
    BPool::Get+ea
    PFSPageRef::Fix+b5
    ChangeGhostPageState+e0
    PageRef::MarkPfsGhostState+24
    IndexPageRef::MarkGhost+135e
    BTreeRow::DeleteRecord+1713
    IndexDataSetSession::DeleteRow+296
    RowsetNewSS::DeleteRows+4e
    CMEDScan::DeleteRow+82
    CMEDCatYukonObject::DropObject+1734
    CMEDProxyObject::DropInternal+2e0
    CMEDProxyObject::DropInternal+25e
    CMEDProxyObject::Drop+8c
    DropObject+3b0
    CallDropObject+1e94
    CStmtDropObject::XretDropExecute+bb
    CMsqlExecContext::ExecuteStmts<1,1>+400
  6. SOS_Task::PostWait+90
    EventInternal::Wait+1f9
    LatchBase::Suspend+633
    LatchBase::AcquireInternal+415
    BUF::AcquireLatch+78
    ChangeExtStateInIAM+246
    DeallocateExtentInternal+570
    DeAllocMgr::DeAllocatePageInternal+70a
    IndexPageManager::DeallocatePageInternal+14d
    RemoveBTreePageIfUnchangedInternal+2b2
    RemoveBTreePageIfUnchanged+f5
    CleanVersionsOnBTreePage+1380
    IndexDataSetSession::CleanupVersionsOnPage+ca
    GhostExorciser::CleanupPage+6b2
    GhostExorciser::ProcessPages+3d
    TaskGhostCleanup::ProcessTskPkt+546
    GhostRecordCleanupTask+10b
    CGhostCleanupTask::ProcessTskPkt+9
    TaskReqPktTimer::ExecuteTask+63
    OnDemandTaskContext::ProcessTskPkt+285
    SystemTaskEntryPoint+431
    OnDemandTaskContext::FuncEntryPoint+25