This past Monday, I made a news post that explained my upcoming plans to install an SSD in my personal PC, to help get a better understanding of the real-world benefits of using one on a day-to-day basis. Simply put, I’m tired of boasting about how great the SSD revolution is without actually using one outside of our benchmarking machines. Once I’m prepared to do the upgrade, the drive to be installed will be Kingston’s SSDNow M-series 80GB, based on Intel’s X25-M G2.
Since that post, I got in contact with Intel who clarified a few of the points surrounding the issue of using TRIM under Linux. Sure, this is a topic that bores most people, but as a full-time user of the OS, I care about it quite a bit, and I’m sure a lot of others out there are in a similar situation as me. And as frustrating as I’ve found tracking down the information to be, I’m hoping this investigative sleuthing will affect a lot more than just me.
Intel made a couple of points that cleared up a lot, starting off with the fact that TRIM is indeed alive and well in Linux, and it comes down to having the right software installed to take advantage of it. I was pointed to a PDF that explains how the command can be executed (section 7.10.3.2), and that’s all that’s needed for a software engineer to implement the feature, whether it be someone in charge of a distro, a piece of software, or a file system.
I was also told that it wasn’t only ext4 that currently supported TRIM, but Btrfs, GFS2 and XFS do as well, with more to be added later if the file system developers decide to add it (hopefully, they will). Past the file system, there are two things that need to be in place for TRIM to work: a TRIM-aware Linux kernel or an application capable of passing the command (like hdparm) and of course, also an SSD that supports it.
Intel also stated that it’s been working with Red Hat and upstream Linux developers to provide guidance on supporting the feature in their (and other) operating systems for its particular SSD. TRIM in general isn’t SSD-specific, however, so if the support is there, then any distro to natively support it should do so with any TRIM-capable drive. Sadly, Intel couldn’t state when the fruits of this guidance would be seen, but I’m hoping it won’t be too long before something pops up.
There’s still just one thing I’m a little confused about. How can we use TRIM now? After all, even Intel said that it’s supported, so where is it? Well, there’s hdparm (a Linux hard drive benchmarking tool), but when looking at the help file, this message made me a little wary, “For Solid State Drives (SSDs). EXCEPTIONALLY DANGEROUS. DO NOT USE THIS FLAG!!“. Can you blame me?
I think a project is in order. In the next week or two, I’d like to install Kingston’s SSD not in my personal machine, but in the benchmarking machine as a secondary drive. I’ll install Gentoo Linux on the primary SSD or HDD, so as to make it easy to wipe the drive entirely should I need to during testing. Benchmarking the clean SSD, dirtying the heck out of it, and then running a benchmark again should be a good enough method of seeing whether or not TRIM works. I’m hoping that’s not going to be easier said than done.