brewedbits.dev

Personal blog with guides and news on selfhosting, Linux and AI, from the Netherlands

nextDash nextdash --aboutYour bookmarks. Your terminal. checks your links knows your Docker host one container, no cloudLive demo →nextdash.cc ↗

Tip: switch on compression when you create a ZFS pool in Unraid

Unraid
~/tips/tip-unraid-zfs-compression

Stop the array > Add Pool > name it, assign disks

Turn on ZFS compression for an Unraid pool and save space without any app noticing.

There are not many settings I’d call free, but ZFS compression comes close. Unraid asks about it when you create a ZFS pool, and the docs recommend saying yes.

You set it in the pool’s configuration screen while you build the pool:

Stop the array > Add Pool > name it, assign disks
click the pool name
  File system type: zfs (or zfs-encrypted)
  Allocation profile: mirror, RAIDZ1, ...
  enable compression
Done > start the array

The docs call ZFS compression transparent: it shrinks data before it reaches the disk, without the apps noticing. That gives you two benefits according to them, less disk usage and often better performance, because writing and reading less data can be faster on a modern CPU. Their tip says to enable it for most Unraid ZFS pools and that it’s safe and rarely affects compatibility or stability.

How much you save depends entirely on what you store. Container appdata, databases and config files tend to be text-like. Video files from a Jellyfin library are compressed already, so I wouldn’t expect miracles on a media pool. It still doesn’t hurt there.

While you’re in the ZFS docs, they also put an old myth to rest: you do not need 1 GB of RAM per TB of storage. Unraid automatically limits ZFS to a reasonable part of your RAM, usually 1/8th of the total, so containers and VMs keep their memory.

The caveat is that this is a pool creation step in the docs, so it’s easiest to get right the first time. Deduplication is the setting next to it that you should leave off, since the docs warn it needs a lot of RAM and can hurt performance badly.

Further reading: Unraid docs: ZFS storage

Going deeper: Guide: your Unraid cache is full and Docker stopped, how to find out why and fix it

More Unraid tips Change the RAID profile of a Unraid BTRFS pool with Balance Replace a disk in a redundant Unraid pool from the Main tab Test every Unraid drive with the DiskSpeed container See the XML behind a VM with the inline XML view in Unraid 7 Choose where a new VM's disk image is created with Unraid's storage override All Unraid tips (77) All topics

Link