Some times we see the error below in the event logs:
“SQL Server has encountered 1 occurrence(s) of I/O requests taking longer than 15 seconds to complete on file [T:\MSSQL\DATA\%file_name%] in database [%DB_name%] (2). The OS file handle is 0×00000838. The offset of the latest long I/O is: 0x000000ebdc0000“
Do you refer it to as a stalled IO? We always hear a questions such as, what’s wrong with SQL Server..? Why is SQL taking so long to read or write to the disk..? Let us discuss why it is not a MS SQL Server problem:
MS SQL Server does data file reads and writes almost exclusively as asynchronous IO, using the win32 APIs ReadFile, WriteFile, ReadFileScatter and WriteFileGather. Each of these APIs behave in a fairly similar steps, the caller sends in a handle to the file, some memory location to read or write, the size of the block and a structure that tells the kernel how to handle the IO. In MS SQL Server’s case, how to handle the IO is Asynchronously, please. The call returns immediately so that the thread issuing so that the IO can get out of the way and make life happy for other users who are also waiting got their query to return.
The catch here is that, ordinarily the time between the Asynchronous call to read or write and the completion of the read or write should be on the order of 10ms. The longer it takes for an IO to return the more noticeable a performance impact there is to end users.


