linux-fsdevel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [fuse] Speeding up readdir()
@ 2018-12-06 20:00 Nikolaus Rath
  2018-12-07  9:21 ` Miklos Szeredi
  0 siblings, 1 reply; 9+ messages in thread
From: Nikolaus Rath @ 2018-12-06 20:00 UTC (permalink / raw)
  To: Miklos Szeredi, linux-fsdevel, fuse-devel

Hello,

I am trying to improve the performance of readdir() requests. I have a
client application that issues a lot of readdir() requests, and a FUSE
filesystem that makes extensive use of kernel caching for inode entry
attributes because retrieving the attributes from the backend is
relatively expensive.

Unfortunately, it seems to me that currently there is no way to avoid
having to retrieve the attributes from the backend for every entry that
is returned by readdir - on every call:

If I am using readdirplus, I have to include the full attributes even if
the kernel already has them cached.

If I disable readdirplus, I can return just the entry name and its inode
- but I believe because this doesn't result in a lookup count increase
of the inode, the kernel can't match this with the existing cached data
for the inode (is that correct?) and I'm getting a separate lookup()
request for each entry that I've returned.


I could implement a readdir cache in the filesystem, but that means I
have to take care of cache invalidation and I'm basically wasting
memory.

Is there a reason why readdirplus() couldn't return just the name and
inode, together with a special flag that tells the kernel to "just use
the attributes that are already cached"?


Best,
-Nikolaus

-- 
GPG Fingerprint: ED31 791B 2C5C 1613 AF38 8B8A D113 FCAC 3C4E 599F

             »Time flies like an arrow, fruit flies like a Banana.«

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

end of thread, other threads:[~2018-12-10  9:31 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-12-06 20:00 [fuse] Speeding up readdir() Nikolaus Rath
2018-12-07  9:21 ` Miklos Szeredi
2018-12-07 12:55   ` [fuse-devel] " Nikolaus Rath
2018-12-07 13:04     ` Miklos Szeredi
2018-12-07 13:13       ` Nikolaus Rath
2018-12-07 13:18         ` Miklos Szeredi
2018-12-07 13:39       ` Nikolaus Rath
2018-12-10  9:31         ` Miklos Szeredi
2018-12-07 13:38   ` Nikolaus Rath

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).