This article will tell you what 4K alignment is and show you how to achieve 4K alignment.
About 4K Alignment
4K alignment means that the hard disk is formatted according with the definition of 4K sector. And data are written into this disk according to the rule of 4K sector. So, if there is 4K alignment, there is also 4K misalignment. 4K is unaligned because in the previous specification before NTFS6.x, the point (which data are written into) locates actually between two 4K sectors – even if the smallest amount of data are written in, two 4K sectors must be used.
Obviously, this has great impact not only on writing speed but also on reading speed. In the case of 4K misalignment, we must modify it to 4K alignment. Otherwise, for SSD, this will not only greatly reduce data writing/reading speed, but also result in unnecessary writing times in SSD.
1.Definition
4K misalignment is associated with a partitioning technology, called Advanced Format.
Advanced Format is a name for new data structure format adopted by IDEMA.
With the development of the times, hard disk capacity is continuously to be expanded. This makes the previous definition of 512 bytes per sector no longer reasonable. So, 512 bytes per sector is changed to 4096 bytes per sector. This is now called 4K sector.
With NTFS has become a standard hard disk file system, the default allocation unit (cluster) size of NTFS file system is also 4096 bytes. In order to make cluster correspond with sector, namely to align physical disk partition with computer logical partition and ensure reading/writing efficiency of hard disk, there is 4K alignment concept.
Each sector of traditional disk is fixed for 512 bytes. For the new standard 4K sector disk, in order to ensure its compatibility with OS, hard disk manufacturers also simulate sector into 512B sector. Then, there will be the case in which 4K sector misaligns with 4K cluster.
So, we must use the way of 4K alignment to align disk simulating sector to 4K sector. 4K alignment is that we can align hard disk sector to analog sectors whose number is integer times of 8, namely 512B * 8 = 4096B. 4096 bytes are 4K. When you format hard disk partition with Win7 system, hard disk sector is aligned to the integer times of 2048 sectors by default, namely 512B * 2048 = 1048576B = 1024KB. This is also called 1M alignment. And it meets 4K alignment.
As long as the value is the integer times of 4096B, it is 4K Aligned.
2.Principle
The size of each sector of the current computer traditional mechanical hard drives is generally 512 bytes.
When you format hard disk with a certain file system, the file system will compile hard disk sectors, tracks and cylinders. It will determine the number of sectors in a cluster for quick storage. For example, a cluster size of the commonly used file system NTFS in Windows is defined as 4096 bytes.
But because boot sector of NTFS partition takes up a track (63 sectors), the real file system is behind the 63 sectors. Then we can calculate the size of the pre-63 sectors: 512B * 63 = 32256B. We can also calculate the number of clusters according to the default cluster size: 32256B / 4096b = 7.785.
Each cluster will include two physical units and take up latter 512 bytes of the first unit and 3584 bytes at the front of the second unit. In this way, when file system reads and writes a certain cluster, hard disk needs to read and write two physical units. This will reduce reading and writing speed and shorten hard disk service life.
At present, some hard disk partition software is used to spare several sectors behind 63 sectors in MBR in order to align each 4096B cluster of file system. This avoids excessive reading and writing operations while improves reading and writing speed and lengthens service life.
3.Method
How to Achieve 4K alignment
If you partition with the system built-in tool in Win 7 or later versions, the partition after being formatted will be 4K aligned (2048 sectors) by default. So, users don’t need to do any setup. If you still use XP system, then you will depend on third party tool to achieve 4K alignment.
Here, we suggest using the professional partition manager – MiniTool Partition Wizard and its Align function.