How to tweak ZFS parameters? | zfs_arc_min

The_Saver

Dabbler
Joined
Mar 13, 2022
Messages
31
Hello everyone,

How can I tweak ZFS parameters?

I cannot follow guides because the paths to ZFS as well as modprobe do not exist.

I would like to set my ZFS cache size up from the default of 0.4% of total RAM (which is the standard settings as far as I can tell) to 2 GB RAM or so.
I found out that the setting is called: zfs_arc_min

I tried to make a small script to do the job:
1658763137322.png


The script was based off of this thread:

When I try to run the command he ran "cat /proc/spl/kstat/zfs/arcstats | grep c_" I get the following error:
1658763225099.png


As well as modprobe:
1658763255956.png



Bonus info: I have created the following thread, but I deemed this to be worth its own separate thread. Basically why I want more ZFS cache is because it seems like the minimum for me is just below 1 GB and it makes my Rsync transfers pause all the time which makes my transfers take 4 times as long https://www.truenas.com/community/t...emory-for-services-rsync-is-very-slow.102747/
 
Joined
Oct 22, 2019
Messages
3,641
and it makes my Rsync transfers pause all the time which makes my transfers take 4 times as long
You're going off in the wrong tangent then. Rsync is metadata-heavy.

Please see this thread instead:

And more specifically this post:


Unless you mean when Rsync is actually transferring a large file it hangs?

EDIT: Keep in mind that the syntax between Core -> SCALE is different, and thus I'm not sure how to enter the variable name for a SCALE (Debian-based) system. :frown: It might be a GUI issue, or we're missing something else:
 

The_Saver

Dabbler
Joined
Mar 13, 2022
Messages
31
You're going off in the wrong tangent then. Rsync is metadata-heavy.

Please see this thread instead:

And more specifically this post:


Unless you mean when Rsync is actually transferring a large file it hangs?

EDIT: Keep in mind that the syntax between Core -> SCALE is different, and thus I'm not sure how to enter the variable name for a SCALE (Debian-based) system. :frown: It might be a GUI issue, or we're missing something else:
Thank you.

Adding this configuration step seems to have fixed my issue!

System --> Tunables
1658772208876.png


It equals to about 2.9 GiB RAM, which is a perfect minimum ZFS cache value for 32 GiB RAM with my use case.

1658772278592.png
 
Joined
Oct 22, 2019
Messages
3,641
There's something funky going on, though. It still does not explain why ZFS is being tentative with the ARC, yet "Services" (still unsure what that means, to this day) consumes the overwhelming majority of your RAM.

Again, I don't have a legit SCALE system to play around with (sticking with Core), so I'm not sure if it's unique to SCALE users and/or a bug in the way the GUI "reports" memory consumption?
 
Last edited:

Patrick M. Hausen

Hall of Famer
Joined
Nov 25, 2013
Messages
7,776
I would start searching for the memory hogs with top/htop ...
 
Top