* NFS strategy for large number of file opens
@ 2026-09-07 11:53 Shyam Prasad N
2026-09-08 9:54 ` Jeff Layton
0 siblings, 1 reply; 4+ messages in thread
From: Shyam Prasad N @ 2026-09-07 11:53 UTC (permalink / raw)
To: linux-nfs, Trond Myklebust, Anna Schumaker, Jeff Layton
Hi all,
I'm starting this email thread to understand how NFS deals (or plans
to deal with) workloads that serially do open/close calls to a large
number of files in a directory? Think about a use case of tar of Linux
kernel source code on NFS shares.
AFAIK, local filesystems fare well for this workload compared to
network filesystems, as file opens are local, and file state is
maintained locally. For network filesystems, each open needs to go
over the wire to the server.
Has there been any proposals to improve perf for such workloads?
Could there be possible extensions to directory delegations, that
could allow the client to make opens async and batch them together to
the server in the background? IMO, the challenge is that such open
calls can fail. But can the clients be enabled to do many of these
failure checks (for example, the client could be allocated quota for
how many files it can create, be allowed to cache file permissions by
delegating them etc.)?
Looking forward to the responses. Thanks in advance.
--
Regards,
Shyam
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: NFS strategy for large number of file opens
2026-09-07 11:53 NFS strategy for large number of file opens Shyam Prasad N
@ 2026-09-08 9:54 ` Jeff Layton
2026-09-09 9:35 ` Shyam Prasad N
0 siblings, 1 reply; 4+ messages in thread
From: Jeff Layton @ 2026-09-08 9:54 UTC (permalink / raw)
To: Shyam Prasad N, linux-nfs, Trond Myklebust, Anna Schumaker
On Mon, 2026-09-07 at 17:23 +0530, Shyam Prasad N wrote:
> Hi all,
>
> I'm starting this email thread to understand how NFS deals (or plans
> to deal with) workloads that serially do open/close calls to a large
> number of files in a directory? Think about a use case of tar of Linux
> kernel source code on NFS shares.
>
> AFAIK, local filesystems fare well for this workload compared to
> network filesystems, as file opens are local, and file state is
> maintained locally. For network filesystems, each open needs to go
> over the wire to the server.
>
> Has there been any proposals to improve perf for such workloads?
> Could there be possible extensions to directory delegations, that
> could allow the client to make opens async and batch them together to
> the server in the background? IMO, the challenge is that such open
> calls can fail. But can the clients be enabled to do many of these
> failure checks (for example, the client could be allocated quota for
> how many files it can create, be allowed to cache file permissions by
> delegating them etc.)?
>
> Looking forward to the responses. Thanks in advance.
You should resend this and cc linux-nfs@vger.kernel.org.
The big problem for untar workloads is that they are serialized at the
VFS layer on the client. Neil Brown has been working on changing that.
--
Jeff Layton <jlayton@kernel.org>
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: NFS strategy for large number of file opens
2026-09-08 9:54 ` Jeff Layton
@ 2026-09-09 9:35 ` Shyam Prasad N
2026-09-09 10:47 ` Jeff Layton
0 siblings, 1 reply; 4+ messages in thread
From: Shyam Prasad N @ 2026-09-09 9:35 UTC (permalink / raw)
To: Jeff Layton; +Cc: linux-nfs, Trond Myklebust, Anna Schumaker
On Tue, Sep 8, 2026 at 3:24 PM Jeff Layton <jlayton@kernel.org> wrote:
>
> On Mon, 2026-09-07 at 17:23 +0530, Shyam Prasad N wrote:
> > Hi all,
> >
> > I'm starting this email thread to understand how NFS deals (or plans
> > to deal with) workloads that serially do open/close calls to a large
> > number of files in a directory? Think about a use case of tar of Linux
> > kernel source code on NFS shares.
> >
> > AFAIK, local filesystems fare well for this workload compared to
> > network filesystems, as file opens are local, and file state is
> > maintained locally. For network filesystems, each open needs to go
> > over the wire to the server.
> >
> > Has there been any proposals to improve perf for such workloads?
> > Could there be possible extensions to directory delegations, that
> > could allow the client to make opens async and batch them together to
> > the server in the background? IMO, the challenge is that such open
> > calls can fail. But can the clients be enabled to do many of these
> > failure checks (for example, the client could be allocated quota for
> > how many files it can create, be allowed to cache file permissions by
> > delegating them etc.)?
> >
> > Looking forward to the responses. Thanks in advance.
>
> You should resend this and cc linux-nfs@vger.kernel.org.
Hi Jeff,
linux-cifs mailing list is already in the cc. :)
>
> The big problem for untar workloads is that they are serialized at the
> VFS layer on the client. Neil Brown has been working on changing that.
Has this been discussed in the mailing list? Could you point me to
that discussion?
> --
> Jeff Layton <jlayton@kernel.org>
--
Regards,
Shyam
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: NFS strategy for large number of file opens
2026-09-09 9:35 ` Shyam Prasad N
@ 2026-09-09 10:47 ` Jeff Layton
0 siblings, 0 replies; 4+ messages in thread
From: Jeff Layton @ 2026-09-09 10:47 UTC (permalink / raw)
To: Shyam Prasad N; +Cc: linux-nfs, Trond Myklebust, Anna Schumaker
On Wed, 2026-09-09 at 15:05 +0530, Shyam Prasad N wrote:
> On Tue, Sep 8, 2026 at 3:24 PM Jeff Layton <jlayton@kernel.org> wrote:
> >
> > On Mon, 2026-09-07 at 17:23 +0530, Shyam Prasad N wrote:
> > > Hi all,
> > >
> > > I'm starting this email thread to understand how NFS deals (or plans
> > > to deal with) workloads that serially do open/close calls to a large
> > > number of files in a directory? Think about a use case of tar of Linux
> > > kernel source code on NFS shares.
> > >
> > > AFAIK, local filesystems fare well for this workload compared to
> > > network filesystems, as file opens are local, and file state is
> > > maintained locally. For network filesystems, each open needs to go
> > > over the wire to the server.
> > >
> > > Has there been any proposals to improve perf for such workloads?
> > > Could there be possible extensions to directory delegations, that
> > > could allow the client to make opens async and batch them together to
> > > the server in the background? IMO, the challenge is that such open
> > > calls can fail. But can the clients be enabled to do many of these
> > > failure checks (for example, the client could be allocated quota for
> > > how many files it can create, be allowed to cache file permissions by
> > > delegating them etc.)?
> > >
> > > Looking forward to the responses. Thanks in advance.
> >
> > You should resend this and cc linux-nfs@vger.kernel.org.
>
> Hi Jeff,
>
> linux-cifs mailing list is already in the cc. :)
>
My mistake!
> >
> > The big problem for untar workloads is that they are serialized at the
> > VFS layer on the client. Neil Brown has been working on changing that.
>
> Has this been discussed in the mailing list? Could you point me to
> that discussion?
>
>
He has some preparatory patches here:
https://lore.kernel.org/linux-fsdevel/20260904215142.1060510-1-neilb@ownmail.net/
...but that might not help with untar workloads after all. What Neil's
set would enable is parallel creates in the same directory, but untar
is usually single-threaded and so you might be stuck waiting on round
trip delays anyway.
If you're interested in speeding up untar-style workloads, you might
want to check out the async create code we added to the Ceph client
several years ago.
Basically, the Ceph MDS issues a swath of inode numbers to the client
when it has appropriate caps on the directory, and it can then do
creates locally and trickle them back out to the MDS over time.
Here are some slides from a few years ago:
https://www.usenix.org/sites/default/files/conference/protected-files/vault20_slides_layton.pdf
Cheers,
--
Jeff Layton <jlayton@kernel.org>
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2026-09-09 10:47 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-09-07 11:53 NFS strategy for large number of file opens Shyam Prasad N
2026-09-08 9:54 ` Jeff Layton
2026-09-09 9:35 ` Shyam Prasad N
2026-09-09 10:47 ` Jeff Layton
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox