Determining Disk Offset in Windows 2003 and 2008R2

Check offset

I was trying to debug poor performance issues at a customer running VMware. Noticed that they were running mostly Windows 2003 Servers, as opposed to 2008 or 2008R2 virtual machines. Considering that the newer operating system require more memory resources, I wondered at why the 2003 Windows Servers were having issues.

Well, it turns out that none of their Windows 2003 servers were aligned on the underlying physical disks. In theory, this should cause performance degradation of only 10-15%, but the numbers are higher when dealing with SQL Server, certain Websites, and Exchange. Now, some folks will argue with me that 15% is low… but even though most disk access requires twice the number of reads/writes when unaligned, memory caching reducing the performance impact in most cases.

In any case, how do you check if this is an issue on your servers? Here are the steps:

  1. Open a DOS command prompt:
    • From the start menu | run cmd.exe
      (Note: on Windows 2008, right-click and select run as administrator.)
  2. Run the following command:
    • wmic partition get Blocksize, StartingOffset, Name, Index
      (if you are using a dynamic disk, use the command: dmdiag -v)
  3. Calculate the output:
    • Divide starting offset by 1024 and see if the result in an integer.
    • In 2003 screen shot: 32256/1024 = 31.5
    • In 2008 screen shot: 1048576/1024 = 1024
  4. Determine the results:
    • In 2003 screen shot, the offset produces non-aligned blocks.
    • In 2008 screen shot, since the result is an integer, we have aligned blocks.

Note that by default 2008 and 2008R2 installations are aligned. But, by default, 2003 and 2003R2 installations are not aligned. For further information on this topic, you might want to read about SQL Server ramifications, at http://msdn.microsoft.com/en-us/library/dd758814(v=sql.100).aspx.