By Koka Sexton
Storage system performance is dependent on many factors, one of which is a properly aligned partitioning scheme. Misaligned partitions cause a significant reduction in the I/O performance of a disk drive through redundant read/write operations and a subsequent reduction in an SSD lifespan by as much as one-third. The introduction of 4K sectors in the latest disk drives creates even more alignment problems for a large proportion of IT administrators. Implementation of enterprise virtual environments and the use of different RAID technologies are also susceptible to misalignment. In most cases, a mismatch between actual physical and logical representations of data causes a significant decay in overall system performance and hardware longevity.
What is Partition Alignment?
A hard drive can be dissected into different sections or partitions for many reasons – such as to segment data or because an operating system typically sits on one partition while applications and files sit on others. These partitions are positioned on the hard drive to optimize the way data is read and written to them. With new hard drives that rely on a different sector base than legacy drives, computers may not be able to recognize this change, effectively reducing the performance of hard drives and in some cases decreasing the lifespan of the drives dramatically.
To ensure the best performance of these drives, it’s important to make sure the partitions are all aligned properly and that data can be written and accessed without any issues. Let’s discuss why partitions can be misaligned and the problems that result from that misalignment.
Partitions can be misaligned because the physical sector size is not 512 bytes and the corresponding software does not know about it. The latest hard disk drives, for example those by Western Digital or Seagate, have an internal 4096 bytes physical sector size and their logic operates 4K chunks of data, but for outside hardware and software they appear as “traditional” hard drives with 512b sectors.
The above illustration shows that the partition has shifted from the disk to start on one 512b sector. As a result, all logical clusters now linked with two actual physical 4K sectors and all read-write operations will be multiplied twice. The entire system performance now becomes degraded, as a hard disk has to make two operations with two sectors to manage data instead of one.
To handle misalignment, a 4K drive must perform a read-modify-write cycle for every write operation –resulting in very slow write times, inefficient disk operations, and poor performance.
What causes this shift? All Windows operating systems before Vista use a factor of 512 bytes to create volume clusters. Thus they place a partition start aligned to 512b sectors and not to 4K sectors, which will cause an issue for anyone using earlier versions of Windows and installing a new hard drive.
Usually the partition start is indented on smaller sectors, because it is an old measure of a disk “cylinder” and some old versions of DOS or Windows demand that the partition has to be aligned to the “cylinder” for correctly addressing and accessing the sectors. It is an old compatibility issue and all modern operating systems do not use this scheme. Instead, the Logical block addressing scheme is used, where there are not any “cylinders” or “heads” and sectors are addressed continuously over a whole disk drive. All versions of Windows prior to Vista create partitions according to this “cylinder alignment” rule.
There was no problem with this rule and partitions alignment in the home users segment before the appearance of the newer 4K hard disk drives. Partitions are not aligned with 4K sectors by default.
Because the data being accessed across misaligned partitions causes so many problems, making a simple shift of the partitions will dramatically increase performance.
Why misaligned partitions are the problem for SSD
Misaligned partitions are even more troublesome for SSD drives than for traditional hard disk drives. Most modern SSD drives are designed using the newer 4K alignment rules. Thus all previously mentioned problems are the same for SSD partitions alignment.
Besides a decline in system speed, there is one crucial SSD issue: the SSD memory cells degradation after multiple write operations. Because of the nature of an SSD, a misaligned disk creates an overbearing workload to read, modify and write to these drives. So if partitions on an SSD are misaligned beside a downgraded system speed, the solid state drive is in danger of being unusable. Partitions alignment eliminates all redundant read/write operations, thus providing a boost in speed and granting SSD a longer lifetime.
Why misaligned partitions are the problem for SAN and RAID
RAID is used to compose many hard disk drives or other storage devices into one large array of data. This array is seen as one large storage device in the system across which data is striped. The granularity at which data is stored on one drive of the array before subsequent data is stored on the next drive of the array (data striping) is based on the drive settings, none of which allow for adjusting for a newer 4K alignment.
System performance may slow when a hardware-based redundant array of independent disks (RAID) or a software-based RAID is used – or if the starting location of the partition is not aligned with a stripe unit boundary in the disk partition that is created on the RAID. In this case, one data operation will be multiplied over several RAID disks.
To resolve this issue, aligning the partitions properly maximizes the performance. All data operations become faster as there are no redundant disk operations.
Naturally, a SAN (Storage Area Network) is just a large RAID distributed over a local network or by Fibre Channel. Thus all issues of RAID partition alignment are the same for SAN.
Why misaligned partitions are the problem for virtual environments
Alignment in a virtual infrastructure is critical to performance, hardware lifecycle, and storage efficiencies. Misalignment results in retrieving more data from an underlying array than what the virtual machine is requesting, which causes inefficiencies requiring more storage hardware resources to serve a workload and slow down the process.
In the future, partition alignment issues for 4K HDD and SSD will lessen as 4K physical sectors and memory pages become visible and accessible on the operating system level, and the need for emulating becomes unnecessary. With that said, misalignment will continue to be a problem for RAID/SAN and virtual environments for the foreseeable future, and it is important to recognize and tackle this problem head-on.
Koka Sexton is manager, business development at Paragon Software