ZFS ZFS optimization

Hello everyone,
I've been using zfs on my nas for several years now. I assembled and configured everything myself and am also satisfied.
Now everything should be brought up to date again and that requires your expertise.

Problem:
A scrub currently takes 8 hours, which needs to be reduced.
The compression is still running with lz4, which needs to be increased.
I would also increase the recorder size to 512 or 1024kb. Furthermore, the compression should be done with zstd-4 or -6 in the future.

Unfortunately, I can't estimate the effects of the changes, I don't know enough about that.
A migration of all data will probably take several days, so I can't even try it out quickly.

I must not overwhelm this computer too much, otherwise the transfer rate will drop to <60MB/sec, which I would like to avoid.
Which of the above settings would you recommend?
Are there any other parameters I should adjust?

NAS
Intel® Pentium® Gold G5420 3.8Ghz
WD 2x 4TB Red
8GB ECC Ram

my system is configured as follows:
ashift=12
Zpool mirror ada2 ada3
atime=off
checksum=fletcher4
recordsize=128K
compression=lz4
the hdds are mainly used for long-term archiving. it contains hundreds of GB of holiday photos or videos and backups of all domestic clients.
Could anybody help me?
Thanks a lot
Hgott
 
I think the first thing to answer for yourself is why you think these parameters need to change, and what you think you’ll get out of them.

My initial reactions:

Why does the 8 hour scrub need to change? Depending on how full those 4TB drives are, you’re unlikely to get much faster. Scheduling the scrub to occur overnight once a month would likely lead to an 8hr scrub being a non-issue.

If you’re “mainly storing photos and videos”, changing the compression will likely do nothing. You can look at the compressratio of the current datasets to see. Changing to zstd will be a noticeable performance hit on a two-core system on compressible writes. (How much depends an how fast you are generating data to write.)

Why do you think you need a larger record size? It can reduce usage slightly, but it’s not going to cause large changes in performance. You can try this out on a dataset for a while to see if there is any noticeable benefit. (The only time I ever found larger recordsizes beneficial was on a system that was recording and serving multiple video streams simultaneously.)

What, explicitly, are you hoping to improve with these changes? Given your use case (long term archiving of photos and videos) I don’t expect any of these changes will provide much of a practical performance change. If you really need more performance, you may need to move to a wider pool (multiple spindles serving IO) or different technology (SSD/NVME) and potentially more powerful CPU (to saturate the new IOPS available.) The ZFS defaults don’t in general leave much performance tuning to be required.
 
Thank you very much for your suggestions, I haven't looked at it the way you described it.
I assumed that an 8h srcub is very long and needs optimization. -> no change necessary
The scheduler over night sounds good and is adopted.
Because of the low performance, i will think about a hardware upgrade
 
Back
Top