This post is meant to address the huge performance loss that can occur from the misalignment of a partition on a Solid State Drive, and how you can fix it.
Some months ago, I bought a Solid State Drive (OCZ Agility4 256GB to be exact) with the intention of using it for my operating system and everyday applications. I wanted to transfer my existing Windows 7 install to the new drive, so my initial instinct was to clone the partition to the SSD rather than creating a new partition, installing a fresh copy of Windows 7, and enduring the long task of reinstalling all the software I need. After some light research I found a lot of people saying that this was either downright impossible, or would horribly ruin the performance of my SSD. I really did not want to install a fresh copy of Windows 7 so I went against the grain and decided to clone the partition anyway.
Cloning my existing windows partition to the new SSD was straight forward. First I had to move enough data out of the partition so that it would fit on the smaller SSD once cloned. This was largely accomplished by moving my Steam folder, which contains somewhere to the tune of 200 installed games, to a secondary hard drive. Once enough files had been moved, I used Acronis Disk Director to shrink the size of the partition to below the size of the SSD. Next, I set up Disk Director to clone the partition to the SSD, however, once it started running it quickly threw up an error and aborted the operation. I have had problems using Disk Director in the past, so this was no surprise. I downloaded Easus Partition Master Free Edition, and started the clone operation again. This time it ran flawlessly. I removed the original hard drive containing the operating system, and booted the computer. At this point the boot configuration on the cloned partition was pointing at the old hard drive that was no longer attached, and I could not start Windows, so I used the Windows 7 install disk to correct the invalid entry. I was now able to start up Windows, running off of my new SSD!
The first thing I did at this point was run AS SSD Benchmark to see what the performance of my new SSD was like. Here are the results:
Comparing against results that others had posted in SSD forums, my results were looking somewhat bad. I know the OCZ Agility4 is not particularly known for its performance, but the benchmark I got was far below average, and had me concerned. Researching the issue, I got reading about partition alignment and how it relates to the way hard drives and solid state drives store data. It turns out that a SSD partition that is misaligned will suffer a large performance hit and shorten the lifespan of the drive. The problem boils down to the fact that partitioning software to date has been designed with hard drives in mind, and aligns partitions optimally for a hard drive. So when you use this software on a solid state drive, it doesn’t know that the alignment should be different, and creates a partition that is badly aligned. You can read more about the details of the partition alignment problem here.
Ok, so how do you find out that your partition is misaligned? Lucky for me AS SSD Benchmark has a check for this built into the program:
Above, I have highlighted the alignment issue with red rectangle. This tells us that the position of the first cluster is 31 K into the partition. Optimally, we want the position of the first cluster to be at a multiple of 1024, so it lines up with the SSD’s physical pages that store the data. Because the partition is misaligned, clusters end up spanning across two pages which means both pages must be accessed to read or write data to that cluster. If we change the position of the partition so that the first cluster starts at a multiple of 1024, the clusters will line up with the pages, and never cross a boundary.
Normally to fix this problem, you need to just be careful when creating a new partition so that you align it properly. However, because I was cloning a partition, and because Disk Director does not yet have support for aligning SSD partitions, this was not an option available to me. Luckily, there are specialized tools specifically to realign an existing partition in place! The specific tool I used was Paragon SSD Alignment Tool 3 (if you click through that link, you can see an animation outlining how the alignment process works). The alignment tool is a simple GUI wizard that presents a list of your storage devices, and allows you to select which ones to align. The alignment process can take quite a long time depending on the size of the partition, and you should make sure not to power off your computer during the process, as it can leave your partition corrupted.
For me, running Paragon SSD Alignment Tool 3 worked without any issues, and afterwards I did another benchmark with AS SSD:
That looks better! Immediately we see that the “31 K – BAD” message has disappeared and been replaced with “2048 K – OK”. The new offset of 2048 is a multiple of 1024, so this means our SSD is now aligned correctly! Also note that the overall benchmark score went from 355 to 550, or about a 65% increase. This is still a relatively low score as far as SSDs go, but I already knew this was not an extremely high performance drive.
So that is all there is to it. If your SSD seems to be giving sub-optimal performance, make sure to check its alignment. Its a small mistake that can have a big cost on performance!