All of lore.kernel.org
 help / color / mirror / Atom feed
* directory caching & negative file lookups?
@ 2022-09-01 13:32 Daire Byrne
  2022-09-01 13:55 ` Trond Myklebust
  0 siblings, 1 reply; 11+ messages in thread
From: Daire Byrne @ 2022-09-01 13:32 UTC (permalink / raw)
  To: linux-nfs

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

^ permalink raw reply	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2024-04-12 14:13 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-09-01 13:32 directory caching & negative file lookups? Daire Byrne
2022-09-01 13:55 ` Trond Myklebust
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

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.