How Not to Align an SSD

So over the holidays, I bought a new (275GB) SSD to take over the 60GB SSD I already had in place (which was dedicated for the Linux system files).  If done right, I would have around 200GB for CCache and Out folders for a few ROMs.  Why? It comes down to cutting Android compiles into a fraction of the time, since there is a lot of I/O work done compiling code – and there are dozens of gigabytes of code to go through with every build.

The package arrived around the time I posted the last video.  The easy part was running CloneZilla (again) to duplicate the contents from the Kingston 60GB to the Crucial 275GB.  Then all that was left would be to check alignment, create the new “speed” partition, and then do the drive swap.

Except there were bumps in the road.

Upon checking alignment, I got the reading back that the cloned partition was not aligned.  No problem, I will just move the partition to put it into alignment (LifeHacker has a trick).

If only it was that easy.  I moved the partition and moved it back to 1MiB (true megabyte), but “align-check opt 1” was still coming back as “not aligned”.  After a few different configurations I found the cause.  There are minimal requirements for alignment and (what I was specifying with the aforementioned command) optimal.  Minimal alignment is something like 512 bytes typically, with optimal around 1MiB…typically.  My optimal was a weird number, worked out to something like 31.9MiB, and GParted wanted whole numbers.  So, I had to be satisfied with minimal requirements (or pull my hair out).

With that frustration out of the way, I proceeded to add an extended partition and then a logical, both filling out the rest of the drive.

After changing out the SSDs and booting up, I (after the video ends) added an fstab entry for the new “speed” drive, assigned perms for the “android” user to use it, set up Ccache and Out folders for each of the three ROMs I build for, and then tested one of the builds from a “make clean”.

The first time I did not experience any improvement.  Maybe because Ccache was being built as well – approximately 100 minutes.  I then ran another build from a “make clean” state, and behold … 30 minutes.  Not too bad for a second generation i5 PC.

At any rate, you can watch most of this on YouTube.

Something else that did not make the video (nor did I make a separate one), was that a day after the install, my PC sent me an email telling me my platter drive had a SMART error (unrecoverable bad sectors to be exact).  So as it was still well under warranty, I submitted an advance return-materials-authorization (RMA) to get a replacement before sending the bad one back.  That gave me the opportunity to use CloneZilla one more time to duplicate the drive.  No issues since then.

The next recording won’t be too far behind, as I have parts for a Network-Attached Storage (NAS) server on the way.  I also have a microphone coming (to help resolve the low volume issue), but it will not be here in time for the NAS build.

That’s all I can think of for the time being.  Cheers.

How Not to Align an SSD

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s