Partition alignment

On this page 7

Partition alignment is the practice of starting every disk partition at an offset that is an exact multiple of the drive’s physical unit, such as a 4,096-byte sector on an Advanced Format hard drive or a flash page and erase block on a solid-state drive. In operating systems and OS storage, correct alignment ensures that one file system cluster maps to whole physical units, so a single logical write does not straddle two of them.

Modern installers align partitions automatically to a 1 MiB boundary (2,048 logical sectors of 512 bytes), which is divisible by every common physical sector, page and RAID stripe size. Misalignment usually appears only when an old tool, a cloned disk image or a legacy layout from the MBR era is carried onto newer hardware.

Why misaligned partitions slow a drive down

A misaligned partition forces the drive to touch two physical units for an operation that should touch one. The file system issues writes in clusters, typically 4 KiB, and the drive stores data in physical sectors or flash pages; when the two grids are offset, every cluster overlaps a boundary.

On an Advanced Format hard drive with 512-byte emulation (512e), a 4 KiB write that spans two physical sectors triggers a read-modify-write cycle: the drive reads both sectors, merges the new data and writes both back. Random write throughput can fall by roughly 30 to 50 percent or more, depending on the workload and the drive firmware.

On a solid-state drive, a misaligned write can span two flash pages and, during garbage collection, affect two erase blocks. The result is higher write amplification, lower sustained performance and somewhat faster wear of the NAND cells.

Sector, page and stripe sizes that alignment must respect

Correct alignment means the partition offset is divisible by the largest relevant physical unit in the storage stack. The table lists the units an administrator typically encounters and the offsets that satisfy them.

Storage unitTypical sizeAligned at 1 MiB
Legacy 512n sector512 bytesYes
Advanced Format sector4,096 bytesYes
NAND flash page4-16 KiBYes
Hardware RAID stripe unit64-256 KiBYes for most sizes
SSD erase block1-8 MiB or morePartly, varies by drive
Physical units and aligned offsets

Erase blocks are often larger than 1 MiB and their real size is rarely published, so perfect erase-block alignment is neither verifiable nor critical. The TRIM command and the drive’s own mapping layer absorb most of the remaining effect.

How partition tables and tools set the starting offset

The starting offset is recorded in the partition table as a logical block address, so alignment is a property of the numbers the partitioning tool writes. Older tools followed cylinder-head-sector geometry, while current tools use plain sector arithmetic.

Tool or eraDefault start sectorByte offsetAligned to 4 KiB
Windows XP and older fdisk6332,256 bytesNo
Windows Vista and later2,0481,048,576 bytesYes
GNU parted, gdisk, fdisk (current)2,0481,048,576 bytesYes
macOS Disk Utility (GPT)4020,480 bytesYes
Default first-partition offset by era and tool

The old sector 63 start came from the MBR convention of beginning the first partition on the second track of a fictitious 63-sector geometry. Because 63 times 512 bytes is not divisible by 4,096, every partition created this way is misaligned on Advanced Format media. With GPT, the table itself occupies the first 34 sectors, and tools then round up to an aligned boundary.

Checking and correcting alignment

Alignment is verified by dividing the partition start offset in bytes by the physical unit size: a remainder of zero means the partition is aligned. Every major operating system can report the offset without third-party software.

  • Windows: the StartingOffset value from wmic partition or Get-Partition in PowerShell, divided by 4,096.
  • Linux: parted with the align-check optimal command, or the start sector from fdisk -l multiplied by the logical sector size.
  • macOS: diskutil info or gpt show, reading the start block and block size.

Fixing a misaligned partition requires moving its data to a new offset. Partition managers can shift a partition in place, but the safest route is to back up, recreate the partition with a modern tool and restore the files, because a power loss during an in-place move can corrupt the volume.

Partition alignment is frequently confused with other storage settings in the same topic. It concerns where a partition begins, not how the file system inside it is organized.

ConceptWhat it controlsFixes misalignment
Partition alignmentStart offset of the partitionYes
Allocation unit sizeCluster size inside the file systemNo
Disk defragmentationContiguity of file dataNo
Disk formattingCreation of file system structuresNo, unless the partition is recreated
Alignment compared with related storage settings
  • A quick format does not realign a partition, because it keeps the existing start sector.
  • Choosing a larger cluster size cannot compensate for a bad offset; it only changes how often boundaries are crossed.
  • Disk cloning tools may copy an old sector 63 layout to a new SSD unless they offer an alignment option.
  • Alignment applies to every layer: virtual disk files, guest partitions, LVM extents and RAID arrays must all line up.

The idea in brief

A drive stores data in fixed-size boxes, and the file system packs data into its own boxes of the same size. Partition alignment makes sure the two rows of boxes line up edge to edge.

If the rows are shifted, each file system box sits across two drive boxes, so the drive must open and repack two boxes every time it saves something small. Lining them up removes that extra work, and modern systems do it automatically when a disk is set up.

A practical scenario

An IT technician migrates an older office PC from a 500 GB hard drive to a 1 TB solid-state drive using a sector-by-sector cloning tool. The original disk was partitioned years earlier and its system partition starts at sector 63. After the move, the new drive benchmarks well below its rated random write speed, and large updates take noticeably long.

Running Get-Partition shows a starting offset of 32,256 bytes, which is not divisible by 4,096. The technician backs up the system image, uses a partition manager to shift the partition to a 1 MiB offset and verifies the new value of 1,048,576 bytes. A repeat benchmark shows random 4 KiB writes roughly doubled, and the update installation time returns to normal.