What if I told you that you could increase your hard disk's performance (and therefore Exchange Server performance)...
by 20% just by making a disk configuration change? Thanks to a utility in the Windows Server 2003 Service Pack 1 Support Tools, you can.
The technique I'm going to show you involves a relatively new command-line utility called DiskPart. You may be familiar with the DiskPar utility that was originally part of Windows 2000. DiskPart is similar, but replaces DiskPar. Therefore, don't attempt to perform this procedure using DiskPar.
Also, this technique only works on basic disks. Don't even try to use it on a dynamic disk. Furthermore, even with basic disks, you must verify that the drive is translated as 64 sectors per track. You can confirm this by checking the hard drive's label. If the disk uses a different number of sectors per track, this technique won't work.
Finally, the most important thing to know before getting started is that this is a destructive procedure. If you run this procedure against a disk that contains data, then all data will be erased. You must therefore make a backup of anything that resides on the disk before proceeding.
How disk alignment improves performance
When Windows creates a partition on a 64-sector per track drive, it begins the partition at the drive's 64th sector. Normally, this isn't a big deal. But the arrangement can have a serious impact on drives containing Exchange Server databases. The reason is because Exchange Server reads and writes data in multiples of 4 KB. Database pages are 4 KB in size.
Exchange reads and writes data to and from streaming files in 32 KB chunks, a multiple of 4 KB. This is important because, if a partition begins at a disk's 64th sector, then tracks on the partition will not contain an even 4 KB multiple of space. Consequently, for some read-and-write operations, a block of data will span multiple tracks.
Since disk I/O operations always occur more efficiently if they are linear across a single track, if you restructure a partition so that each track stores an even multiple of 4 KB, you won't have nearly as many pages of data spanning multiple tracks. (Some of the data in the streaming file will still pan multiple tracks because it is 32 KB in size as opposed to 4 KB.)
How to align disk partitions
Begin by verifying that Windows Server 2003 Service Pack 1 is installed on the system. After doing so, open a command prompt window and enter the DISKPART command. When you do, you will see a screen similar to the one that's shown in Figure A.
Figure A: This is the initial DiskPart screen.
At this point, enter the LIST DISK command to display all of the server's disks, as shown in Figure B.
Figure B: The LIST DISK command will cause DiskPart to display all of the server's hard drives.
Since we are trying to improve the efficiency of a Microsoft Exchange database, go through the list and find the disk on which you plan to store the database.
Although the system shown in Figure B only has one hard disk, you will notice that there is a number assigned to it (Disk 0). Locate the number that's assigned to the disk that you plan on storing the Exchange database on. Now enter SELECT DISK X, where X is the number assigned to the disk you want to align. DiskPart should now return a message confirming the selected disk, as shown in Figure C.
Figure C: Use the SELECT DISK X command to select the disk that you want to align.
Now double check to make sure that the correct disk is selected and that any data on the disk has been backed up. Then enter the following command: CREATE PARTITION PRIMARY ALIGN=64.
This will create a new primary partition on the drive that is aligned with the drive's 64 sectors per track. If you have trouble getting this command to work, try using the value 128 instead. There are a few drives out there that require a value of 128 instead of 64.
Now that the partition has been created, it's time to assign a drive letter to the partition. To do so, enter the ASSIGN LETTER=X command, where you substitute the drive letter that you want to use for X. Once the drive letter is assigned, enter the EXIT command to close the DiskPart utility.
You have now created a partition and assigned it a drive letter. The only thing left to do is to format the drive. The easiest way to do that is to open My Computer, right click on the drive, and select the Format command from the shortcut menu. Just make sure to format the drive as NTFS.
About the author: Brien M. Posey, MCSE, is a Microsoft Most Valuable Professional for his work with Exchange Server, and has previously received Microsoft's MVP award for Windows Server and Internet Information Server (IIS). Brien has served as CIO for a nationwide chain of hospitals and was once responsible for the Department of Information Management at Fort Knox. As a freelance technical writer, Brien has written for Microsoft, TechTarget, CNET, ZDNet, MSD2D, Relevant Technologies and other technology companies. You can visit Brien's personal Web site at http://www.brienposey.com.
MEMBER FEEDBACK TO THIS TIP
This tip contains a lot of screenshots of the initial setup. Then it instructs you to go and run a command to complete it. I have noted there is no screenshot of the final command, and believe that is because it does not work. Unless I'm doing something wrong, using diskpart to align a partition only works when starting with a blank disk, and therefore cannot be done with Disk 0.
I read through the article, and perhaps it was a bit misleading.
The system that I was using to get screen captures from only had one hard disk (which the article acknowledges). I never intended the technique to be run against Disk 0. Maybe I needed to specifically state that, but the article says that you should align the partitions of the drive that will contain the Exchange database. Nobody who is the least bit concerned about performance should be putting the Exchange database on Disk 0. I thought that point was obvious enough that I didn't bother to mention it, but maybe I should have.
Brien Posey, tip author
Do you have comments on this tip? Let us know.
Related information from SearchExchange.com:
Please let others know how useful this tip is via the rating scale below. Do you have a useful Exchange Server or Microsoft Outlook tip, timesaver or workaround to share? Submit it to our tip contest and you could win a prize.