7

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:

vfs.zfs.prefetch_disable="1"
vfs.zfs.txg.timeout="5"
kern.maxvnodes=250000
vfs.zfs.write_limit_override=1073741824
vfs.zfs.arc_min="512M"
vfs.zfs.arc_max="1536M"
vm.kmem_size_max="8G"
vm.kmem_size="6G"

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?

Thanks

2 Answers 2

3

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.

4
  • 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, 2012 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, 0.6.0.90, 3.2.0-36-generic, x86_64: installed.
    – Darik Horn
    Dec 19, 2012 at 16:54
  • No such module. The ZFS PPA does not seem to install ZFS as a module.
    – psypher246
    Jan 8, 2013 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, 2013 at 10:48
2

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

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .