Re: Increase FreeBSD NFSv4 nfsd buffer size? Re: Increase default NFSv4 server size "max_block_size" to 4MB

Rick Macklem <[email protected]> Thu, 14 May 2026 16:13:01 -0700
Newsgroups gmane.os.freebsd.devel.hackers
Message-ID <CAM5tNy5kD99uJMs4BMnE2rY-sP8dAdtfaGDM3zxPkhrV6svJAA@mail.gmail.com>
On Thu, May 14, 2026 at 3:52 PM vermaden <[email protected]> wrote:
>
>
> > To enable it, put this line in /etc/rc.conf:
> > nfs_server_maxio=4194304
> > and this line in /etc/sysctl.conf:
> > kern.ipc.maxsockbuf=18892800 (or larger)
> >
> > rick
>
> An idea ... if 'nfs_server_maxio' already sets the 'vfs.nfsd.srvmaxio' maybe it should automatically also set 'kern.ipc.maxsockbuf' to 4*nfs_server_maxio first?
The default setting of kern.ipc.maxsockbuf is up to the
transport folk and not me.

Also, there may be reasons unrelated to NFS where the
sysadmin/user wishes to make it even higher.

I suppose doing something where "if kern.ipc.maxsockbuf < N"
then set it to N might be ok?
(To be honest, there used to be [email protected] that handled
changes to rc scripts. I'm not sure they still exist?)
The setting is actually more than 4 times, since it needs to
include the rest of the RPC messages and not just the data.

rick
ps: I'll ask over on [email protected] to see if they
      think setting to a larger value to make nfs_server_maxio
      work is ok with them.

>
> I mean ... if someone wants to just use /etc/rc.conf for this - that seams reasonable ... and if someone uses /etc/sysctl.conf file instead - he will have both of them there anyway and will not use 'nfs_server_maxio' option:
>
>     vfs.nfsd.srvmaxio=ASD
>     kern.ipc.maxsockbuf=8*ASD
>
> Regards,
> vermaden
>
>
>
>