On Fri, Jan 10, 2020 at 04:13:08PM +0100, Miklos Szeredi wrote:
> On Fri, Jan 10, 2020 at 4:04 PM Dr. David Alan Gilbert
> <dgilb...@redhat.com> wrote:
> >
> > * Daniel P. Berrangé (berra...@redhat.com) wrote:
> > > On Thu, Dec 12, 2019 at 04:38:28PM +0000, Dr. David Alan Gilbert (git) 
> > > wrote:
> > > > From: Miklos Szeredi <mszer...@redhat.com>
> > > >
> > >
> > > What is readdirplus and what do we need a command line option to
> > > control it ? What's the user benefit of changing the setting ?
> >
> > cc'ing Miklos who understands this better than me.
> >
> > My understanding is that readdirplus is a heuristic inherited from NFS
> > where when you iterate over the directory you also pick up stat() data
> > for each entry in the directory.  You then cache that stat data
> > somewhere.
> > The Plus-ness is that a lot of directory operations involve you stating
> > each entry (e.g. to figure out if you can access it etc) so rolling it
> > into one op avoids the separate stat.  The unplus-ness is that it's an
> > overhead and I think changes some of the caching behaviour.
> 
> Yeah, so either may give better performance and it's hard to pick a
> clear winner.  NFS also has an option to control this.

IIUC from the man page, the NFS option for controlling this is a client
side mount option. This makes sense as only the client really has knowledge
of whether its workload will benefit.

With this in mind, should the readdirplus control for virtio-fs also be a
guest mount option instead of a host virtiofsd CLI option ? The guest admin
seems best placed to know whether their workload will benefit or not.

Regards,
Daniel
-- 
|: https://berrange.com      -o-    https://www.flickr.com/photos/dberrange :|
|: https://libvirt.org         -o-            https://fstop138.berrange.com :|
|: https://entangle-photo.org    -o-    https://www.instagram.com/dberrange :|


Reply via email to