From: Trond Myklebust <trondmy@hammerspace.com>
To: "linux-nfs@vger.kernel.org" <linux-nfs@vger.kernel.org>,
"daire@dneg.com" <daire@dneg.com>
Subject: Re: directory caching & negative file lookups?
Date: Thu, 1 Sep 2022 13:55:37 +0000 [thread overview]
Message-ID: <a4abb5fcf94d706cc3f47d6b629763d5b1831c21.camel@hammerspace.com> (raw)
In-Reply-To: <CAPt2mGOnsA9pcmZQkr2q40d7A+NLj7=xr+dzFh7XwJPdGYW6Hw@mail.gmail.com>
On Thu, 2022-09-01 at 14:32 +0100, Daire Byrne wrote:
> Hi,
>
> So I have a bit of a newbie question (apologies) that came to me
> while
> debugging some code that was spamming our NFS servers with lookups
> for
> nonexistent files.
>
> If we can cache directory entries (readdir) and even all their
> attributes (readdirplus) for some specified period of time (actimeo,
> nocto) on a client, then why can't we use that data to serve negative
> lookups for files in that directory too (if we so choose)?
>
> There are probably very good reasons you always need to do a
> (negative) file lookup, like being able to read files recently
> created
> on another client (despite your local cache for that directory), but
> I'm just curious what the official reasons are. If we could choose to
> serve negative lookups using the directory entries cache for a
> read-only or unchanging filesystem, would that still be bad? We
> already choose to use nocto for some workloads...
>
> In our case we see these kinds of heavy negative lookup workloads for
> network installed software (100 entries in PYTHONPATH is bad) and in
> buggy software (randomly generated filename lookups are really bad!).
> Of course, this overhead gets really bad as you add latency between
> the client and server.
>
> Daire
man 5 nfs
Look for the section on the 'lookupcache=mode' mount option.
--
Trond Myklebust
Linux NFS client maintainer, Hammerspace
trond.myklebust@hammerspace.com
next prev parent reply other threads:[~2022-09-01 13:55 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-09-01 13:32 directory caching & negative file lookups? Daire Byrne
2022-09-01 13:55 ` Trond Myklebust [this message]
2022-09-01 15:27 ` Daire Byrne
2022-09-01 15:43 ` Trond Myklebust
2022-09-01 15:49 ` Daire Byrne
2024-04-05 14:47 ` Daire Byrne
2024-04-05 15:03 ` Trond Myklebust
2024-04-12 9:11 ` Daire Byrne
2024-04-12 10:21 ` Jeff Layton
2024-04-12 11:43 ` Daire Byrne
2024-04-12 14:13 ` Jeff Layton
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=a4abb5fcf94d706cc3f47d6b629763d5b1831c21.camel@hammerspace.com \
--to=trondmy@hammerspace.com \
--cc=daire@dneg.com \
--cc=linux-nfs@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).