Ubuntu and TRIM

I just purchased a Kingston SSD 64GB for $64 (after rebate) and installed it on my Acer 1410. I will be posting my experience with it soon, as well as the computer itself. For now though this post is more of a call for help and frustration.

Linux has had TRIM support since kernel 2.6.33 (Feb 2010). Windows 7 has had TRIM support since its launch (Oct 2009). OS X hopes to have proper TRIM support in its upcoming 10.7 (Lion) release.

Thus Ubuntu has had support for TRIM since 10.04, and I was excited to partition my SSD and dual-boot Ubuntu 11.04 with Windows 7. Having done that I’ve been using Ubuntu for about 3 days now, though I should note this is not my first experience with Ubuntu. I thought I would look into checking whether TRIM is enabled and active on this install, just to be sure.

Unfortunately there is no easy way to check TRIM is enabled in Linux, much less Ubuntu, like there is in Windows. I found some helpful HOWTOs on how to check TRIM function and it largely consists of writing a random file to the drive, removing it, and then checking to see if the removal occurred as would be expected with TRIM support. When I performed this test on my installation the drive did not pass, so I followed the HOWTO on enabling TRIM. I followed the instructions, restarted, performed the test again, and still no dice.

I am not the only person having trouble with Kingston SSDs on Ubuntu, though that person has not listed the same model as me.

Now per the Kingston website (that I linked to in my first sentence),

SSDNow V+100 feature an independent garbage collection function that maintains a system at optimum performance level. This is especially important for systems running on Windows XP, which doesn’t feature TRIM, and it will also help organizations extend the software cycle on their systems, delaying upgrades of operating systems and compatible applications.

which suggests that I should not worry if TRIM is not working in Ubuntu. However I am still concerned for the life of this SSD drive, as SSD drives are already limited in how long they last.

I am considering uninstalling Ubuntu and reformatting the drive back to NTFS, which is sort of a pain. Still it’s something I would have to do to protect my investment which is a shame. If anyone has any other ideas I would gladly appreciate it.


2 thoughts on “Ubuntu and TRIM

  1. Here they’ve got a very similar guide but listed some slightly different commands for testing: http://askubuntu.com/questions/18903/how-to-enable-trim (I would recommend double-checking everything that you’ve done with everything said there) (Also, make sure you don’t copy the UUID # when editing your fstab file, just add the “discard,” as described in your guide)

    As that guide was written before Unity, it’s now easier to just press the Meta (Windows) key and type “disk utility”. To find your drives device name: select your SSD in Disk Utility and near the top (under the “Drive” heading, not the “Volume” heading) there should be something like Device: /dev/sda . You’ll use that in the guide.

    Also, I agree that this should be something easier to check. It would ideally be actually part of Disk Utility. They have SMART monitoring and checks built-in for regular HDs, so it seems like a TRIM enable and check would fit right in!

    You may also check this out: http://askubuntu.com/questions/1400/optimize-for-ssd

    • Thanks Jonathan. The guide you linked to did have some different instructions but even after following those, and waiting a few minutes and repeating the read test, the test did not succeed.

      I entered “discard” in the correct portion of the fstab file (thanks for the tip on finding Disk Utility and using the correct drive, I was actually using the meta button already, and that is how I had checked for the correct drive letter).

      Finally when I went to bed last night I meant to update the post (and I will later today) to state that although Windows lets you check whether TRIM is enabled, it doesn’t actually indicate whether TRIM is working. Here in Ubuntu these commands are actually checking to see if TRIM is working which is a step up from Windows.

      Btw this boots into Linux in less than 20 seconds including BIOS. It’s REALLY fast! A few more went on sale yesterday, including a 128GB Kingston for $130 (after rebate). It was with great self control that I stopped myself!

Leave a Reply

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

WordPress.com Logo

You are commenting using your WordPress.com 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