fstat on Linux in glibc is slow !
cs at samba.org
Fri Sep 15 17:15:11 UTC 2023
On Fri, Sep 15, 2023 at 09:11:01AM -0700, Jeremy Allison via samba-technical wrote:
> On Fri, Sep 15, 2023 at 08:54:49AM -0700, Christof Schmitt wrote:
> > On Thu, Sep 14, 2023 at 11:46:26AM -0700, Jeremy Allison via samba-technical wrote:
> > > https://lwn.net/SubscriberLink/944214/ca0c0f366ada686a/
> > >
> > > Maybe an easy performance win if we use a replacement
> > > for fstat until this gets into glibc ?
> > >
> > > We use fstat a lot and assumed it was fast.
> > So just call syscall(SYS_fstat, ...) in sys_fstat? That would be an easy
> > change. Demonstrating that this has a performance impact would be the
> > difficult part.
> Yep, that seems to be the fix (for x86_64 at least).
That seems to work across Linux architectures (at least the x86_64,
ppc64le and s390x ones i could try).
More information about the samba-technical