Thursday, April 23, 2015

Taking existing HD image and applying to SSD - test your alignment

To fully gain the performance benefits offered by switching to an SSD, the clusters need to be properly aligned with the physical sectors on the SSD.  If not, the performance gain from the SSD will be dramatically impacted and can also contribute to increased wear of the SSD.

First, a clean install of Windows 7 or newer onto an SSD is already setup to do proper alignment. This is not an issue.

The issue can occur when an image is captured from a mechanical (traditional) hard drive and then applied to a Solid State drive.  This could result in mis-alignment of the beginning of th clusters and physical sectors.

If you have taken an image of your computer and then applied it to a new SSD, and would like to know if you are properly aligned, perform these steps.

1) Open a command prompt (cmd) - Start>All Programs>Accessories>Command Prompt
2) Type in this command: wmic partition get Name, StartingOffset and hit <Enter> key
This will return something like this:
Disk #0, Partition #0 1048576
Disk #0, Partition #1 524288000

Now open calculator (Start>All Programs>Accessories>Calculator)

Now divide the value return by the command by 4,096.  If the result is an integer (no decimal value), then your partitions are properly aligned.

So in the example above division produced these results:
256
128000

That indicates proper alignment.  Had the results been something like 254.415 then alignment is offset.

If alignment is offset there are ways to correct the issue. You may want to take a look at these free tools:
http://www.partitionwizard.com/
http://www.disk-partition.com/download-home.html

For the record, a SSD partition can be created with command line parameters to set alignment.
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

The above commands are not a fix for a improperly aligned disk post imaging, this is a command to create the partition with proper alignment.

If these issue affect your or you are interested I suggest doing some googling and more reading.

No comments:

New beginner's guide to PowerShell on my GitHub page

 I created a beginner's guide to PowerShell here: https://github.com/aamjohns/Powershell_Guide/blob/main/README.md I hope it helps someo...