Microsoft KB Archive/929491
Article ID: 929491
Article Last Modified on 10/11/2007
- Microsoft Windows Server 2003, Enterprise Edition
- Microsoft Windows Server 2003, Standard Edition (32-bit x86)
- Microsoft Windows Server 2003, Enterprise Edition for Itanium-based Systems
- Microsoft Windows Server 2003, Standard x64 Edition
- Microsoft Windows Server 2003, Enterprise x64 Edition
- Microsoft Windows XP Home Edition
- Microsoft Windows XP Professional
- Microsoft Windows 2000 Advanced Server
- Microsoft Windows 2000 Server
- Microsoft Windows 2000 Professional Edition
Disk performance may be slower than expected when you use multiple disks in Microsoft Windows Server 2003, in Microsoft Windows XP, and in Microsoft Windows 2000. For example, performance may slow when you use a hardware-based redundant array of independent disks (RAID) or a software-based RAID.
This issue may occur if the starting location of the partition is not aligned with a stripe unit boundary in the disk partition that is created on the RAID.
A volume cluster may be created over a stripe unit boundary instead of next to the stripe unit boundary. This is because Windows uses a factor of 512 bytes to create volume clusters. This behavior causes a misaligned partition. Two disk groups are accessed when a single volume cluster is updated on a misaligned partition.
Note This issue does not affect single disks because single disks currently use 512-byte sectors. 512 bytes is the smallest unit of storage that Windows can use.
Windows creates partitions that are based on a predefined number of sectors. The starting location for a disk partition in Windows Server 2003 is either the 32nd or the 64th sector, depending on the information that is presented to the operating system by the mass storage controller.
Note Disk partitions always reserve the first sector of the partition for code and for partition information, such as the number of sectors and the starting sector. The actual data part of the partition starts from the second sector of the partition.
To resolve this issue, use the Diskpart.exe tool to create the disk partition and to specify a starting offset of 2,048 sectors (1 megabyte). A starting offset of 2,048 sectors covers most stripe unit size scenarios.
To verify that an existing partition is aligned, perform the calculation that is described in the "More Information" section.
To align a disk partition on a RAID that has a 2,048-sector offset, follow these steps:
- At a command prompt, type diskpart, and then press ENTER.
- Type the following commands at the DISKPART prompt, and then press ENTER:
- list disk
Note You receive output that resembles the following:
Disk ### Status Size Free Dyn Gpt -------- ---------- ------- ------- --- --- Disk 0 Online 37 GB 8033 KB Disk 1 Online 17 GB 8033 KB Disk 2 Online 17 GB 0 B Disk 3 Online 17 GB 148 MB * Disk 4 Online 17 GB 8 MB * Disk 5 Online 17 GB 8 MB * Disk 6 Online 17 GB 8 MB * Disk 7 Online 17 GB 8 MB * Disk 8 Online 17 GB 435 KB * Disk 9 Online 17 GB 8 MB * Disk 10 Online 17 GB 8033 KB
- select disk
Use the select disk command to set the focus to the disk that has the specified Microsoft Windows NT disk number. If you do not specify a disk number, the command displays the current disk that is in focus.
- create partition primary align=1024
- When you type this command, you may receive a message that resembles the following:
- The align=
numberparameter is typically used together with hardware RAID Logical Unit Numbers (LUNs) to improve performance when the logical units are not cylinder aligned. This parameter aligns a primary partition that is not cylinder aligned at the beginning of a disk and then rounds the offset to the closest alignment boundary.
numberis the number of kilobytes (KB) from the beginning of the disk to the closest alignment boundary. The command fails if the primary partition is not at the beginning of the disk. If you use the command together with the offset =
numberoption, the offset is within the first usable cylinder on the disk.
- list disk
- Type exit, and then press ENTER.
- Click Start, click Run, type diskmgmt.msc, and then click OK.
- In the Disk Management Microsoft Management Console (MMC) snap-in, locate the newly created partition, and then assign it a drive letter.
- Use the NTFS file system to format the new partition, and then assign a cluster size.
Note This sample procedure is for a single partition per RAID group.
For more information about multi-partition alignment per RAID group, click the following article number to view the article in the Microsoft Knowledge Base:
923076 An updated version of the Disk Partition tool for Windows Server 2003 is available
To verify that an existing partition is aligned, divide the size of the stripe unit by the starting offset of the RAID disk group. Use the following syntax:
((Partition offset) * (Disk sector size)) / (Stripe unit size)
Note Disk sector size and stripe unit size must be in bytes or in kilobytes (KB).
Example of alignment calculations in bytes for a 256-KB stripe unit size:
(63 * 512) / 262144 = 0.123046875
(64 * 512) / 262144 = 0.125
(128 * 512) / 262144 = 0.25
(256 * 512) / 262144 = 0.5
(512 * 512) / 262144 = 1
Example of alignment calculations in kilobytes for a 256-KB stripe unit size:
(63 * .5) / 256 = 0.123046875
(64 * .5) / 256 = 0.125
(128 * .5) / 256 = 0.25
(256 * .5) / 256 = 0.5
(512 * .5) / 256 = 1
These examples shows that the partition is not aligned correctly for a 256-KB stripe unit size until the partition is created by using an offset of 512 sectors (512 bytes per sector).
Note The number of disks in the array group does not affect the partition alignment. The factors that affect partition alignment are stripe unit size and partition starting offset.
For more information about the Diskpart.exe tool, visit the following Microsoft Web site:
Keywords: kbtshoot kbprb kbexpertiseadvanced KB929491