I am currently running an Ubuntu 12.10 Desktop with some zfs pools. I have installed ZFS using the following instructions and from the PPA it contains: https://wiki.ubuntu.com/ZFS

I have a bursty/fluctuating write performance issue which is apparently a known issue. I have found several posts where people have the exact same problem. Constant fluctuating writes. According to the http://wiki.freebsd.org/ZFSTuningGuide I need to apply some settings to "avoid the bursty IO that's often seen with ZFS." This must be done in the /boot/loader.conf.

Since Ubuntu does not use that, as far as I can tell, I have no idea how to apply settings like:


Which is mentioned in the general tuning section. Other sources say use sysctl. But when I do I get this: sudo sysctl vfs.zfs.prefetch_disable="1" sysctl: cannot stat /proc/sys/vfs/zfs/prefetch_disable: No such file or directory

I cannot find anything for vfs or zfs in /proc/sys.

Where does one do this kind of thing in Ubuntu?



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.

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.

  • sudo modprobe zfs FATAL: Module zfs not found. I realise now that this is not a fuse implementation. I installed Native ZFS. Sorry I have updated the question correctly. Your options do not work in this case. – psypher246 Dec 17 '12 at 20:12
  • "Module not found" means that Native ZFS is not installed or incompletely configured. Run dkms status. You should see something like zfs,, 3.2.0-36-generic, x86_64: installed. – Darik Horn Dec 19 '12 at 16:54
  • No such module. The ZFS PPA does not seem to install ZFS as a module. – psypher246 Jan 8 '13 at 8:05
  • The ZFS PPA do install ZFS as a module. Install kernel headers, and then run dpkg-reconfigure. That way, DKMS compiles and installs the module. Also, if you have new problem, post a new question. – Olli Apr 20 '13 at 10:48

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

For exmaple:

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

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.