Loaders in WebGUI not working in 8.0.3

Status
Not open for further replies.

DMooring

Dabbler
Joined
Sep 1, 2011
Messages
20
In the WebGUI I have added loaders to change vfs.zfs.txg.sysntime. After a reboot I see the change in loaders.conf.local but a sysctl -a | grep vfs.zfs.txg.sysntime
show the default value. I rebooted using verbose logging and sysctl -a | grep vfs.zfs.txg.sysntime show my new value.
Is it a bug that loader.conf.local does not work with a regular boot?

Using 8.0.3 RC2
 

Ismael Duarte

Contributor
Joined
Jun 13, 2011
Messages
154
I also saw a issue in loaders because all variables are put inside quotes.
vfs.zfs.prefetch_disable=0
when in loaders is converted to
vfs.zfs.prefetch_disable="0"
and doesn't work
 
G

gcooper

Guest
Do you guys have screenshots of the issue? I'd like to repro this and fix it before 8.0.3-RELEASE.
 
G

gcooper

Guest
Do you guys have screenshots of the issue? I'd like to repro this and fix it before 8.0.3-RELEASE.

FWIW, setting autoboot_delay to 10 in the loaders in the GUI worked, so loaders do indeed work like I tested before (quotes vs non-quotes shouldn't matter -- if it does then it's a FreeBSD bug that needs to be fixed)... Two things to keep in mind with sysctls/tunables:

1. Developers could be inconsistent with the naming scheme for tunables/sysctls if they weren't very 'regimented' when they were originally designing the knobs. In particular, code in the kernel that is defined with one of the SYSCTL_* macros with one of the two flags:

Code:
     CTLFLAG_TUN      Also declare a system tunable with the same name to ini-
                      tialize this variable.

     CTLFLAG_RDTUN    Also declare a system tunable with the same name to ini-
                      tialize this variable; however, the run-time variable is
                      read-only.


have a 1:1 sysctl/tunable mapping. There are also some knobs values where the developer chose consistent names and things just work because the names are consistent. There are however, some knobs that have inconsistent names between the sysctl and the tunable (hw.bce/hw.mfi I'm looking at you ;)..).

2. If the developer of the driver/knob things you're doing something unwise, then they'll override your provided values (the VMEM subsystems and ZFS are prime examples).
 
G

gcooper

Guest
In the WebGUI I have added loaders to change vfs.zfs.txg.sysntime. After a reboot I see the change in loaders.conf.local but a sysctl -a | grep vfs.zfs.txg.sysntime
show the default value. I rebooted using verbose logging and sysctl -a | grep vfs.zfs.txg.sysntime show my new value.
Is it a bug that loader.conf.local does not work with a regular boot?

Using 8.0.3 RC2

This is a typo; there is no sysntime tunable (nor is there a sysntime sysctl):

Code:
bayonetta $ grep -r 'vfs.zfs.txg.sysntime' /store/freebsd/releng/8.2.0/sys/cddl/contrib/ || echo not found
not found
bayonetta $
bayonetta $ egrep -r 'SYSCTL|TUN' /store/freebsd/releng/8.2.0/sys/cddl/contrib/opensolaris/ | grep txg
/store/freebsd/releng/8.2.0/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/txg.c:SYSCTL_DECL(_vfs_zfs);
/store/freebsd/releng/8.2.0/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/txg.c:SYSCTL_NODE(_vfs_zfs, OID_AUTO, txg, CTLFLAG_RW, 0,
/store/freebsd/releng/8.2.0/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/txg.c:TUNABLE_INT("vfs.zfs.txg.timeout", &zfs_txg_timeout);
/store/freebsd/releng/8.2.0/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/txg.c:SYSCTL_INT(_vfs_zfs_txg, OID_AUTO, timeout, CTLFLAG_RDTUN, &zfs_txg_timeout, 0,
/store/freebsd/releng/8.2.0/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/txg.c:TUNABLE_INT("vfs.zfs.txg.synctime", &zfs_txg_synctime);
/store/freebsd/releng/8.2.0/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/txg.c:SYSCTL_INT(_vfs_zfs_txg, OID_AUTO, synctime, CTLFLAG_RDTUN, &zfs_txg_synctime,
/store/freebsd/releng/8.2.0/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/txg.c:TUNABLE_QUAD("vfs.zfs.txg.write_limit_override", &zfs_write_limit_override);
/store/freebsd/releng/8.2.0/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/txg.c:SYSCTL_QUAD(_vfs_zfs_txg, OID_AUTO, write_limit_override, CTLFLAG_RW,


I think you wanted 'synctime'.
 
G

gcooper

Guest
I also saw a issue in loaders because all variables are put inside quotes.
vfs.zfs.prefetch_disable=0
when in loaders is converted to
vfs.zfs.prefetch_disable="0"
and doesn't work

Works for me:

Code:
[root@freenas] ~# cat /etc/version.freenas
FreeNAS-8.0.3-RC1-x86 (9334M)
[root@freenas] ~# kenv | grep vfs.zfs.prefetch_disable
vfs.zfs.prefetch_disable="0"
[root@freenas] ~# sysctl vfs.zfs.prefetch_disable
vfs.zfs.prefetch_disable: 0
[root@freenas] ~# uname -a
FreeBSD freenas.local 8.2-RELEASE-p4 FreeBSD 8.2-RELEASE-p4 #0: Sun Dec 11 13:58:55 PST 2011     root@bayonetta.local:/scratch/8.0.3/obj.i386/i386/scratch/8.0.3/FreeBSD/src/sys/FREENAS.i386  i386
 

DMooring

Dabbler
Joined
Sep 1, 2011
Messages
20
I have updated to release 8.0.3 and still have the same issue.

This is what is in my loader.conf.local

vfs.zfs.txg.timeout="5"
vfs.zfs.txg.write_limit_override="1073741824"
vfs.zfs.txg.synctime="2"
kern.ipc.maxsockbuf="4000000"
net.inet.tcp.recvbuf_max="16777216"
net.inet.tcp.recvbuf_inc="524288"
net.inet.tcp.sendbuf_max="16777216"
net.inet.tcp.sendbuf_inc="16384"
net.inet.tcp.recvspace="131072"
net.inet.tcp.sendspace="65536"

This is copy of what is showing up

[root@freenas02] /boot# sysctl -a | grep vfs.zfs.txg
vfs.zfs.txg.write_limit_override: 0
vfs.zfs.txg.synctime: 5
vfs.zfs.txg.timeout: 30

[root@freenas02] /boot# sysctl -a | grep kern.ipc.maxsockbuf
kern.ipc.maxsockbuf: 262144

[root@freenas02] /boot# sysctl -a | grep net.inet.tcp.rec
net.inet.tcp.recvspace: 65536
net.inet.tcp.recvbuf_max: 262144
net.inet.tcp.recvbuf_inc: 16384

[root@freenas02] /boot# sysctl -a | grep net.inet.tcp.send
net.inet.tcp.sendspace: 32768
net.inet.tcp.sendbuf_max: 262144
net.inet.tcp.sendbuf_inc: 8192
 
G

gcooper

Guest
I have updated to release 8.0.3 and still have the same issue.

This is what is in my loader.conf.local

vfs.zfs.txg.timeout="5"
vfs.zfs.txg.write_limit_override="1073741824"
vfs.zfs.txg.synctime="2"
kern.ipc.maxsockbuf="4000000"
net.inet.tcp.recvbuf_max="16777216"
net.inet.tcp.recvbuf_inc="524288"
net.inet.tcp.sendbuf_max="16777216"
net.inet.tcp.sendbuf_inc="16384"
net.inet.tcp.recvspace="131072"
net.inet.tcp.sendspace="65536"

This is copy of what is showing up

[root@freenas02] /boot# sysctl -a | grep vfs.zfs.txg
vfs.zfs.txg.write_limit_override: 0
vfs.zfs.txg.synctime: 5
vfs.zfs.txg.timeout: 30

[root@freenas02] /boot# sysctl -a | grep kern.ipc.maxsockbuf
kern.ipc.maxsockbuf: 262144

[root@freenas02] /boot# sysctl -a | grep net.inet.tcp.rec
net.inet.tcp.recvspace: 65536
net.inet.tcp.recvbuf_max: 262144
net.inet.tcp.recvbuf_inc: 16384

[root@freenas02] /boot# sysctl -a | grep net.inet.tcp.send
net.inet.tcp.sendspace: 32768
net.inet.tcp.sendbuf_max: 262144
net.inet.tcp.sendbuf_inc: 8192

- I just doublechecked and there aren't any tunables in the netinet section of the tree, so those don't work that way (they need to be sysctls -- sorry, I accidentally spread that misinformation before in an earlier post).
- kern.ipc.maxsockbuf is a sysctl, not a tunable.
- I didn't dig into why the ZFS sysctls aren't being set, yet, but as Obi-Wan would say,
Use the source, Luke.
 
Status
Not open for further replies.
Top