SCALE 24.04: Recommended way to increase ZFS ARC size?

I will be upgrading to a server with more memory, and I’d like to allow it to use more than 50% for the ZFS cache. I have seen some past discussions about this, which suggest using a sysctl “tunable” (advanced settings). The parameters I’ve seen suggested are either vfs.zfs.arc_max or zfs_arc_max, but neither of those appear to exist on my system. In fact, # sysctl -a | grep zfs doesn’t return anything relevant.
The only way to change this parameter that seems available is manually writing to /sys/module/zfs/parameters/zfs_arc_max, but that doesn’t feel right. Any suggestions applicable to the current version would be appreciated.

1 Like

Cobia was the last version with the 50% limit. You don’t have to do anything on dragonfish or later this month electric eel to use more then 50% arc

2 Likes

Is that what “behave identically to TrueNAS CORE” means?

Yes, that’s what it means

Apologies for raising an old thread, but what’s the appropriate way to specify such a value in Scale? If you know how much RAM your needs allow, for example calculated what ram other processes need at most, and want ARC to have the (calculated) rest of it?

This command will set the limit:

echo SIZE_IN_BYTES >> /sys/module/zfs/parameters/zfs_arc_max

But you should add it as a post init script because the value will be reset on reboot. The default SIZE_IN_BYTES value is 0

But you shouldn’t have to limit arc since it shrinks itself if other processes need ram.

1 Like

Can all zfs module parameters be reliably set that same way? Or only certain ones?

If you know the exact parameter name you should be able to set all that way