

Doing a send/recv doesn’t change block sizes. In order to change the block sizes of data already on a pool, you’ll have to copy thing to a new dataset with rsync or something (and verify everything is there). Zfs set recordsize=4M your_pool/your_dataset # Actually sets the recordsize on your pool root or datasets # Permanently changes max recordsize to 16MĮcho "options zfs zfs_max_recordsize=16777216" > /etc/modprobe.d/zfs.conf
#Zfs raid level openzfs free#
Also note that some free space fragmentation is not only expected but a good thing, it’s only a problem when it becomes high and consists mostly of small blocks.Īgainst, double check these commands # Immediately changes max recordsize to 16M until reboot.Įcho "16777216" > /sys/module/zfs/parameters/zfs_max_recordsize
#Zfs raid level openzfs full#
The performance degradation from free space fragmentation isn’t something that shows up in traditional quick and stupid benchmarks, though it also doesn’t really become pathologically until the pool is getting close to full and is more of an enterprise concern. However, because of how ZFS works, having a slightly larger recordsize trades a little performance loss now, for greatly reduced free space fragmentation (and thus saved performance) later. It’s normally been suggested to match recordsizes with write sizes (like the cluster_size of a database).


If you have an active dataset, like for torrents, logs, databases, then consider leaving it at the default 128K, though 64K should be fine too. Going higher generally doesn’t give much benefit unless you hoard video like me. You are most likely writing once, and accessing rarely. Unless you are using a ZVOL on RAIDZ, in which case you’ve made a terrible mistake.įor general NAS storage, set this to 1M or 4M recordsizes. Things are generally fine past 32K though, and honestly most of your storage is going to generate much larger blocks. But for all of these performance is going to be terrible compared to mirrors.

Likewise RAIDZ2 amplifies space occupied by 3 times like a triple mirror. Because of how RAIDZ and blocks work, small blocks (4K and 8K, and to a lesser extent 16K) can actually take up 2x their space on RAIDZ1, the same as a mirror. I don’t like RAIDZ1 (or RAID5).Ī slightly more complicated answer is RAIDZ sacrifices performance for what can sometimes be considerably less space efficiency than you might think. This come down to personal opinion, but the answer for me is for 6 or less disks, mirrors are best. If I reformat this, what’s the best layout for ZFS these days? # Permanently changes max ARC usage, but only occurs the next reboot.Įcho "options zfs zfs_arc_max=34359738368" > /etc/modprobe.d/zfs.conf Lasts only until rebootĮcho "34359738368" > /sys/module/zfs/parameters/zfs_arc_max # Changes max ARC usage immediately, though it may not show up immediately. Honestly 16GB is more than enough for that pool size.ĭouble check these commands, but you can change max ARC the following ways # To get the current ARC size and various other ARC statistics, run this command: Note that the system asking ZFS to free up ram is very slow, and sometimes not fast enough to prevent and out of memory error, so give your system plenty of breathing room. This can be changed to whatever you like. The system has 32GB of RAM, I don’t think I’ve seen it more than half used.īy default ZFS only uses up to half the ram available. Scan: scrub repaired 0B in 0 days 11:47:22 with 0 errors on Sun Feb 13 12:11:23 2022 I was concerned about but it looks like it’s been resolved pool: BoxODisks I think I’ll forgo the cache this time and move to a 1TB SSD as boot drive (currently on SATA DOM). If I reformat this, what’s the best layout for ZFS these days? Record sizes? Compression? Apparently I created this pool back on January 9 2016, I don’t think I’ve done much maintenance since then. The system has 32GB of RAM, I don’t think I’ve seen it more than half used. Am looking at rebuilding my NAS, currently running Ubuntu Server 20.04 with 4x8TB drives (plus an old 128GB SSD as cache, but I don’t think it’s doing anything useful).
