L2ARC parameters on Scale

Hi,
ZFS (still) has some very conservative default parameter settings for L2ARC which were set back in the days of SATA SSDs. E.g. l2arc_write_max which caps writing to the L2ARC at 8MB/s.

I’ve been using Optanes for SLOG and L2ARC with fine and measurable results under Core, once I adjusted some of the default L2ARC parameters as tunables.

I recently upgraded to Scale. As some may know, Linus refuses to integrate ZFS into the kernel due to legal issues with Oracle so it remains a kernel module. Therefore its settings are module parameters.

When you have control over the OS it’s straightforward to set those via creating a file /etc/modprobe/zfs.conf. But what is the recommended approach in Scale? I haven’t seen this exposed to the user anywhere.

I guess alternatively I could create a small script that sets them programmatically and run it post boot.

However, I would imagine this to be a pretty common topic for anyone who wants to run L2ARC on Scale, so ought to be an official way…?

Edit: typo

Replying to myself, just noticed ZFS have changed many of the defaults in the master branch so maybe it’ll change for 2.3… Most parameter values quadrupled. I guess less reason to set them yourself then…

Nevertheless I think still a valid question for Scale how to make these available to user similarly to in Core.

This may be of interest.

Thanks @Okedokey. Interesting indeed but not related to L2ARC although it confirms that TrueNAS sets some ZFS parameters to non-default values namely zfs-arc-max. Original point still stands - in Core you could change ZFS parameters in the GUI directly via tunables. No such option in Scale as ZFS parameters under Linux are configured using other mechanisms that are not made available to the user in Scale other than creating your own custom scripts to run at boot (this is what I ended up doing…).

Exactly, post init script, or even not a script just the command in the postinit script in the UI, that way it’s still all GUI just like Core though the mechanism is different.

1 Like