I'm testing out FreeBSD 9.1 for a ZFS build and I'm having some issues with some of the tunables that are recommended on the wiki. For each of the settings in the L2ARC discussion section, they say they cannot go in /etc/sysctl.conf because they need to be present before the ZFS pool is loaded. I'm pretty new to FreeBSD and I found that they should probably go in /boot/loader.conf, so I went and threw them in there. The strange part is... they don't all seem to work. The following sysctl variables never seem to change if I place them in the loader.conf:
- vfs.zfs.l2arc_write_max
- vfs.zfs.l2arc_write_boost
- vfs.zfs.l2arc_headroom
Code:
[CMD=#]uname -a[/CMD]
FreeBSD zfstest 9.1-RELEASE FreeBSD 9.1-RELEASE #0 r243825: Tue Dec 4 09:23:10 UTC 2012 [email]root@farrell.cse.buffalo.edu[/email]:/usr/obj/usr/src/sys/GENERIC amd64
[CMD=#]sysctl vfs.zfs.l2arc_write_max[/CMD]
vfs.zfs.l2arc_write_max: 8388608
[CMD=#]sysctl vfs.zfs.prefetch_disable[/CMD]
vfs.zfs.prefetch_disable: 1
[CMD=#]cat /boot/loader.conf[/CMD]
vfs.zfs.l2arc_write_max="209715200"
vfs.zfs.prefetch_disable="0"
[CMD=#]reboot[/CMD]
<log back in>
[CMD=#]sysctl vfs.zfs.prefetch_disable[/CMD]
vfs.zfs.prefetch_disable: 0
[CMD=#]sysctl vfs.zfs.l2arc_write_max[/CMD]
vfs.zfs.l2arc_write_max: 8388608