How do you apply performance tuning settings for Native zfs?

The option is already set by default in most zfs-fuse packages. Double check that this is in the /etc/zfs/zfsrc file:

# zfs-prefetch-disable : disable zfs high level prefetch cache
# This setting can eat as much as 150 Mb of ram, so uncomment if you want
# to save some ram and are ready to loose a little speed.
zfs-prefetch-disable

Alternatively, to set this option for the native ZoL driver, do this:

# modprobe zfs zfs_prefetch_disable=1

To make the change permanent, create a /etc/modprobe.d/zfs file and put this line in it:

options zfs zfs_prefetch_disable=1

Most tunable parameters for ZFS on Linux are set through module options. You can get a full list of available options by running this command:

# modinfo zfs

Most of these options will correspond directly to things that can go in the loader.conf or sysctl on other systems.


You can find more settings in /sys/module/zfs/parameters

For exmaple:

$ cat /sys/module/zfs/parameters/zfs_prefetch_disable
0
$ echo 1 >/sys/module/zfs/parameters/zfs_prefetch_disable