ASYNC_IO_COMPLETION

(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 represents a general purpose asynchronous I/O operation that is not using the buffer pool, or for checkpoint operations.

(Books Online description: “Occurs when a task is waiting for I/Os to finish.”)

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:

98 (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:

As general guidance for I/O wait types, if the wait time is higher than acceptable I/O latencies for your environment, investigate whether the I/O subsystem is overloaded or has a configuration problem. See the PAGEIOLATCH_SH wait type for more information.

For stacks 1-3 below, there is one of each of these waits per data backup, and for the third stack, this wait will be almost the duration of the entire data backup operation (which can skew the average wait time for this wait type). See here for more details.

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

  1. The checkpoint at the start of a data backup
  2. Reading the GAM pages from the data files to figure out what extents to back up during a full backup
  3. Reading the actual data from the data files during a data backup (the writes to the backup files are tracked by BACKUPIO waits)
  4. Reading log records as part of replaying log on a mirror database
  5. The checkpoint at the start of creating the transient database snapshot when a DBCC CHECK* command runs
  6. Creating database files during database creation (one wait covers all file creation)
  7. A regular checkpoint

And many more similar call stacks.

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

  1. SOS_Task::PostWait+90
    EventInternal<SuspendQueueSLock>::Wait+1f9
    AsynchronousDiskPool::WaitUntilDoneOrTimeout+fb
    CheckpointDB2+2cd
    BackupDatabaseOperation::PerformDataCopySteps+c2
    BackupEntry::BackupDatabase+2ca
    CStmtDumpDb::XretExecute+ef
    CMsqlExecContext::ExecuteStmts<1,1>+400
    CMsqlExecContext::FExecute+a33
    CSQLSource::Execute+866
  2. SOS_Task::PostWait+90
    EventInternal<SuspendQueueSLock>::Wait+1f9
    AsynchronousDiskPool::WaitUntilDoneOrTimeout+fb
    BackupOperation::GenerateExtentMaps+34c
    BackupDatabaseOperation::PerformDataCopySteps+179
    BackupEntry::BackupDatabase+2ca
    CStmtDumpDb::XretExecute+ef
    CMsqlExecContext::ExecuteStmts<1,1>+400
    CMsqlExecContext::FExecute+a33
    CSQLSource::Execute+866
  3. SOS_Task::PostWait+90
    EventInternal<SuspendQueueSLock>::Wait+1f9
    AsynchronousDiskPool::WaitUntilDoneOrTimeout+fb
    BackupOperation::BackupData+272
    BackupEntry::BackupDatabase+2ca
    CStmtDumpDb::XretExecute+ef
    CMsqlExecContext::ExecuteStmts<1,1>+400
    CMsqlExecContext::FExecute+a33
    CSQLSource::Execute+866
  4. SOS_Task::PostWait+9e
    EventInternal<SuspendQueueSLock>::Wait+1fb
    LsBuffer::WaitForIoCompletion+e8
    LsBuffer::Quiesce+48
    LsMgr::ProcessSegment+79
    LsMgr::ProcessLogStream+79e
    LsMgr::ProcessLogStreamResponse+6e
    LsWorkRequest::Execute+47
    LsWorker::ThreadRoutine+152
    LsWorker::ThreadRoutine+1c7
    SOS_Task::Param::Execute+21e
    SOS_Scheduler::RunTask+a8
  5. SOS_Task::PostWait+90
    EventInternal::Wait+1f9
    AsynchronousDiskPool::WaitUntilDoneOrTimeout+fb
    CheckpointDB2+2cd
    DBMgr::SyncAndLinkReplicaSetupPhase+812
    DBMgr::CreatePhasedTransientReplica+3b5
    DBMgr::CreateTransientReplica+254
    DBDDLAgent::CreateReplica+184
    UtilDbccCreateReplica+7a
    UtilDbccCheckDatabase+919
    DbccCheckDB+239
    DbccCommand::Execute+153
    CStmtDbcc::XretExecute+80d
    CMsqlExecContext::ExecuteStmts<1,1>+400
    CMsqlExecContext::FExecute+a33
    CSQLSource::Execute+866
  6. SOS_Task::PostWait+90
    EventInternal::Wait+1f9
    AsynchronousDiskPool::WaitUntilDoneOrTimeout+fb
    AsynchronousDiskPool::WaitUntilDone+c
    DBMgr::CreateAndFormatFiles+46d
    CStmtCreateDB::CreateLocalDatabaseFragment+682
    DBDDLAgent::CreateDatabase+f7
    CStmtCreateDB::XretExecute+8fc
    CMsqlExecContext::ExecuteStmts<1,1>+400
    CMsqlExecContext::FExecute+a33
    CSQLSource::Execute+866
    process_request+73c
    process_commands+51c
    SOS_Task::Param::Execute+21e
    SOS_Scheduler::RunTask+a8
  7. SOS_Task::PostWait+90
    EventInternal::Wait+1f9
    AsynchronousDiskPool::WaitUntilDoneOrTimeout+fb
    CheckpointDB2+2cd
    ProcessCheckpointRequest+1e8
    CheckpointHelper+162
    CheckpointLoopWorker+da
    RegisterCheckPtWorker+133
    CheckpointLoop+d3
    CheckpointThread+55
    SOS_Task::Param::Execute+21e
    SOS_Scheduler::RunTask+a8