Configuring Disk Alignment
Windows 2000 has an internal structure called the master boot record (MBR) that limits the maximum number of hidden sectors to 63. (For more information about the master boot record, see "Disk Concepts and Troubleshooting" in this book.) This characteristic of the MBR causes the default starting sector for disks that report more than 63 sectors per track to be the 64th sector. As a result, when programs transfer data to or from disks that have more than 63 sectors per track, misalignment can occur at the track level, with allocations beginning at a sector other than the starting sector. This misalignment can defeat system optimizations of I/O operations designed to avoid crossing track boundaries.
Additional disk-design factors make proper alignment even more difficult to achieve. For example, track information reported by disks is not always accurate. In addition, many disks have different numbers of sectors on different tracks (as might be the case with the outer bands versus the inner bands). Diskpar.exe, a sample program on the Windows 2000 Resource Kit companion CD, shows how you can use Windows 2000 APIs to obtain and set partition information. By applying the same functions used in this tool, you can avoid performance loss due to disk misalignment on disks with large track sizes and alignment optimizations.