14.0-RELEASE: sysctl: vfs.nfsd.srvmaxio=1048576: Invalid argument

I noticed this in the 14.0-RELEASE release notes:

...the maximum I/O size for the FreeBSD NFS server can be increased to any power of 2 up to 1 Mbyte using the sysctl vfs.nfsd.srvmaxio while nfsd(8) is not running. ee29e6f31111

However:
Code:
# freebsd-version -kru
14.0-RELEASE-p3
14.0-RELEASE-p3
14.0-RELEASE-p4

# nfsd is stopped

# sysctl vfs.nfsd.srvmaxio
vfs.nfsd.srvmaxio: 131072

# sysctl vfs.nfsd.srvmaxio=1048576
vfs.nfsd.srvmaxio: 131072
sysctl: vfs.nfsd.srvmaxio=1048576: Invalid argument

# Looks like the max I can do is 262144:

# sysctl vfs.nfsd.srvmaxio=262144
vfs.nfsd.srvmaxio: 131072 -> 262144

# sysctl vfs.nfsd.srvmaxio=524288
vfs.nfsd.srvmaxio: 262144
sysctl: vfs.nfsd.srvmaxio=524288: Invalid argument

# Also can't go back down:

# sysctl vfs.nfsd.srvmaxio=131072
vfs.nfsd.srvmaxio: 262144
sysctl: vfs.nfsd.srvmaxio=131072: Invalid argument

From my read of the patch, this should work. Anyone else seeing this?
 
The patch code has this:

nfsd: vfs.nfsd.srvmaxio can only be increased

So that might be why the last one fails? But looks like you always get EINVAL and not the helpful error text?
 
The "nice" messages appear in /var/log/messages and you'll just get the "Invalid argument" (EINVAL) at the command prompt (I assume sysctl only handles the numeric error code not a string of extra error information, so that has to go to the system log):

Code:
# sysctl vfs.nfsd.srvmaxio=1048576
vfs.nfsd.srvmaxio: 131072
sysctl: vfs.nfsd.srvmaxio=1048576: Invalid argument
# tail /var/log/messages
...
Dec 29 12:35:23 r220 kernel: nfsd: set kern.ipc.maxsockbuf to a minimum of 4737024 to support 1048576byte NFS I/O
Or
Code:
# sysctl vfs.nfsd.srvmaxio=524288
vfs.nfsd.srvmaxio: 131072
sysctl: vfs.nfsd.srvmaxio=524288: Invalid argument
...
Dec 29 12:37:21 r220 kernel: nfsd: set kern.ipc.maxsockbuf to a minimum of 2377728 to support 524288byte NFS I/O
And if you try and decrease:
Code:
# sysctl vfs.nfsd.srvmaxio=262144
vfs.nfsd.srvmaxio: 131072 -> 262144
# sysctl vfs.nfsd.srvmaxio=131072
vfs.nfsd.srvmaxio: 262144
sysctl: vfs.nfsd.srvmaxio=131072: Invalid argument
# tail /var/log/messages
...
Dec 29 12:38:37 r220 kernel: nfsd: vfs.nfsd.srvmaxio can only be increased

I don't use NFS but looks like if you want to increase that one setting you have to change other(s) as well. But look in /var/log/messages for the extra error information.
 
The "nice" messages appear in /var/log/messages and you'll just get the "Invalid argument" (EINVAL) at the command prompt (I assume sysctl only handles the numeric error code not a string of extra error information, so that has to go to the system log):

I don't use NFS but looks like if you want to increase that one setting you have to change other(s) as well. But look in /var/log/messages for the extra error information.

Oh jeesh I can't believe I missed that! Good catch. That's what it was. Thanks!
 
Back
Top