Dhruv Bhutani has been writing about consumer technology since 2008, offering deep insights into the personal technology landscape through features and opinion pieces. He writes for XDA-Developers, where he focuses on topics like productivity, networking, self-hosting, and more. Over the years, his work has also appeared in leading publications such as Android Police, Android Authority, CNET, PCMag, and more. Outside of his professional work, Dhruv is an avid fan of horror media spanning films and literature, enjoys fitness activities, collects vinyl records, and plays the guitar.
There's no getting around the fact that I'm running out of storage on my NAS. Unfortunately, right now is the worst time to buy more hard drives. It's impossible to justify the two- or even three-times higher cost. However, between my growing collection of movies, TV shows, music library, and documents, something had to change.
That's why I decided to enable ZFS compression across my storage pool on TrueNAS. The idea is that ZFS compression will allow me to eke out a bit of space by storing certain file types more efficiently without changing how the rest of my setup works. The best part here is that it works automatically. Here's what I discovered.
ZFS compression works in the background without requiring you to change your workflow
Picking a ZFS compression algorithm that works for my architecture
The coolest thing about ZFS compression is precisely how hands-off it is. Once enabled, you can copy files over your NAS, stream movies, or access your documents as usual. ZFS handles the compression while writing data to the storage pool and decompresses it when it needs to read it. And all of this is transparent to both users and applications.
With traditional file compression, I would have to create archives, extract those files before using them, or rely on applications to handle those compressed formats. Media and streaming are a big part of my setup, and neither Plex nor Jellyfin can handle archived files, making it a non-starter for me. I can't introduce another layer of file management just to squeeze a bit more capacity out of my drives.
ZFS compresses data at the storage level itself. In fact, compression happens as data is written, and ZFS can systematically choose not to compress blocks that do not benefit from compression. That matters because not every file type benefits from compression. Image file types like JPEG are compressed by default, so there's little benefit. On the other hand, a text document or a database can shrink down significantly. Similarly, movies and media that are already encoded in, say, H.265 won't see much reduction in storage use.
There's another aspect to ZFS compression, and that's the algorithm being used. I'll admit I'm relatively new to ZFS, coming from the much more straightforward Btrfs-based Synology world. It's taken me a bit to understand the differences between LZ4 and Zstandard algorithms. While the former prioritizes speed with useful space savings, Zstandard is the one to choose when you need adjustable compression levels and can afford more processing time for better compression.
My setup runs on a fairly low-powered machine, so I prioritize a balanced compression setting over the most aggressive option. After all, compression can only go so far.
ZFS compression won't reclaim space from existing files automatically
With a multi-terabyte media library, this was the obvious place to look when examining my NAS usage. Set realistic expectations for your use case.
Most video files are already compressed before you add them to your storage pool. Formats like H.265 already have heavy compression baked in to reduce file sizes. Running these files through another compression algorithm rarely helps, and that's what I observed. My library is mostly full of H.265 files, and there was virtually no difference in storage use.
However, that doesn't mean ZFS doesn't make sense on a media server. My NAS also stores metadata, especially for Plex, configuration files, and databases. While these aren't huge files to begin with, ZFS compression eke out a bit more space, and those savings add up across larger collections. The same goes for my lossless music library. While the music files themselves don't save me too much space, the associated metadata does.
The biggest storage savings come from documents, logs, and application data, which can often achieve as much as a 2:1 compression ratio, effectively giving you double the storage. That said, it's hard to quantify because these files vary widely by use case, but the key point is that you're not applying this compression manually. ZFS evaluates the data as it writes and stores the blocks as efficiently as possible.
While we're at it, it's worth keeping in mind that ZFS compression can't be applied retroactively. If you've already got a storage pool full of data, switching on compression won't make a difference. The setting only applies to newly written data.
A practical way to extend existing storage
What makes ZFS compression worthwhile in a setup like TrueNAS isthat it's pretty hands-off. How much space you'll save ultimately depends on what you're storing on your NAS. If it's documents, databases, and the like, you can expect a significant reduction in storage use. If you're media-first, less so. But since the compression happens on the fly with little to no overhead and no downside, you need very little oversight. Just enable it and continue using the NAS as normal. I'm still in my early days of experimenting with ZFS, but to me, it's pretty clear that this is the way to go for any future setup.
TrueNAS SCALE
TrueNAS Scale is the new scalable version of TrueNAS, which is free for community use.
