Problem description
The traditional rotating disks are divided into physical sectors. The Windows operating systems and their components operate according to this sector logic. Despite the fact that SSDs store the data in a completely different way, they are still being treated with this sector logic.
The alignment of the SSD is required to assure that a logical sector starts exactly at the beginning of a physical page of the SSD. Without the alignment, the sector boundaries and the page boundaries will not match and sectors will span pages. That would require for a Windows write operation to clear two blocks in lieu of only one thus reducing the write speed by 50%.
Situation
If you install Windows7 on a brand new SSD, you need not make any special arrangements because the Windows7 installer will do the alignment for you. For Vista you are lucky because the start sector happens to match a SSD page. For XP the start sector is 126 which would be in the middle of a SSD page, thus a prior alignment is required.
A similar situation is present when you clone an existing OS (including Windows7) on a new SSD.
Solution
The easiest way to align an SSD is to create an aligned partition on the SSD with the help of Diskpart. Open an elevated command prompt and run the following sequence of commands – each line followed by Enter.
Diskpart
List disk
Select disk n (where n is the number that was given for your SSD in List disk)
Clean
Create partition primary align=1024
Format fs=ntfs quick
Active (assuming you want to install an OS)
Exit
Note: If you want to create a 100MB partition with alignment, the create command is:
Create partition primary size=100 align=1024
The size unit is always MB.
Verification
If you want to verify the alignment (e.g. for a SSD where you are not certain whether the proper alignment was done), you use the following commands.
Diskpart
List disk
Select disk n (where n is the number that was given for your SSD in List disk)
List partition
Now you should see a result like this.
Partition ### Type Size Offset
------------- ---------------- ------- -------
Partition 1 Primary 59 GB 1024 KB - but 64KB or any number divisible by 4 is also good
The offset (in KBs) has to be divisible by 4.
Note: Some readers and users of this tutorial got confused because the alignment numbers in a typical Windows7 installation are shown as:
1024KB for the 100MB partition
101MB for the next partition - which is most likely the C partition
They think that 101MB is not divisible by 4 and that there must be a problem. But that is not so. If you convert 101MBs into KBs (multiply by 1024), then the number is divisible by 4 and the partition is aligned.