How-to: copy HDD to SSD with correct 4k alignment

Prevent performance loss!

By


4k alignment

The 4 kB clusters of a file system such as NTFS are converted to 8 logical blocks of 512 bytes each, and a modern hard disk or SSD convert these to sectors or pages of 4 kB.

In order to ensure that these conversions don't have a negative impact on performance, the file system clusters have to correspond to the underlying 4k sectors or pages. You can see this in the image below. Each NTFS cluster needs to precisely correspond to a combination of 8 logical sectors in order to enable a one-to-one relation between clusters and physical sectors.

If that doesn't happen, you end up with a situation such as in the second picture. You can see that the first NTFS cluster starts at logical sector 6, which is not a multiple of 8. In this example the NTFS cluster 2 lines up with logical sectors 14 to 21. Those sectors are physically part of sector 2 and 3.

The result is that the hard disk has to perform twice the amount of work in order to extract the right data and to send it on. If the OS wants to read cluster 2, logical sectors 14 - 21 are accessed. The hard disk will have to read physical sector 2 and 3. With writing it's even worse. When logical sectors 14 - 21 have to be written to, the hard disk first has to read sectors 2 and 3. Then the existing data of logical sectors 9 - 13 and 22 - 24 have to be combined with the new data through 14 - 21. Then the two physical sectors have to be completely re-written. SSDs will have to perform even more work for the wear leveling and the garbage collection algorithms, as at least twice the number of write actions will have to be performed. It will have a negative impact on the lifespan of the SSD, along with its performance.

That's far more work than simply overwriting one physical sector when the partitions are aligned.


When partitions aren't 4k aligned, the clusters of the file sytem do not correspond to the physical sectors on hard disks and the pages on SSDs. 


Also read these hard disk/ssd articles on Hardware.Info

The Hardware.Info website uses cookies.
*