* Re: Increase default NFSv4 server size "max_block_size" to 4MB
2026-03-16 12:39 ` Chuck Lever
@ 2026-03-16 14:40 ` Roland Mainz
2026-03-16 23:35 ` Rick Macklem
2026-03-17 13:51 ` Anna Schumaker
2 siblings, 0 replies; 6+ messages in thread
From: Roland Mainz @ 2026-03-16 14:40 UTC (permalink / raw)
To: Linux NFS Mailing List
On Mon, Mar 16, 2026 at 1:39 PM Chuck Lever <cel@kernel.org> wrote:
> On Mon, Mar 16, 2026, at 3:51 AM, Cedric Blancher wrote:
> > As debated a while ago, can the default NFSv4 server size for
> > "max_block_size" be increased to 4MB, please?
>
> There is an administrative setting to raise this limit for
> recent versions of the kernel. Can you report your experience
> when you raise the limit? Hiccups, performance issues, etc? I
> would kind of like this exercise to be data-driven.
>
> What is still unknown to me is which NFS client implementations
> can support 4MB or 8MB. Without client support, an increase in
> the default in NFSD doesn't mean anything. Rick, Anna, Roland?
Linux 6.17 NFS server:
$ service nfs-server stop
$ printf '%d\n' $((4*1024*1024)) >/proc/fs/nfsd/max_block_size
$ service nfs-server start
Mounting the filesystem with ms-nfs41-client and compiling Cygwin
bash.exe and ms-nfs41-client with Visual Studio etc. works fine...
... and I verified that |FATTR4_MAXREAD| and |FATTR4_MAXWRITE| have
the value |4194304| as expected.
I didn't make any benchmarks yet, but quick observation shows that
cloning a git from a git bundle on the same NFSv4.2 filesystem is up
from 8.1MB/s to 8.8MB/s.
----
Bye,
Roland
--
__ . . __
(o.\ \/ /.o) roland.mainz@nrubsig.org
\__\/\/__/ MPEG specialist, C&&JAVA&&Sun&&Unix programmer
/O /==\ O\ TEL +49 641 3992797
(;O/ \/ \O;)
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: Increase default NFSv4 server size "max_block_size" to 4MB
2026-03-16 12:39 ` Chuck Lever
2026-03-16 14:40 ` Roland Mainz
@ 2026-03-16 23:35 ` Rick Macklem
2026-03-17 13:51 ` Anna Schumaker
2 siblings, 0 replies; 6+ messages in thread
From: Rick Macklem @ 2026-03-16 23:35 UTC (permalink / raw)
To: Chuck Lever; +Cc: Cedric Blancher, Linux NFS Mailing List
On Mon, Mar 16, 2026 at 5:41 AM Chuck Lever <cel@kernel.org> wrote:
>
>
> On Mon, Mar 16, 2026, at 3:51 AM, Cedric Blancher wrote:
> > As debated a while ago, can the default NFSv4 server size for
> > "max_block_size" be increased to 4MB, please?
>
> There is an administrative setting to raise this limit for
> recent versions of the kernel. Can you report your experience
> when you raise the limit? Hiccups, performance issues, etc? I
> would kind of like this exercise to be data-driven.
>
> What is still unknown to me is which NFS client implementations
> can support 4MB or 8MB. Without client support, an increase in
> the default in NFSD doesn't mean anything. Rick, Anna, Roland?
Although it has not seen much testing, it is possible to do a > 1Mbyte NFSv4
mount in FreeBSD.
For a 2Mbyte mount, (the only size > 1Mbyte I've tried) the settings would be..
In /boot/loader.conf
kern.maxphys=2097152
vfs.maxbcachebuf=2097152
and in /etc/sysctl.conf
kern.ipc.maxsockbuf=9455616
Then a mount will use 2Mbytes if the server supports it.
I doubt anyone does this, but it works for trivial tests.
Maybe I'll do it during the next bakeathon? rick
ps:It would be really nice if Roland could show up
(you can attend remotely via tailscale like I do)
at the next bakeathon.
>
> --
> Chuck Lever
>
^ permalink raw reply [flat|nested] 6+ messages in thread* Re: Increase default NFSv4 server size "max_block_size" to 4MB
2026-03-16 12:39 ` Chuck Lever
2026-03-16 14:40 ` Roland Mainz
2026-03-16 23:35 ` Rick Macklem
@ 2026-03-17 13:51 ` Anna Schumaker
2026-03-30 18:46 ` Mike Snitzer
2 siblings, 1 reply; 6+ messages in thread
From: Anna Schumaker @ 2026-03-17 13:51 UTC (permalink / raw)
To: Chuck Lever, Cedric Blancher, Linux NFS Mailing List
On Mon, Mar 16, 2026, at 8:39 AM, Chuck Lever wrote:
> On Mon, Mar 16, 2026, at 3:51 AM, Cedric Blancher wrote:
>> As debated a while ago, can the default NFSv4 server size for
>> "max_block_size" be increased to 4MB, please?
>
> There is an administrative setting to raise this limit for
> recent versions of the kernel. Can you report your experience
> when you raise the limit? Hiccups, performance issues, etc? I
> would kind of like this exercise to be data-driven.
>
> What is still unknown to me is which NFS client implementations
> can support 4MB or 8MB. Without client support, an increase in
> the default in NFSD doesn't mean anything. Rick, Anna, Roland?
The NFS client would need a code change to support >1MB sizes. I
spent some time playing around with 4MB yesterday and it passed
all my tests.
Anna
>
> --
> Chuck Lever
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: Increase default NFSv4 server size "max_block_size" to 4MB
2026-03-17 13:51 ` Anna Schumaker
@ 2026-03-30 18:46 ` Mike Snitzer
0 siblings, 0 replies; 6+ messages in thread
From: Mike Snitzer @ 2026-03-30 18:46 UTC (permalink / raw)
To: Anna Schumaker; +Cc: Chuck Lever, Cedric Blancher, Linux NFS Mailing List
On Tue, Mar 17, 2026 at 09:51:23AM -0400, Anna Schumaker wrote:
>
>
> On Mon, Mar 16, 2026, at 8:39 AM, Chuck Lever wrote:
> > On Mon, Mar 16, 2026, at 3:51 AM, Cedric Blancher wrote:
> >> As debated a while ago, can the default NFSv4 server size for
> >> "max_block_size" be increased to 4MB, please?
> >
> > There is an administrative setting to raise this limit for
> > recent versions of the kernel. Can you report your experience
> > when you raise the limit? Hiccups, performance issues, etc? I
> > would kind of like this exercise to be data-driven.
> >
> > What is still unknown to me is which NFS client implementations
> > can support 4MB or 8MB. Without client support, an increase in
> > the default in NFSD doesn't mean anything. Rick, Anna, Roland?
>
> The NFS client would need a code change to support >1MB sizes. I
> spent some time playing around with 4MB yesterday and it passed
> all my tests.
Is this something you'd be open to posting to the list?
Would be interested to see how 'git clone' improves with it.
Thanks,
Mike
^ permalink raw reply [flat|nested] 6+ messages in thread