Freigeben über


Some I/O improvements in Windows Server 2008

I already posted this on my previous blog but the question comes up so often I decided to do a repost.

Windows Server 2008 offers a lot of new features that are very visible like Internet Information Server 7.0, a whole new virtualization model, Server Manager and many many more. But being a SQL Server person I am interested in other things that have been improved. These not so visible features are mostly I/O related since databases are a synonym for I/O. Also note that many (if not all) of these changes also apply to Windows Vista.

I/O Completion Port improvement

Before Windows Server 2008 a thread that issued an async I/O also executed the I/O completion task causing a context switch which is expensive. The I/O completion is now deferred until the thread pulls the I/O off the completion port preventing this context switch.
I/O prioritization

This is completely new to the OS, not only do your processes have a priority but also the I/O's that are triggered by these processes have their priority. This priority is based on the thread priority but can be set on the I/O itself too.

I/O Performance improvements

Using the GetQueuedCompletionStatusEx API call enables Windows to retrieve multiple completion port entries in one call.

Prior to Windows Server 2008 the Memory Manager and I/O system limited every I/O request internally to 64KB, larger requests were divided into multiple 64KB parts. This limit has been removed so every request can now be issued as a whole, meaning less transitions to kernel-mode to send the I/O to your storage device.

NUMA improvements

When working with SQL Server 2005 and later you will most likely encounter more and more NUMA enabled machines. In Windows Server 2008 more memory allocations procedures have been updated to be NUMA aware and I/O interrupts direct their completion to the node that initiated the I/O. An addition to the NUMA APIs also allows applications to specify the preferred node.

SMB2

According to the people who designed SMB2 this should help performance of large file copies over the network with factor 30 to 40. This will not really help your SQL Server performance but it will certainly get your backups to other servers faster.

For more information about kernel changes in Windows Server 2008 check out this great webcast by Mark Russinovich.

Comments

  • Anonymous
    September 06, 2008
    Is GetQueuedCompletionStatusEx really an improvement?  There doesn't seem to be any way to get error information for each completion entry.

  • Anonymous
    September 08, 2008
    Doesn't it return an errorcode just like GetQueuedCompletionStatus?

  • Anonymous
    September 16, 2008
    OVERLAPPED_ENTRY doesn't have any field for errors. From the documentation, I would take it that no error information is returned: This function returns TRUE when at least one pending I/O is completed. This function returns FALSE when no I/O operation was dequeued. Unless this is badly worded and means if an I/O error occurs, FALSE is returned with 1 removed and GetLastError works like normal.

  • Anonymous
    September 16, 2008
    Maybe the description could be more clear indeed but like you say, GetLastError works like normal and should be checked.