ZFS on FreeBSD supporting TRIM


FreeBSD logo

Speaking of FreeBSD, I initially missed the line in the 9.2 release announcement that ZFS will now support TRIM on SSDs.

For those who don't know, TRIM was one of the earlier technologies broadly designed to help limit the number of overwrite requests to a solid state drive. Traditional hard drives mark deleted sectors as free, which the file system can allocate to other files. For solid state drives, a sector must first be wiped before allocating new data. With TRIM, the OS can inform the SSD where deleted data is located, drastically improving performance and the lifespan of the hardware.

From what I understand of contemporary solid state drives, this is less of a concern now than it was a few years ago. Drives internally handle overwrite requests more intelligently now, so having a set of files constantly changing won't chew up your precious write cycles to the same extent. That said, anything to reduce it from the supply side is a good thing.

For now, what would be the use cases?

What I'm more interested about is the potential applications of this. ZFS is the only file system I currently trust for complete data integrity; my backup FreeBSD machine uses it. For many use cases, the limited capacity and steep cost of SSDs would prevent them being used for data archiving. ZFS also requires a disproportionately large amount of system memory, something which may impact where SSDs are mostly used in the consumer space: laptops.

Disproportionately is a disproportionately large word.

I suppose a larger use would be pooling this SSD with cheaper drives and using some intelligence to determine required service. In the enterprise this would work well for cloud infrastructure deployments; in the home it'd be useful for something akin to Apple's Fusion Drive. That is, if OS X got off crusty HFS+.

Author bio and support


Ruben Schade is a technical writer and infrastructure architect in Sydney, Australia who refers to himself in the third person. Hi!

The site is powered by Hugo, FreeBSD, and OpenZFS on OrionVM, everyone’s favourite bespoke cloud infrastructure provider.

If you found this post helpful or entertaining, you can shout me a coffee or send a comment. Thanks ☺️.